HYsxe / PRINT

32 stars 3 forks source link

Error Loading TFBS model #4

Closed plantformatics closed 1 year ago

plantformatics commented 1 year ago

I am running into an error while loading the h5 TFBS model. The command giving the error is as follows:

h5Path <- "../../data/TFBSPrediction/TFBS_model.h5" TFBindingModel(obj) <- loadTFBSModel(h5Path)

The error I received is:


WARNING: No preset parameters were found for the device that Open MPI detected:

Local host: a3-24 Device name: mlx5_0 Device vendor ID: 0x02c9 Device vendor part ID: 4123

Default device parameters will be used, which may result in lower performance. You can edit any of the files specified by the btl_openib_device_param_files MCA parameter to set values for your device.

NOTE: You can turn off this warning by setting the MCA parameter btl_openib_warn_no_device_params_found to 0.


A process has executed an operation involving a call to the "fork()" system call to create a child process. Open MPI is currently operating in a condition that could result in memory corruption or other system errors; your job may hang, crash, or produce silent data corruption. The use of fork() (or system() or other calls that create child processes) is strongly discouraged.

The process that invoked fork was:

Local host: [[2913,1],0] (PID 21235)

If you are absolutely sure that your application will successfully and correctly survive a call to fork(), you may disable this warning by setting the mpi_warn_on_fork MCA parameter to 0.

2023-04-12 16:49:34.848436: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1 Error: ValueError: Unknown layer: Functional Execution halted

Any advice on resolving this? I checked the LoadTFBSModel function and I don't see anything related to MPI so I am a bit confused why this error is coming up. Thank you!

HYsxe commented 1 year ago

Hi! Just saw this thread. What is the version of keras you have in R? This could be because the model was trained on one version of Keras and loaded into another version of Keras. I have keras==2.4.0 in R

plantformatics commented 1 year ago

The Keras version I have installed is keras_2.11.1. I can try rolling it back to 2.4.0 - I will update once I give this a go unless you have another recommendation.

plantformatics commented 1 year ago

Can you let me know which version of tensorflow the TFBS models were constructed with? Both keras and tensorflow versions need to match precisely according to this

HYsxe commented 1 year ago

Hi! So in my conda environment where I trained the model the tensorflow version was 2.6.2. It could be a bit confusing because when you try to load it into R, R might be using a different version. When I do library(tensorflow) and packageVersion("tensorflow") it says 2.5.0 and if I use tf_version() it says 2.10. I think one of these three should work. I think this is very useful feedback for us and in the future we will try to avoid this kind of interfacing between python and R and do all the coding in Python. Apologies for the inconvenience!