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

SEDWrapper sed_model problem #54

Closed
Roon311 opened this issue Feb 24, 2024 · 1 comment
Closed

SEDWrapper sed_model problem #54

Roon311 opened this issue Feb 24, 2024 · 1 comment

Comments

@Roon311
Copy link

Roon311 commented Feb 24, 2024

I am trying to replicate the training on the esc-50 dataset; however, I am encountering the following error.

---------------------------------------------------------------------------
NotImplementedError                       Traceback (most recent call last)
[<ipython-input-32-8cfe0496a823>](https://localhost:8080/#) in <cell line: 3>()
      1 # Training the model
      2 # You can set different fold index by setting 'esc_fold' to any number from 0-4 in esc_config.py
----> 3 trainer.fit(model, audioset_data)

5 frames
[/usr/local/lib/python3.10/dist-packages/pytorch_lightning/trainer/configuration_validator.py](https://localhost:8080/#) in __verify_train_val_loop_configuration(trainer, model)
     79     # check legacy hooks are not present
     80     if callable(getattr(model, "training_epoch_end", None)):
---> 81         raise NotImplementedError(
     82             f"Support for `training_epoch_end` has been removed in v2.0.0. `{type(model).__name__}` implements this"
     83             " method. You can use the `on_train_epoch_end` hook instead. To access outputs, save them in-memory as"

NotImplementedError: Support for `training_epoch_end` has been removed in v2.0.0. `SEDWrapper` implements this method. You can use the `on_train_epoch_end` hook instead. To access outputs, save them in-memory as instance attributes. You can find migration examples in https://github.com/Lightning-AI/lightning/pull/16520.
@alexanderwerning
Copy link

Your pytorch-lightning version is newer, if you want to adapt the code the epoch_end functions need to be renamed:
Lightning-AI/pytorch-lightning#16520
and their parameters have to be removed/ the outputs stored as attributes in the object:
Lightning-AI/pytorch-lightning#17182

@Roon311 Roon311 closed this as completed Mar 10, 2024
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