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

Allow estimators to accept any dtype #5888

Merged
merged 19 commits into from
Jul 30, 2024

Conversation

dantegd
Copy link
Member

@dantegd dantegd commented May 14, 2024

Closes #4477

Adds the capability for all estimators to accept any dtype by converting the inputs if needed to. Currently, for most estimators, this means converting to float32.

Todo:

  • Add conversion to all methods
  • Discuss if default to float32 is the correct deafault
  • Discuss if an option to override that default is needed
  • Update docstring generator
  • Add tests

cc @beckernick @pentschev @isVoid @divyegala

@dantegd dantegd added feature request New feature or request non-breaking Non-breaking change labels May 14, 2024
@github-actions github-actions bot added the Cython / Python Cython or Python issue label May 14, 2024
@github-actions github-actions bot added conda conda issue ci labels Jun 12, 2024
@dantegd dantegd changed the base branch from branch-24.06 to branch-24.08 June 12, 2024 05:02
@github-actions github-actions bot removed conda conda issue ci labels Jul 27, 2024
@dantegd dantegd marked this pull request as ready for review July 29, 2024 16:08
@dantegd dantegd requested a review from a team as a code owner July 29, 2024 16:08
python/cuml/cuml/common/doc_utils.py Outdated Show resolved Hide resolved
python/cuml/cuml/internals/array.py Outdated Show resolved Hide resolved
I_ndarr = cuml.common.input_to_cuml_array(I_cparr).array
I_ndarr = cuml.common.input_to_cuml_array(
I_cparr,
convert_to_dtype=(np.float32 if convert_dtype
Copy link
Member

Choose a reason for hiding this comment

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

This looks incorrect. Default should be np.int32 or np.int64, I'm not sure what the API accepts

Copy link
Member Author

Choose a reason for hiding this comment

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

good catch, this should be int64

@dantegd
Copy link
Member Author

dantegd commented Jul 30, 2024

/merge

@rapids-bot rapids-bot bot merged commit 58ae5af into rapidsai:branch-24.08 Jul 30, 2024
61 of 62 checks passed
This pull request was closed.
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 feature request New feature or request non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Support auto converting integer/other dtypes to supported dtypes during training of estimators
2 participants