frankchen121212/RHSNet

RuntimeError: Method `model.to_yaml()` has been removed due to security risk of arbitrary code execution. Please use `model.to_json()` instead

Joyce121 opened this issue · 1 comments

截图20221008194457

when I run this command "python motif_extractor.py experiments/nature_genetics_2008/1000_4/CNN/baseline_classification.json", everything was fine in the early time. When the simulation is complete, appear "[2022-10-08 17:54:19,785][line: 28] ==> saving =>/projects/software/RHSNet/model/EAS/CNN/1000_4/EAS.json" , the software reported this error,"
RuntimeError: Method model.to_yaml() has been removed due to security risk of arbitrary code execution. Please use model.to_json() instead.", I don't know how to fix it .

截图20221008194539

Hello, Joyce. Thank you for your interest in RHSNet,

Sorry for the late reply,

It seems to be a Tensorflow version problem. Before running the experiments, please make sure that you have the following requirements: tensorflow-gpu==1.12.0, keras==2.2.4, cudatoolkit==9.0, and cudnn=7.1.2

You can install the right version of TensorFlow in the virtual environment with the following command

conda install tensorflow-gpu==1.12.0 keras==2.2.4 cudatoolkit==9.0 cudnn=7.1.2 h5py

A higher version of TensorFlow will cause this problem. Refer to: devanshkv/fetch#22

If you still have a problem, please share your TensorFlow version as well as your Keras version. Thank you.