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

Make ColumnSelector.all a property instead of a manually set attribute #296

Merged
merged 4 commits into from
May 4, 2023

Conversation

karlhigley
Copy link
Contributor

This seems to be causing situations where ColumnSelector.all doesn't exist, though I'm not entirely sure how. In any case, making it a property is a better design anyway, so let's see if this fixes the issues.

This seems to be causing situations where `ColumnSelector.all` doesn't exist, though I'm not entirely sure how. In any case, making it a property is a better design anyway, so let's see if this fixes the issues.
@karlhigley karlhigley added the bug Something isn't working label Apr 27, 2023
@karlhigley karlhigley added this to the Merlin 23.05 milestone Apr 27, 2023
@karlhigley karlhigley requested a review from jperez999 April 27, 2023 14:29
@karlhigley karlhigley self-assigned this Apr 27, 2023
@github-actions
Copy link

Documentation preview

https://nvidia-merlin.github.io/core/review/pr-296

def test_wildcard_selector_bool():
selector = ColumnSelector("*")

assert selector.all is True
Copy link
Member

Choose a reason for hiding this comment

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

It looks like this test would have passed without this change. I'm not sure if this PR has a functional change, though the property method is clearer in terms of documenting the public interface.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm right there with you on thinking this shouldn't be a functional change, but if you see the linked bug ticket, somehow self.all is not getting set/created on selector objects. I think this should address that issue, although I'm not entirely sure why the code wasn't working as written.

@karlhigley karlhigley merged commit 66182a4 into NVIDIA-Merlin:main May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Merlin has AttributeError: 'ColumnSelector' object has no attribute 'all' for an example notebook
2 participants