PinataFarms/DAD-3DHeads

Request for Assistance with Error in Code - TypeError: 'TensorBoardLogger' object is not iterable

blueorca21 opened this issue · 6 comments

Hi,

I encountered an error in the "train.py" and "flame_lightning_model.py" files. The error message I received is as follows:

"TypeError: 'TensorBoardLogger' object is not iterable."

I am currently unable to proceed with my work due to this issue, and I would greatly appreciate your guidance in resolving it. Could you kindly provide some insights on how I can fix this error?

Hi,
I have the same issue when running train.py.
Could you please kindly tell me how to fix it?
Thank you.

Hi @blueorca21 @Bamboo429,

could you please elaborate?

File "train.py", line 48, in
run_experiment()
File "/home/ria/anaconda3/envs/raft/lib/python3.8/site-packages/hydra/main.py", line 49, in decorated_main
_run_hydra(
File "/home/ria/anaconda3/envs/raft/lib/python3.8/site-packages/hydra/_internal/utils.py", line 367, in _run_hydra
run_and_report(
File "/home/ria/anaconda3/envs/raft/lib/python3.8/site-packages/hydra/_internal/utils.py", line 214, in run_and_report
raise ex
File "/home/ria/anaconda3/envs/raft/lib/python3.8/site-packages/hydra/_internal/utils.py", line 211, in run_and_report
return func()
File "/home/ria/anaconda3/envs/raft/lib/python3.8/site-packages/hydra/_internal/utils.py", line 368, in
lambda: hydra.run(
File "/home/ria/anaconda3/envs/raft/lib/python3.8/site-packages/hydra/_internal/hydra.py", line 110, in run
_ = ret.return_value
File "/home/ria/anaconda3/envs/raft/lib/python3.8/site-packages/hydra/core/utils.py", line 233, in return_value
raise self._return_value
File "/home/ria/anaconda3/envs/raft/lib/python3.8/site-packages/hydra/core/utils.py", line 160, in run_job
ret.return_value = task_function(task_cfg)
File "train.py", line 44, in run_experiment
train(config)
File "train.py", line 24, in train
dad3d_trainer.fit()
File "/mnt/d/desktop/study/DAD-3DHeads/model_training/train/trainer.py", line 58, in fit
self.local_train(test_fn=test_fn)
File "/mnt/d/desktop/study/DAD-3DHeads/model_training/train/trainer.py", line 24, in local_train
self.trainer.fit(self.dad3d_net)
File "/home/ria/anaconda3/envs/raft/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 771, in fit
self._call_and_handle_interrupt(
File "/home/ria/anaconda3/envs/raft/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 724, in _call_and_handle_interrupt
return trainer_fn(*args, **kwargs)
File "/home/ria/anaconda3/envs/raft/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 812, in _fit_impl
results = self._run(model, ckpt_path=self.ckpt_path)
File "/home/ria/anaconda3/envs/raft/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 1237, in _run
results = self._run_stage()
File "/home/ria/anaconda3/envs/raft/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 1324, in _run_stage
return self._run_train()
File "/home/ria/anaconda3/envs/raft/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 1343, in _run_train
self._pre_training_routine()
File "/home/ria/anaconda3/envs/raft/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 1337, in _pre_training_routine
self._call_lightning_module_hook("on_pretrain_routine_start")
File "/home/ria/anaconda3/envs/raft/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 1596, in _call_lightning_module_hook
output = fn(*args, **kwargs)
File "/mnt/d/desktop/study/DAD-3DHeads/model_training/train/flame_lightning_model.py", line 248, in on_pretrain_routine_start
for logger in self.logger:
TypeError: 'TensorBoardLogger' object is not iterable

I have the same problem here._

could you please tell me the version of your tensorboard ? It might help.

it's tensorboard==2.12.0 in my env for this project. hope this helps.