-
Notifications
You must be signed in to change notification settings - Fork 322
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
Improve error message when sampling on a non-CPU device #2016
Conversation
sdv/single_table/base.py
Outdated
try: | ||
synthesizer = cloudpickle.load(f) | ||
except RuntimeError: | ||
raise SamplingError( | ||
'This synthesizer was created on a machine with GPU but the current machine is' | ||
' CPU-only. This feature is currently unsupported. We recommend sampling on ' | ||
'the same GPU-enabled machine.' | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this occur on the sampling
instead ? or the error gets raised while you load the synthesizer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the user issue, they ran into this problem when loading the synthesizer, so that's where I added the warning.
sdv/multi_table/base.py
Outdated
try: | ||
synthesizer = cloudpickle.load(f) | ||
except RuntimeError: | ||
raise SamplingError( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we only switch to the new error message after confirming the error that surfaced has that specific message about the current machine being CPU-only?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the error message doesn't match the specific case we should re-raise it
CU-86azg7w2c, Resolve #1819.