Hi! I encountered an issue while trying to run simple_workflow.ipynb.
During the execution of trainer.fit(model=l2v, datamodule=datamodule), I received the following error message:
TypeError: on_train_epoch_end() missing 1 required positional argument: 'output'
However, in the TransformerEncoder, I noticed the relevant code snippet:
def on_train_epoch_end(self, output):
I suspect this error might be due to the failure to correctly pass the output parameter. I have reviewed the code and ensured that the correct parameter is provided when calling the on_train_epoch_end() method.
Could you please assist me in resolving this issue? If further information or code snippets are required, please feel free to let me know. Thank you!
File ~/anaconda3/envs/folder/lib/python3.9/site-packages/pytorch_lightning/loops/fit_loop.py:373, in _FitLoop.on_advance_end(self)
368 # call train epoch end hooks
369 # we always call callback hooks first, but here we need to make an exception for the callbacks that
370 # monitor a metric, otherwise they wouldn't be able to monitor a key logged in
371 # LightningModule.on_train_epoch_end
372 call._call_callback_hooks(trainer, \"on_train_epoch_end\", monitoring_callbacks=False)
--> 373 call._call_lightning_module_hook(trainer, \"on_train_epoch_end\")
374 call._call_callback_hooks(trainer, \"on_train_epoch_end\", monitoring_callbacks=True)
376 trainer._logger_connector.on_epoch_end()
Hi! I encountered an issue while trying to run
simple_workflow.ipynb
.During the execution of
trainer.fit(model=l2v, datamodule=datamodule)
, I received the following error message:TypeError: on_train_epoch_end() missing 1 required positional argument: 'output'
However, in the
TransformerEncoder
, I noticed the relevant code snippet:def on_train_epoch_end(self, output):
I suspect this error might be due to the failure to correctly pass the output parameter. I have reviewed the code and ensured that the correct parameter is provided when calling the on_train_epoch_end() method.
Could you please assist me in resolving this issue? If further information or code snippets are required, please feel free to let me know. Thank you!