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

Restore() Object arrays cannot be loaded when allow_pickle=False #351

Closed
anilsemizoglu opened this issue Jul 16, 2019 · 2 comments
Closed
Assignees

Comments

@anilsemizoglu
Copy link

I got the following error when I called a saved scan zip file.
scan_object=ta.Restore('talos_scans/all_widths_resample_600.zip')
I was able to load the scan object by editing line 28 in talos/commands/restore.py to include allow_pickle=True
self.params = load(self.file_prefix + '_params.npy',allow_pickle=True).item()
Does anyone know why I'm getting this error? Do I have a configuration problem? All other talos functions are working as expected.

numpy version: 1.16.4
keras version: 2.24
talos version: 0.4.9

/anaconda3/envs/neuralnet/lib/python3.7/site-packages/talos/commands/restore.py in __init__(self, path_to_zip)
     26 
     27         # add params dictionary
---> 28         self.params = load(self.file_prefix + '_params.npy').item()
     29 
     30         # add experiment details

/anaconda3/envs/neuralnet/lib/python3.7/site-packages/numpy/lib/npyio.py in load(file, mmap_mode, allow_pickle, fix_imports, encoding)
    445             else:
    446                 return format.read_array(fid, allow_pickle=allow_pickle,
--> 447                                          pickle_kwargs=pickle_kwargs)
    448         else:
    449             # Try a pickle

/anaconda3/envs/neuralnet/lib/python3.7/site-packages/numpy/lib/format.py in read_array(fp, allow_pickle, pickle_kwargs)
    694         # The array contained Python objects. We need to unpickle the data.
    695         if not allow_pickle:
--> 696             raise ValueError("Object arrays cannot be loaded when "
    697                              "allow_pickle=False")
    698         if pickle_kwargs is None:

ValueError: Object arrays cannot be loaded when allow_pickle=False
@mikkokotila mikkokotila added the priority: MEDIUM medium priority label Jul 16, 2019
@mikkokotila mikkokotila self-assigned this Jul 16, 2019
@mikkokotila
Copy link
Contributor

Thanks, I'm seeing this also in the automated tests. Will most likely get to work on it today.

mikkokotila added a commit that referenced this issue Jul 16, 2019
@mikkokotila mikkokotila added fixed-daily-dev and removed priority: MEDIUM medium priority labels Jul 16, 2019
@mikkokotila
Copy link
Contributor

This is now fixed in daily-dev. Closing here.

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

No branches or pull requests

2 participants