OSError: SavedModel file does not exist

Issue #35 on hold
die hu created an issue

Hi, Thanks for your nice tool: iphop.

I got a error message from step 8 when I use iphop predict --fa_file Data_test_add_to_db/Input_viral_contigs.fasta --db_dir ../iphop_db/Sept_2021_pub_rw --out_dir iphop_test_results/ .

[8] Running the convolution networks...
[8/1] Loading data as tensors..
[8/1.1] Getting blast-based scores..
[8/1.2] Run blast classifier Model_blast_Conv-87 (by batch)..
Traceback (most recent call last):
File "/home/hudi/.conda/envs/iphop/bin/iphop", line 8, in <module>
sys.exit(cli())
File "/home/hudi/.conda/envs/iphop/lib/python3.8/site-packages/iphop/iphop.py", line 128, in cli
args"func"
File "/home/hudi/.conda/envs/iphop/lib/python3.8/site-packages/iphop/modules/master_predict.py", line 106, in main
runmodels.run_individual_models(args)
File "/home/hudi/.conda/envs/iphop/lib/python3.8/site-packages/iphop/modules/runmodels.py", line 58, in run_individual_models
full_predicted = run_single_classifier(classifier,tensors,args)
File "/home/hudi/.conda/envs/iphop/lib/python3.8/site-packages/iphop/modules/runmodels.py", line 229, in run_single_classifier
best_model = keras.models.load_model(h5_file, compile=False)
File "/home/hudi/.conda/envs/iphop/lib/python3.8/site-packages/keras/utils/traceback_utils.py", line 67, in error_handler
raise e.with_traceback(filtered_tb) from None
File "/home/hudi/.conda/envs/iphop/lib/python3.8/site-packages/tensorflow/python/saved_model/loader_impl.py", line 118, in parse_saved_model
raise IOError(
OSError: SavedModel file does not exist at: /home/hudi/.conda/envs/iphop/lib/python3.8/site-packages/iphop/classifiers/Model_blast_Conv-87.h5/{saved_model.pbtxt|saved_model.pb}

How can I fix it?

Thanks in advance

Comments (4)

  1. Simon Roux repo owner

    Hi,

    Can you check (and put here) the content of the folder “/home/hudi/.conda/envs/iphop/lib/python3.8/site-packages/iphop/classifiers/” ? It seems like the installation was maybe not complete, and some files are missing (according to the error log).

    Best,

    Simon

  2. die hu reporter

    Hi, Simon

    There are the files in “/home/hudi/.conda/envs/iphop/lib/python3.8/site-packages/iphop/classifiers/.

    Thanks

  3. Simon Roux repo owner

    So that is strange, the program complains about “SavedModel file does not exist”, but we can see the file here (“Model_blast-Conv-87.h5”). I could think of two reasons for this, one would be permissions issues (i.e. you should double-check that all the files in “classifiers” have the correct permissions to be readable by the script), and the other would be something specific happening with your OS/system and h5 files (I know some systems need to load some custom python module to be able to read h5 correctly) ?

  4. Log in to comment