1

我在 TensorFlow 的 Ludwig 训练中遇到了这个问题。

C:\Users\FRT\Desktop\workspace\pipeline-builder-ide\python\python37\lib\site- 
 packages\typeguard__init.py:906: UserWarning: no type annotations present -- not 
typechecking tensorflow_addons.layers.max_unpooling_2d.MaxUnpooling2D.init__ warn('no type 
annotations present -- not typechecking {}'.format(function_name(func)))

Ludwig 模型已经过训练,但我想隐藏此警告。我努力了

warnings.filterwarnings("ignore")
warnings.warn = warn
warnings.simplefilter(action='ignore')
logging.getLogger('ludwig').disabled = True
logging.getLogger('typeguard').disabled = True
logging.getLogger('tensorflow').disabled = True
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'

我已经一一尝试了所有这些解决方案,但没有运气。仍会打印警告。如何隐藏该警告,为什么会出现此警告?

4

0 回答 0