I think it's generally good practice for libraries to avoid potentially overriding user-defined config. I would recommend putting both of these inside a conditional so that it only sets the environment variable if it doesn't already exist. Something like:
if "TF_CPP_MIN_LOG_LEVEL" not in os.environ:
os.environ["TF_CPP_MIN_LOG_LEVEL"] = "2"
This would let the user still set the log level to include debug messages if they were having issues with something (I've run into this problem before elsewhere!)
In
model.py
andutil.py
you're creating an environment variable to set a tensorflow log level:https://github.com/VegeWaterDynamics/motrainer/blob/f74acd8c44cc0be7539095c8a6ab4c0c1560f6e4/motrainer/model.py#L12
https://github.com/VegeWaterDynamics/motrainer/blob/f74acd8c44cc0be7539095c8a6ab4c0c1560f6e4/motrainer/util.py#L11
I think it's generally good practice for libraries to avoid potentially overriding user-defined config. I would recommend putting both of these inside a conditional so that it only sets the environment variable if it doesn't already exist. Something like:
This would let the user still set the log level to include debug messages if they were having issues with something (I've run into this problem before elsewhere!)