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

Fix a bug that wrongly dispatched compute to cpu #3

Merged
merged 2 commits into from
Oct 11, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions sklearn_pytorch_engine/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@ def get_torch_default_device():


def get_sklearn_pytorch_engine_default_device():
device = os.getenv("SKLEARN_PYTORCH_ENGINE_DEFAULT_DEVICE", None)
if device is None:
device = get_torch_default_device()
return device
return os.getenv("SKLEARN_PYTORCH_ENGINE_DEFAULT_DEVICE", None)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you should remove get_torch_default_device if it's no longer used anywhere.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it is used in kmeans/engine.py



@lru_cache
Expand Down
Loading