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

add feature_names_in_ #5678

Open
wants to merge 14 commits into
base: branch-24.02
Choose a base branch
from

Conversation

tvdboom
Copy link

@tvdboom tvdboom commented Nov 29, 2023

Closes #5677

Adds the feature_names_in_ attributes to all estimators. Code copied from sklearn's BaseEstimator.

@tvdboom tvdboom requested a review from a team as a code owner November 29, 2023 11:05
Copy link

copy-pr-bot bot commented Nov 29, 2023

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions github-actions bot added the Cython / Python Cython or Python issue label Nov 29, 2023
@csadorf csadorf changed the base branch from branch-23.12 to branch-24.02 November 30, 2023 20:27
@csadorf csadorf added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Nov 30, 2023
@csadorf
Copy link
Contributor

csadorf commented Nov 30, 2023

/ok to test

@tvdboom
Copy link
Author

tvdboom commented Dec 25, 2023

@csadorf can you run the build?

@csadorf
Copy link
Contributor

csadorf commented Jan 3, 2024

/ok to test

Copy link
Contributor

@csadorf csadorf left a comment

Choose a reason for hiding this comment

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

Tests are currently failing because of a missing import. I would appreciate if you could fix that before I do a more thorough review.

python/cuml/_thirdparty/sklearn/utils/skl_dependencies.py Outdated Show resolved Hide resolved
@csadorf
Copy link
Contributor

csadorf commented Jan 11, 2024

@tvdboom Let me know if there is any way I can assist you with this PR!

@tvdboom
Copy link
Author

tvdboom commented Jan 11, 2024

I haven't found the time to work on this yet. I'll do it for sure next week. thanks

@csadorf
Copy link
Contributor

csadorf commented Jan 11, 2024

I haven't found the time to work on this yet. I'll do it for sure next week. thanks

Sure, no rush at all! Just let me know when you want to move forward with this.

@tvdboom
Copy link
Author

tvdboom commented Jan 16, 2024

@csadorf It should be ready now. I imported numpy over cupy. I believe for this specific array that's probably faster but let me know if you think cupy would be the better choice here.

@csadorf
Copy link
Contributor

csadorf commented Jan 17, 2024

/ok to test

@csadorf
Copy link
Contributor

csadorf commented Jan 19, 2024

/ok to test

Copy link
Contributor

@csadorf csadorf left a comment

Choose a reason for hiding this comment

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

Looks good overall, thanks a lot!

I ran some tests and also noticed that the warnings module is used in the skl_dependencies.py module, but is not actually imported. That would of course need to be fixed, but I'm also a bit concerned, because it means that those branches are not actually tested. I would appreciate if you could have a look at how much effort it would take to test those cases.

@csadorf
Copy link
Contributor

csadorf commented Jan 23, 2024

/ok to test

@csadorf
Copy link
Contributor

csadorf commented Jan 23, 2024

@tvdboom Please do not merge the remote tracking branch unless necessary. It stresses our CI resources. Also, please install the pre-commit hooks to ensure that style checks will pass. Thanks!

@csadorf
Copy link
Contributor

csadorf commented Jan 23, 2024

/ok to test

@csadorf
Copy link
Contributor

csadorf commented Jan 24, 2024

@tvdboom Looking at the test outputs, it seems like it's not working as expected. Do you have any idea what might be going on? Do you need assistance in setting up a local test environment for debugging?

@tvdboom
Copy link
Author

tvdboom commented Jan 24, 2024

Unfortunately, I have a new pc with an amd gpu and windows os so I can't install cuml locally. So what I did was to run the tests importing a model from sklearn instead of cuml and (naively) hope that this would also work with the same model from cuml. Apparently it does not, so not sure how to debug.

@csadorf
Copy link
Contributor

csadorf commented Jan 26, 2024

Unfortunately, I have a new pc with an amd gpu and windows os so I can't install cuml locally. So what I did was to run the tests importing a model from sklearn instead of cuml and (naively) hope that this would also work with the same model from cuml. Apparently it does not, so not sure how to debug.

That's unfortunate. Maybe you can use Google Colab?

@tvdboom
Copy link
Author

tvdboom commented Jan 30, 2024

That's unfortunate. Maybe you can use Google Colab?

Any idea how to install cuml from a custom branch in colab? I tried this:

image

Also adding --extra-index-url=https://pypi.nvidia.com gives the same error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cython / Python Cython or Python issue improvement Improvement / enhancement to an existing function non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEA] Support feature_names_in_ attribute
2 participants