Closed sbaete closed 4 months ago
Hi Steven,
thanks for bringing this up. I just relocated back to Leuven, so I don't have GPU server access right now (will change beginning of Sep). I just tried to replicate the problem on my M1 Mac with TF v2.13 using a prediction from nifti. There everything works fine, even with the latest TF version.
To further debug this, two questions:
pyapetnet_predict_from_nifti
and the demo data sets) Bests, Georg
Hey Georg,
Thank you for looking into this.
To answer your questions,
1) We use Ubuntu 22.04.2 LTS. Unfortunately, we don't have a CUDA GPU installed on this server
2) To avoid any other setup-issues causing problems, I went ahead and created a new anaconda-environment and followed the installation steps in the Readme.md, using the pip install. Then I cloned the repository to obtain the demo data and ran the command:
~/pyapetnetdebug/demo_data$ pyapetnet_predict_from_nifti brainweb_06_osem.nii brainweb_06_t1.nii S2_osem_b10_fdg_pe2i --show
I have attached a log of the whole installation process until I got to the error.
Steven
Hi Steven,
I just tested pyapetnet_predict_from_nifti
with pyapetnet v1.5.1 and tensorflow 2.13.
on Ubuntu 18.04 without GPU. For me everything works as expected and the output
looks correct.
So I am bit puzzled to understand what went wrong on your side. Did you have a look again?
(pyapetnet) gschra2@fermi:~/nge/pyapetnet/demo_data$ conda list | grep pyapetnet
# packages in environment at /users/nexuz/gschra2/.conda/envs/pyapetnet:
pyapetnet 1.5.1 pypi_0 pypi
(pyapetnet) gschra2@fermi:~/nge/pyapetnet/demo_data$ conda list | grep tensorflow
tensorflow 2.13.0 pypi_0 pypi
tensorflow-estimator 2.13.0 pypi_0 pypi
tensorflow-io-gcs-filesystem 0.34.0 pypi_0 pypi
pyapetnet) gschra2@fermi:~/nge/pyapetnet/demo_data$ pyapetnet_predict_from_nifti brainweb_06_osem.nii brainweb_06_t1.nii S2_osem_b10_fdg_pe2i
2023-09-14 16:26:30.377466: I tensorflow/tsl/cuda/cudart_stub.cc:28] Could not find cuda drivers on your machine, GPU will not be used.
2023-09-14 16:26:30.425998: I tensorflow/tsl/cuda/cudart_stub.cc:28] Could not find cuda drivers on your machine, GPU will not be used.
2023-09-14 16:26:30.426604: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2023-09-14 16:26:32.228709: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
WARNING:tensorflow:SavedModel saved prior to TF 2.5 detected when loading Keras model. Please ensure that you are saving the model with model.save() or tf.keras.models.save_model(), *NOT* tf.saved_model.save(). To confirm, there should be a file named "keras_metadata.pb" in the SavedModel directory.
/users/nexuz/gschra2/.conda/envs/pyapetnet/lib/python3.11/site-packages/keras/src/layers/core/lambda_layer.py:327: UserWarning: tensorflow.python.keras.utils.multi_gpu_utils is not loaded, but a Lambda layer uses it. It may cause errors.
function = cls._parse_function_from_config(
1/1 [==============================] - 8s 8s/step
should be fixed in v1.5.4
Hey Georg,
We have a new server, so I had to reinstall pyapetnet. I followed your instructions and used your environment.yml. However, the code crashed with the error below. It seems it is an incompatibility with newer versions of tensorflow. After downgrading to Tensorflow version 2.7.1, the code worked again.
Best regards,
Steven