NahyeKim / DeepBE

9 stars 4 forks source link

Corrupted model file leading to issues running ABE8e model #5

Open shivvyp opened 2 weeks ago

shivvyp commented 2 weeks ago

Hi, I have been trying to use the ABE8e base editor model for my gRNAs, but I am getting stuck with running the model with your provide input file. The error suggests that the file is corrupted. I have created a conda environment with the specified dependencies Here is my error:

2024-10-09 15:04:07.844733: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2024-10-09 15:04:10.814325: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1510] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 6888 MB memory:  -> device: 0, name: Tesla P4, pci bus id: 0000:01:00.0, compute capability: 6.1
Traceback (most recent call last):
  File "DeepBE_8e.py", line 9, in <module>
    final_model =  tf.keras.models.load_model('DeepBE_8e_model',compile=False)
  File "/u/home/s/spatel56/.conda/envs/ABEDEEPBE/lib/python3.6/site-packages/keras/saving/save.py", line 205, in load_model
    return saved_model_load.load(filepath, compile, options)
  File "/u/home/s/spatel56/.conda/envs/ABEDEEPBE/lib/python3.6/site-packages/keras/saving/saved_model/load.py", line 140, in load
    loaded = tf.__internal__.saved_model.load_partial(path, nodes_to_load, options=options)
  File "/u/home/s/spatel56/.conda/envs/ABEDEEPBE/lib/python3.6/site-packages/tensorflow/python/saved_model/load.py", line 769, in load_partial
    return load_internal(export_dir, tags, options, filters=filters)
  File "/u/home/s/spatel56/.conda/envs/ABEDEEPBE/lib/python3.6/site-packages/tensorflow/python/saved_model/load.py", line 903, in load_internal
    ckpt_options, options, filters)
  File "/u/home/s/spatel56/.conda/envs/ABEDEEPBE/lib/python3.6/site-packages/tensorflow/python/saved_model/load.py", line 165, in __init__
    self._restore_checkpoint()
  File "/u/home/s/spatel56/.conda/envs/ABEDEEPBE/lib/python3.6/site-packages/tensorflow/python/saved_model/load.py", line 476, in _restore_checkpoint
    load_status = saver.restore(variables_path, self._checkpoint_options)
  File "/u/home/s/spatel56/.conda/envs/ABEDEEPBE/lib/python3.6/site-packages/tensorflow/python/training/tracking/util.py", line 1345, in restore
    object_graph_string = reader.get_tensor(base.OBJECT_GRAPH_PROTO_KEY)
  File "/u/home/s/spatel56/.conda/envs/ABEDEEPBE/lib/python3.6/site-packages/tensorflow/python/training/py_checkpoint_reader.py", line 71, in get_tensor
    self, compat.as_bytes(tensor_str))
IndexError: Read less bytes than requested

I have tried multiple models and received similar results. Here are the steps to follow:

1.conda create -n ABEDEEPBE
2.conda activate ABEDEEPBE
3.conda install python=3.6.13
4.conda install numpy=1.19.5
5.conda install pandas
6.conda install cuda=11.2
7.conda install tensorflow
8.conda install cuDNN=8.1.0
9.pip install tensorflow==2.6.2
10. python DeepABE_8e.py

Love, ShivvyP <3

NahyeKim commented 4 days ago

@sungchulc Please help with this