kr-colab / diploSHIC

feature-based deep learning for the identification of selective sweeps
MIT License
49 stars 14 forks source link

Warnings when using test data #33

Closed Axolotl233 closed 3 years ago

Axolotl233 commented 3 years ago

Hi

I was testing diploSHIC with example data, but I got some warnings when i run "python diploSHIC.py train training/ testing/ fooModel --epochs 10". Our machine is multicore with CentOS7 and packages is python 3.6.9, tensorflow 1.14.0 keras 2.3.1 and pandas 1.0.1.

Although it runs normally after this, I am confused as to whether the result is correct or not. So, please check if this will affect the results

warnings messages:

/data/00/user/user112/.local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
/data/00/user/user112/.local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/data/00/user/user112/.local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
/data/00/user/user112/.local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/data/00/user/user112/.local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
/data/00/user/user112/.local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
/data/00/user/user112/.local/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:541: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
/data/00/user/user112/.local/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:542: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/data/00/user/user112/.local/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:543: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
/data/00/user/user112/.local/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:544: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/data/00/user/user112/.local/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:545: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
/data/00/user/user112/.local/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:550: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])

Tiande

Axolotl233 commented 3 years ago

Hi

when I using ‘predict’ submodule, i got some Error

Traceback (most recent call last):  File "diploSHIC.py", line 299, in <module>
    model.load_weights(argsDict['modelWeights'])
  File "/data/00/user/user112/.local/lib/python3.6/site-packages/keras/engine/saving.py", line 492, in load_wrapper                                                        
    return load_function(*args, **kwargs)
  File "/data/00/user/user112/.local/lib/python3.6/site-packages/keras/engine/network.py", line 1230, in load_weights                                                      
    f, self.layers, reshape=reshape)  File "/data/00/user/user112/.local/lib/python3.6/site-packages/keras/engine/saving.py", line 1183, in load_weights_from_hdf5_group                                       
    original_keras_version = f.attrs['keras_version'].decode('utf8')
AttributeError: 'str' object has no attribute 'decode'

i can't fix it by my self because I am newble about python. My command line is

python diploSHIC.py predict fooModel.json fooModel.weights.hdf5 testEmpirical.fvec testEmpirical.preds

please point out what is wrong with it. Thanks Tiande

andrewkern commented 3 years ago

hi there- you first issue above looks like deprecation warnings. nothing to worry about.

the second issue here with the predict mode looks like an issue with your tensorflow / keras install and doesn't appear to have to do with diploSHIC per se. Can you run other things using keras?

Axolotl233 commented 3 years ago

Hi~ I have reinstalled tensorflow 1.14.0 and keras 2.3.1 but problem not be solved. I really know little about python, so i don't how to test them whether they work well. If you could kindly provide me some ways or code to test them, I will be appreciate.

Tiande

andrewkern commented 3 years ago

you could try one of these examples to make sure everything is working, but your error above is coming from keras. you might raise an issue on that repo

https://keras.io/examples/vision/image_classification_from_scratch/

Axolotl233 commented 3 years ago

hi, Sorry i didn't see your reply, i will test it as soon as possible you can close this question temporary, if i meet any other question of DiploSHIC, i will ask again. Thank you~