ANTsX / ANTsPyNet

Pre-trained models and utilities for deep learning on medical images in Python
https://antspynet.readthedocs.io
Apache License 2.0
182 stars 28 forks source link

Warnings being treated as errors #83

Closed anant-dadu closed 6 months ago

anant-dadu commented 11 months ago

These warning terminates the whole process on google cloud (treated as error) while it continues process on my PC. Is there a way i can get rid of these warnings?

I tensorflow/core/platform/cpu_feature_guard.cc:193] 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.
W tensorflow/compiler/xla/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory
I tensorflow/compiler/xla/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.

I tried the following but none of them worked. import warnings warnings.filterwarnings("ignore")

ntustison commented 11 months ago

I don't believe there's anything I can do about those warnings as they originate from the underlying tensorflow. You might do a search and see if anybody else has encountered this issue.

cookpa commented 11 months ago

Haven't used GCP but maybe this will help:

import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = 2

You will need to do this before importing ants or tensorflow.

anant-dadu commented 11 months ago

Thanks! I will try this