cbrnr / sleepecg

Sleep stage detection using ECG
BSD 3-Clause "New" or "Revised" License
90 stars 23 forks source link

Loading a classifier prints a lot of warnings #145

Closed cbrnr closed 1 year ago

cbrnr commented 1 year ago

When loading a classifier that ships with SleepECG, a bunch of warnings are printed. I wonder if these warnings indicate real problems (in which case we should fix them) or if they can be ignored (in which case we should silence them).

WDYT @hofaflo?

import sleepecg

clf = sleepecg.load_classifier("wrn-gru-mesa", "SleepECG")

I tried changing the logger level after we import tensorflow, but that didn't seem to do anything. Setting the environment variable here (before the import) does get rid of all warnings except one message:

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

The remaining warning is an error:

2023-05-02 12:06:33.352056: E tensorflow/compiler/xla/stream_executor/cuda/cuda_driver.cc:266] failed call to cuInit: CUDA_ERROR_NO_DEVICE: no CUDA-capable device is detected

So setting the level to "3" gets rid of that one too.