Skip to content
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

Fix bug in glue op #216

Merged
merged 4 commits into from
Aug 18, 2023
Merged

Fix bug in glue op #216

merged 4 commits into from
Aug 18, 2023

Conversation

ianspektor
Copy link
Collaborator

sorted() in the glue implementation gave the wrong order when inputs >= 11, since "input_10" as a string is less than "input_2". remove the sorted since I don't think it's needed, else we'll need to change it for a custom sorted that takes this into account.

@ianspektor ianspektor requested a review from achoum August 10, 2023 15:32
@@ -201,7 +201,7 @@ def glue(
Returns:
EventSet with concatenated features.
"""
if len(inputs) == 1:
if len(inputs) == 1 and isinstance(inputs[0], EventSetNode):
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes an unrelated bug which caused glue(literally anything) to return that same thing, discovered while passing glue(evset_list) instead of glue(*evset_list)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh nice catch! I guess... that same bug is in combine() as well 😬

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated combine too

Copy link
Collaborator

@achoum achoum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ianspektor ianspektor merged commit 5497f1c into main Aug 18, 2023
13 checks passed
@ianspektor ianspektor deleted the glue-bug branch August 18, 2023 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants