-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use correct join node specs for GroupByMetrics
#1193
Merged
Merged
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
14c6d61
Remove LinkableMetric options that require specifying an outer join path
courtneyholcomb 35d86bf
Move logic for building group by metric source nodes so they don't ge…
courtneyholcomb 76540ae
Update test to check ALL available filters (not just single-hop)
courtneyholcomb 187a922
Rename is_aggregated_to_elements to just aggregated_to_elements
courtneyholcomb ce861fe
Track full specs instead of just references in aggregated_to_elements…
courtneyholcomb 1633e0a
Update logic determining specs to include in joined node for group by…
courtneyholcomb 2cc544a
Update errors to help with debugging + remove print
courtneyholcomb e39de1c
Add variable for readability
courtneyholcomb f3b9c14
Delete accidental snapshots
courtneyholcomb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -558,19 +558,25 @@ def transform(self, instance_set: InstanceSet) -> InstanceSet: # noqa: D102 | |
# Sanity check to make sure the specs are in the instance set | ||
|
||
if self._include_specs: | ||
include_specs_not_found = [] | ||
for include_spec in self._include_specs.all_specs: | ||
if include_spec not in instance_set.spec_set.all_specs: | ||
raise RuntimeError( | ||
f"Include spec {include_spec} is not in the spec set {instance_set.spec_set} - " | ||
f"check if this node was constructed correctly." | ||
) | ||
include_specs_not_found.append(include_spec) | ||
if include_specs_not_found: | ||
raise RuntimeError( | ||
f"Include specs {include_specs_not_found} are not in the spec set {instance_set.spec_set} - " | ||
f"check if this node was constructed correctly." | ||
) | ||
elif self._exclude_specs: | ||
exclude_specs_not_found = [] | ||
for exclude_spec in self._exclude_specs.all_specs: | ||
if exclude_spec not in instance_set.spec_set.all_specs: | ||
raise RuntimeError( | ||
f"Exclude spec {exclude_spec} is not in the spec set {instance_set.spec_set} - " | ||
f"check if this node was constructed correctly." | ||
) | ||
exclude_specs_not_found.append(exclude_spec) | ||
if exclude_specs_not_found: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is very nice to get all of these at once. 😁 |
||
raise RuntimeError( | ||
f"Exclude specs {exclude_specs_not_found} are not in the spec set {instance_set.spec_set} - " | ||
f"check if this node was constructed correctly." | ||
) | ||
else: | ||
assert False, "Include specs or exclude specs should have been specified." | ||
|
||
|
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this is an odd follow up. If I think it was constructed correctly and I hit this error, what does that indicate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It indicates that you either 1) constructed the instance set correctly or 2) constructed the node incorrectly, since they don't match!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was related to this PR because I ran into this error and that's why I needed to change the instance specs built in the
JoinDescription
. Definitely could have been split into another PR though.