QData/spacetimeformer

TypeError: accuracy() missing 1 required positional argument: 'task'

Harishu1998 opened this issue · 1 comments

I am using model : spacetimeformer and dataset: asos.

When I run python train.py spacetimeformer asos --run_name test --gpus 0 I get this error.
TypeError: accuracy() missing 1 required positional argument: 'task'

Task variable seems to be a Literal with the following values
task: Literal["binary", "multiclass", "multilabel"],

But I am performing a timeseries forecasting so which Task value should I use?

Exact error location :

spacetimeformer\spacetimeformer\spacetimeformer_model\spacetimeformer_model.py", line 219, in classification_loss 
    acc = torchmetrics.functional.accuracy(
TypeError: accuracy() missing 1 required positional argument: 'task'

The accuracy function of torchmetrics has a big change from v0.10 to v0.11, please refer to the following link:
https://torchmetrics.readthedocs.io/en/v0.10.0/classification/accuracy.html

You can just reinstall torchmetrics to version 0.10 to make the code runs.