CTGAN icon indicating copy to clipboard operation
CTGAN copied to clipboard

Problem with loading to a cpu a model that was trained in CUDA

Open ori-katz100 opened this issue 4 years ago • 2 comments

I trained a model at AWS, saved it, but when I try to load it on my personal computer I get the following error:

~\AppData\Roaming\Python\Python37\site-packages\sdv\tabular\base.py in load(cls, path)
    559         with open(path, 'rb') as f:
--> 560             return pickle.load(f)

RuntimeError: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False. If you are running on a CPU-only machine, please use torch.load with map_location=torch.device('cpu') to map your storages to the CPU.

I can load models trained on my computer, and on AWS I can also load this model.

ori-katz100 avatar Jul 29 '21 08:07 ori-katz100

Hello!

Were you able to solve this bug?

Thanks!

acivit avatar Jan 10 '22 09:01 acivit

Hello curious if there was any workaround for this problem? I am also experiencing the same issue.

jinlow avatar Aug 04 '22 18:08 jinlow