Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

模型训练跑过一轮后出现错误:ERROR:ignite.engine.engine.Engine:Engine run is terminating due to exception: 'int' object is not callable #27

Open
JL0424 opened this issue Jul 30, 2024 · 2 comments

Comments

@JL0424
Copy link

JL0424 commented Jul 30, 2024

具体的错误信息如下:
ERROR:ignite.engine.engine.Engine:Engine run is terminating due to exception: 'int' object is not callable
Traceback (most recent call last):
File "./tools/main.py", line 117, in
main()
File "./tools/main.py", line 105, in main
do_train(cfg,
File "/home/hk/student/jl/ReID-Survey-master/./tools/train.py", line 166, in do_train
trainer.run(data_loader['train'], max_epochs=epochs)
File "/home/hk/anaconda3/envs/jl/lib/python3.8/site-packages/ignite/engine/engine.py", line 889, in run
return self._internal_run()
File "/home/hk/anaconda3/envs/jl/lib/python3.8/site-packages/ignite/engine/engine.py", line 932, in _internal_run
return next(self._internal_run_generator)
File "/home/hk/anaconda3/envs/jl/lib/python3.8/site-packages/ignite/engine/engine.py", line 990, in _internal_run_as_gen
self._handle_exception(e)
File "/home/hk/anaconda3/envs/jl/lib/python3.8/site-packages/ignite/engine/engine.py", line 644, in _handle_exception
raise e
File "/home/hk/anaconda3/envs/jl/lib/python3.8/site-packages/ignite/engine/engine.py", line 962, in _internal_run_as_gen
self._fire_event(Events.EPOCH_COMPLETED)
File "/home/hk/anaconda3/envs/jl/lib/python3.8/site-packages/ignite/engine/engine.py", line 431, in _fire_event
func(*first, *(event_args + others), **kwargs)
File "/home/hk/anaconda3/envs/jl/lib/python3.8/site-packages/ignite/handlers/checkpoint.py", line 1009, in call
super(ModelCheckpoint, self).call(engine)
File "/home/hk/anaconda3/envs/jl/lib/python3.8/site-packages/ignite/handlers/checkpoint.py", line 408, in call
priority = self.score_function(engine)
TypeError: 'int' object is not callable
这是什么原因呢,请各位大佬帮忙看一下

@mango2steen
Copy link

我刚也出现这个错误,ignite换个版本试试

@JL0424
Copy link
Author

JL0424 commented Aug 5, 2024

我刚也出现这个错误,ignite换个版本试试

谢谢,实现了,确实是这个原因

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants