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

[Auto]Fix loading gpu trained estimator on cpu machine #1717

Merged
merged 5 commits into from
Dec 17, 2021

Conversation

yinweisu
Copy link
Collaborator

Issue #:
autogluon/autogluon#1426

Description:
autogluon users reported a bug where predictor trained on GPU machine is not loadable on a CPU machine.
The previous logic of loading uses pickle, which loads object from bottom down and internally calls torch.load before reaching TorchImageClassificationEstimator custom loading logic.
After refactor loading logic to use torch.load, this issue is solved.

Ideally, unit test should be added to cover such scenario. However, there's no way to disable gpu after torch has been loaded. Hence, impossible to test it on a single machine.

@yinweisu yinweisu requested a review from bryanyzhu December 17, 2021 01:31
@yinweisu yinweisu changed the title Fix loading [Auto]Fix loading gpu trained estimator on cpu machine Dec 17, 2021
@github-actions
Copy link

Job PR-1717-994dda3 is done.
Docs are uploaded to http://gluon-vision-staging.s3-website-us-west-2.amazonaws.com/PR-1717/994dda3/index.html

@github-actions
Copy link

Job PR-1717-ef708ec is done.
Docs are uploaded to http://gluon-vision-staging.s3-website-us-west-2.amazonaws.com/PR-1717/ef708ec/index.html

Copy link
Collaborator

@bryanyzhu bryanyzhu 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 to me.

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.

2 participants