maxhodak / keras-molecules

Autoencoder network for learning a continuous representation of molecular structures.
MIT License
520 stars 146 forks source link

problem with loading sample #26

Closed jeammimi closed 7 years ago

jeammimi commented 7 years ago

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 commented 7 years ago

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

dribnet commented 7 years ago

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 commented 7 years ago

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'

pechersky commented 7 years ago

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 commented 7 years ago

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 https://github.com/maxhodak/keras-molecules/issues/26#issuecomment-259453001, or mute the thread https://github.com/notifications/unsubscribe-auth/AGQ4apPxfdYT4-mvclx6bLKj-YJ8PnI-ks5q8fCegaJpZM4Ks9CO .

maxhodak commented 7 years ago

ok to close?

jeammimi commented 7 years ago

Yes that was the problem indeed. Thanks