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

problem with loading sample #26

Closed
jeammimi opened this issue Nov 8, 2016 · 7 comments
Closed

problem with loading sample #26

jeammimi opened this issue Nov 8, 2016 · 7 comments

Comments

@jeammimi
Copy link

jeammimi commented Nov 8, 2016

Hi, when I try to use the model with the command:
python2 sample.py data/smiles_50k.h5 data/model_50k.h5 --target autoencoder
I have the following error:

Using Theano backend.
Traceback (most recent call last):
File "sample.py", line 97, in
main()
File "sample.py", line 90, in main
autoencoder(args, model)
File "sample.py", line 41, in autoencoder
data, charset = load_dataset(args.data, split = False)
File "/home/jarbona/keras-molecules/autoencoder/utils.py", line 20, in load_dataset
h5f = h5py.File(filename, 'r')
File "/usr/lib/python2.7/site-packages/h5py/_hl/files.py", line 272, in init
fid = make_fid(name, mode, userblock_size, fapl, swmr=swmr)
File "/usr/lib/python2.7/site-packages/h5py/_hl/files.py", line 92, in make_fid
fid = h5f.open(name, flags, fapl=fapl)
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper (/tmp/pip-4rPeHA-build/h5py/_objects.c:2684)
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper (/tmp/pip-4rPeHA-build/h5py/_objects.c:2642)
File "h5py/h5f.pyx", line 76, in h5py.h5f.open (/tmp/pip-4rPeHA-build/h5py/h5f.c:1930)
IOError: Unable to open file (File signature not found)

I am not sure if it comes from my install.

@jeammimi
Copy link
Author

jeammimi commented Nov 8, 2016

Hum sorry, I realised that I wasn't loading the right file

@jeammimi jeammimi closed this as completed Nov 8, 2016
@dribnet
Copy link
Contributor

dribnet commented Nov 8, 2016

I believe preprocessing the sample file is necessary:

python preprocess.py data/smiles_50k.h5 data/processed_smiles_50k.h5
python sample.py data/processed_smiles_50k.h5 data/model_50k.h5 --target autoencoder

@jeammimi
Copy link
Author

jeammimi commented Nov 8, 2016

I still have trouble with the first command.
I get:
python2 preprocess.py data/smiles_50k.h5 data/processed_smiles_500k.h5
/usr/lib/python2.7/site-packages/sklearn/cross_validation.py:44: DeprecationWarning: This module was deprecated in version 0.18 in favor of the model_selection module into which all the refactored classes and functions are moved. Also note that the interface of the new CV iterators are different from that of this module. This module will be removed in 0.20.
"This module will be removed in 0.20.", DeprecationWarning)
Traceback (most recent call last):
File "preprocess.py", line 87, in
main()
File "preprocess.py", line 36, in main
data = pandas.read_hdf(args.infile, 'table')
File "/usr/lib/python2.7/site-packages/pandas/io/pytables.py", line 330, in read_hdf
store = HDFStore(path_or_buf, *_kwargs)
File "/usr/lib/python2.7/site-packages/pandas/io/pytables.py", line 448, in init
self.open(mode=mode, *_kwargs)
File "/usr/lib/python2.7/site-packages/pandas/io/pytables.py", line 587, in open
self._handle = tables.open_file(self._path, self._mode, *_kwargs)
File "/usr/lib/python2.7/site-packages/tables/file.py", line 320, in open_file
return File(filename, mode, title, root_uep, filters, *_kwargs)
File "/usr/lib/python2.7/site-packages/tables/file.py", line 783, in init
self._g_new(filename, mode, **params)
File "tables/hdf5extension.pyx", line 487, in tables.hdf5extension.File._g_new (tables/hdf5extension.c:5519)
tables.exceptions.HDF5ExtError: HDF5 error back trace

File "H5F.c", line 604, in H5Fopen
unable to open file
File "H5Fint.c", line 1087, in H5F_open
unable to read superblock
File "H5Fsuper.c", line 277, in H5F_super_read
file signature not found

End of HDF5 error back trace

Unable to open/create file 'data/smiles_50k.h5'

@jeammimi jeammimi reopened this Nov 8, 2016
@pechersky
Copy link
Collaborator

Did you actually acquire the smiles_50k.h5 file? AFAIK the repo doesn't provide it, only a pointer to it that can be traversed by git-lfs. What do you get when you run ls -ltah data?

@jeammimi
Copy link
Author

No i didn't do It. I didn't know this system. So that must be the problem.
Thanks

Le 9 nov. 2016 5:17 PM, "Yakov Pechersky" notifications@github.com a
écrit :

Did you actually acquire the smiles_50k.h5 file? AFAIK the repo doesn't
provide it, only a pointer to it that can be traversed by git-lfs. What
do you get when you run ls -ltah data?


You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
#26 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGQ4apPxfdYT4-mvclx6bLKj-YJ8PnI-ks5q8fCegaJpZM4Ks9CO
.

@maxhodak
Copy link
Owner

ok to close?

@jeammimi
Copy link
Author

Yes that was the problem indeed.
Thanks

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

4 participants