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

[pyspark] Handle the device parameter in pyspark. #9390

Merged
merged 5 commits into from Jul 18, 2023

Conversation

trivialfis
Copy link
Member

@trivialfis trivialfis commented Jul 17, 2023

  • Handle the new device parameter in pyspark.
  • Deprecate the old use_gpu parameter.

@trivialfis
Copy link
Member Author

cc @WeichenXu123 .

@WeichenXu123
Copy link
Contributor

WeichenXu123 commented Jul 17, 2023

emm, @trivialfis

This is a breaking change, it breaks our customer code unexpectedly, can we just deprecate use_gpu param instead of removing it suddenly ?

- Handle the new `device` parameter in pyspark.
- Remove the old `use_gpu` parameter.

py3.8

Convert some tests.

lint.

linter is happy.

Early validation.

Fix test.
@trivialfis trivialfis changed the title [breaking] Handle the device parameter in pyspark. [pyspark] Handle the device parameter in pyspark. Jul 17, 2023
@trivialfis
Copy link
Member Author

trivialfis commented Jul 17, 2023

@WeichenXu123 Restored the compatibility with a warning when use_gpu is not None.

use_gpu = Param(
Params._dummy(),
"use_gpu",
"A boolean variable. Set use_gpu=true if the executors "
+ "are running on GPU instances. Currently, only one GPU per task is supported.",
"Deprecated, use `device` instead.",
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's keep original doc but append Deprecated

Copy link
Member Author

Choose a reason for hiding this comment

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

Done, the notice is prepended.

@trivialfis trivialfis merged commit 6e18d3a into dmlc:master Jul 18, 2023
26 checks passed
@trivialfis trivialfis deleted the device-ordinal-pyspark branch July 18, 2023 00:47
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.

None yet

3 participants