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

Missing 1 required positional argument: 'task' #8

Closed
dcavadia opened this issue Dec 9, 2022 · 4 comments
Closed

Missing 1 required positional argument: 'task' #8

dcavadia opened this issue Dec 9, 2022 · 4 comments

Comments

@dcavadia
Copy link

dcavadia commented Dec 9, 2022

Hello, im following the tutorial but when training the model it trows an error when using the PyTorch Lightning method

image
image

What could it be?

@nateraw
Copy link
Owner

nateraw commented Dec 9, 2022

Looks like torchmetrics updated and you have to provide a "task" now.

https://torchmetrics.readthedocs.io/en/stable/classification/accuracy.html#accuracy

If your classes list is >2, you should use "multiclass"

So wherever the Accuracy class is created, you do Accuracy(task='multiclass')

Will fix when I get the chance - thanks for the bug report!

@dcavadia
Copy link
Author

dcavadia commented Dec 9, 2022

oh thanks for the help it did solve the problem

@dcavadia dcavadia closed this as completed Dec 9, 2022
@nateraw
Copy link
Owner

nateraw commented Dec 9, 2022

Going to reopen and leave it open til I issues a fix :)

@nateraw nateraw reopened this Dec 9, 2022
@nateraw
Copy link
Owner

nateraw commented Dec 9, 2022

Ok, fixed!

@nateraw nateraw closed this as completed Dec 9, 2022
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