PaddlePaddle / Paddle

PArallel Distributed Deep LEarning: Machine Learning Framework from Industrial Practice (『飞桨』核心框架,深度学习&机器学习高性能单机、分布式训练和跨平台部署)
http://www.paddlepaddle.org/
Apache License 2.0
22.3k stars 5.62k forks source link

paddle导入相关包之后logger无法使用 #68202

Open ariessweety07 opened 2 months ago

ariessweety07 commented 2 months ago

bug描述 Describe the Bug

ae8a21cb0bad90db4e56e67b72fd52e5 488d5df6d7d2a28050e892e8a226fe40

其他补充信息 Additional Supplementary Information

环境:paddle2onnx 1.2.7 paddlefsl 1.1.0 paddlenlp 3.0.0b0 paddlepaddle 3.0.0b1

gongel commented 2 months ago

可以用paddlenlp自带logger:

from paddlenlp.utils.log import logger
logger.info()
logger.debug()
logger.warning()
ariessweety07 commented 2 months ago

可以用paddlenlp自带logger:

from paddlenlp.utils.log import logger
logger.info()
logger.debug()
logger.warning()

File "/data2/wangyanan21/work/multi-query/baidu/icpd/prompt-serving/src/main.py", line 42, in logger.info() TypeError: call() missing 1 required positional argument: 'msg这个还是报错呢

ariessweety07 commented 2 months ago

可以用paddlenlp自带logger:

from paddlenlp.utils.log import logger
logger.info()
logger.debug()
logger.warning()

还有别的解决方法吗

ariessweety07 commented 2 months ago

可以用paddlenlp自带logger:

from paddlenlp.utils.log import logger
logger.info()
logger.debug()
logger.warning()

File "/data2/wangyanan21/work/multi-query/baidu/icpd/prompt-serving/src/main.py", line 113, in process_request logger.set_auto_logid() AttributeError: 'Logger' object has no attribute 'set_auto_logid'