graph: relax the aggressive numeric node series detection#4803
Merged
Conversation
00a1c7a to
0cc4b01
Compare
stephanwlee
reviewed
Mar 25, 2021
| ); | ||
| }); | ||
|
|
||
| it('groups numeric series of nodes without underscores', async () => { |
Contributor
There was a problem hiding this comment.
to codify the expected behavior for the future reader, add tests for:
- non-sequential numbering (e.g., 2 → 3 → 1 and 5 → 6 → 7 and 10 → 20 → 21)
- mixed format (e.g.,
foo_2→foo3orconv3→conv2→conv2_1) - any others? like
foo→bar→foo_2→foo3→bar_2
Contributor
Author
There was a problem hiding this comment.
Added more test cases
stephanwlee
approved these changes
Mar 29, 2021
Contributor
stephanwlee
left a comment
There was a problem hiding this comment.
Thanks, I did not know how the series grouping would work under the cases depicted in the test and TIL.
| ); | ||
| } | ||
|
|
||
| function createProgressTracker(): tf_graph_common.ProgressTracker { |
Contributor
There was a problem hiding this comment.
createProgressTracker → createNoopProgressTracker
psybuzz
commented
Mar 29, 2021
| ); | ||
| } | ||
|
|
||
| function createProgressTracker(): tf_graph_common.ProgressTracker { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before, these nodes [add_0, add_1, add_2, ...] could be collapsed into
a single "series group node", while [add1, add2, add3, ...] could not.
This change relaxes the strict regex check to allow names without
underscores.
Note that the "minimum 5 node series length" constraint still applies,
as the main heuristic that guards against overly aggressive series
grouping.