KaiyangZhou / Dassl.pytorch

A PyTorch toolbox for domain generalization, domain adaptation and semi-supervised learning.
MIT License
1.17k stars 169 forks source link

TypeError: unsupported format string passed to NoneType.__format__ #56

Closed lvpeng159 closed 1 year ago

lvpeng159 commented 1 year ago

Loading evaluator: Classification Traceback (most recent call last): File "tools/train.py", line 191, in main(args) File "tools/train.py", line 110, in main trainer.load_model(args.model_dir, epoch=args.load_epoch) File "d:\coop-main\dassl.pytorch-master\dassl\engine\trainer.py", line 199, in load_model f"Load {checkpoint} to {name} (epoch={epoch}, val_result={val_result:.1f})" TypeError: unsupported format string passed to NoneType.format

terminal input:python tools/train.py --root datasets/da/ --trainer SourceOnly --dataset-config-file configs/datasets/da/visda17.yaml --config-file configs/trainers/da/source_only/visda17.yaml --output-dir output/office31_test --source-domains real --target-domains real --eval-only --model-dir output/office31 --load-epoch 2

when i used .pth to test dataset, which occured this matter,help me plz

lvpeng159 commented 1 year ago

i have resolved this problem

lvpeng159 commented 1 year ago

hey,it is my pleasure to help you solve bug,the answer which you need in the picture

---Original--- From: @.> Date: Wed, Mar 22, 2023 16:05 PM To: @.>; Cc: @.>;"State @.>; Subject: Re: [KaiyangZhou/Dassl.pytorch] TypeError: unsupported format stringpassed to NoneType.format (Issue #56)

Hi, thanks for your sharing, I encountered this problem today when I first tried to run vanilla model on the pacs dataset. How you fixed this error? Thanks.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you modified the open/close state.Message ID: @.***>