yl-1993 / learn-to-cluster

Learning to Cluster Faces (CVPR 2019, CVPR 2020)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

issue in logger

mucongye opened this issue · comments

Traceback (most recent call last):
File "vegcn/main.py", line 104, in
main()
File "vegcn/main.py", line 100, in main
handler(model, cfg, logger)
File "/opt/ml/job/vegcn/train_gcn_v.py", line 35, in train_gcn_v
_single_train(model, dataset, cfg)
File "/opt/ml/job/vegcn/train_gcn_v.py", line 45, in _single_train
cfg.log_level)
File "/usr/local/lib/python3.6/site-packages/mmcv/runner/epoch_based_runner.py", line 182, in init
super().init(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/mmcv/runner/base_runner.py", line 92, in init
raise TypeError(f'logger must be a logging.Logger object, '
TypeError: logger must be a logging.Logger object, but got <class 'str'>

您好,main.py 90行创建的logger并未在后续的操作中使用,使用您的代码会出现上述问题,此时logger为str: ‘INFO’。我将train_gcn_v.py第44行的cfg.logger改为main.py 90创建的logger,代码可以正常运行

I think this has to do with the version of mmcv. I had a similiar warning and solved it like that. I dont know what you did because unfortunately I dont know chinese :D Bests!

Hi guys, thanks for the helpful advices!