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

[WIP] Use config_context for device configuration. #8144

Closed
wants to merge 6 commits into from

Conversation

trivialfis
Copy link
Member

This is an early working-in-progress PR for using global configuration for device. There are still plenty of things I need to do, the PR is for the CI so that I can get a better picture on how many changes I need to make.

Related issue: #7308

For sklearn, we will support both the config_context and constructor parameter device (replacing the gpu_id training parameter) for easier hyper-parameter search.

xgb.XGBRegressor(device="CUDA:0", tree_method="hist") # ok, easy for parameter search with sklearn
xgb.XGBRegressor(device="CPU", tree_method="approx") # CUDA + approx will throw an error

with xgb.config_context(device="CUDA:0"):
    xgb.XGBRegressor(tree_method="hist") # ok, easier for setting global configuration.

@trivialfis
Copy link
Member Author

Closing to avoid spamming the list.

@trivialfis trivialfis closed this Aug 9, 2022
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.

1 participant