Closed np519 closed 3 years ago
There seems to be an issue with model serialization. Can you check which TF and Keras version were installed?
Thank you for getting back to me!
Tensorflow: 1.14.0 and Keras: 2.2.4.
Hm. Is does the EC2 instance have a GPU attached? Can you try running it with tensorflow-gpu==1.7
?
I also recommend trying to initialize the keras model in python and try to save (model.save('path')) and re-load it. (using keras.models.load_model()
)
Thank you for the additional tips!! An update:
I was using an m5.xlarge EC2 instance which does not have a GPU attached. I restarted the colab tutorial on an g4dn.xlarge instance which does contain a GPU. This did not fix the error and I had the same output as my first comment.
I tried switching the tensorflow version to tensorflow-gpu==1.7
and this also did not fix the issue.
When I tried reloading the keras model using ipython with the command keras.models.load_model()
I again received the same error output as my original comment.
The solution: pip install 'h5py==2.10.0' --force-reinstall
it seems there was a dependency error for h5py files and changing the version fixed the problem. Woohoo!!
That's great to hear! Thanks for posting the solution.
Hello, I've been having some issues trying to get bpnet to run on an aws ec2 instance.
After installing and setting up bpnet using the conda-env.yml file, I started following the google colab tutorial using the example chip-nexus data.
I ran bpnet using the following command:
bpnet train /home/ec2-user/bpnet/examples/chip-nexus/dataspec.yml --premade=bpnet9 --config=/home/ec2-user/bpnet/examples/chip-nexus/config.gin . --override='train.epochs=10' --in-memory
This worked fine so I attempted to calculate contributions scores with the following command:
bpnet contrib /home/ec2-user/bpnet_output_dir/ --method=deeplift --contrib-wildcard='*/profile/wn' /home/ec2-user/bpnet_output_dir/contrib.deeplift.h5 --overwrite
However, I got the following error:
To troubleshoot, I tried adding print statements in a few of the traceback files but I wasn't able to figure out what the initial cause of the error was.
Any help or guidance would be greatly appreciated!!
Thank you!