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

Error during single dataset evaluation #3

Open
umariqb opened this issue Oct 22, 2021 · 1 comment
Open

Error during single dataset evaluation #3

umariqb opened this issue Oct 22, 2021 · 1 comment

Comments

@umariqb
Copy link

umariqb commented Oct 22, 2021

I tried running the evaluation only for the 3DPW dataset with the following command:

python scripts/spec_eval.py --cfg data/spec/checkpoints/spec_config.yaml --opts DATASET.VAL_DS 3dpw-test-cam 

But it gives the following error:

TypeError: test_step() missing 1 required positional argument: 'dataloader_nb'

Fixed it by giving a default value for dataloader_nb for the test_step function in trainer.py:

def test_step(self, batch, batch_nb, dataloader_nb=0):
    return self.validation_step(batch, batch_nb, dataloader_nb)

The error occurs because we don't append dataloader_idx to args in evaluation_loop.py:

if multiple_test_loaders or multiple_val_loaders:
    args.append(dataloader_idx)
@uyoung-jeong
Copy link

After fixing dataloader_nb=0, I got another error in spec/trainer.py

self.val_save_best_results(acc, ds_name)

AttributeError: 'dict' object has no attribute 'append'

I added an input argument ds_name=self.val_ds[0].dataset to prevent the error.

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