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

Datasets with no general metadata file are not passing test_full_dataset.py #341

Closed
genisplaja opened this issue Nov 23, 2020 · 5 comments · Fixed by #342
Closed

Datasets with no general metadata file are not passing test_full_dataset.py #341

genisplaja opened this issue Nov 23, 2020 · 5 comments · Fixed by #342
Labels
bug Something isn't working

Comments

@genisplaja
Copy link
Collaborator

I came across this issue while testing the full Saraga Multitrack Dataset #340.
When testing the full dataset there is an error in this line in the test_validation function:

assert missing_files == {key:{} for key in dataset._index.keys() if not key == "version"}

And the error looks like this:

AssertionError: assert {'tracks': {}} == {'metadata': {}, 'tracks': {}}
E         Omitting 1 identical items, use -vv to show
E         Right contains 1 more item:
E         {'metadata': {}}
E         Use -v to get the full diff

I went to master and tested full dataset for different datasets just to check and I found that this error happens for all the datasets that do not have a general metadata file. I tested:

  • Mridangam Stroke (no metadata, failed)
  • IRMAS (no metadata, failed)
  • beatport Key (no metadata, failed)
  • Groove MIDI (has metadata, tests passed).

I also checked that my master branch is up-to-date and it is! Anyone has found this problem?

@genisplaja genisplaja added the bug Something isn't working label Nov 23, 2020
@magdalenafuentes
Copy link
Collaborator

Good catch! I think this is because initially metadata was required and then we decided not to. Check if this fixes it and I'll push a fix: in line 144 in utils.py change that line for if 'metadata' in dataset_index: and remove the metadata key from the json file (I'd test it locally but saraga is quite big)

@genisplaja
Copy link
Collaborator Author

Ok, I'll test it right now!

@magdalenafuentes
Copy link
Collaborator

did it work? I tried with giantsteps_key and it seems to work fine with the change

@genisplaja
Copy link
Collaborator Author

Yes sorry, it works now! I was trying it with the new Saraga Multitrack loader as well as for the datasets that didn't work this morning, but I guess that fixes it! No more errors on that matter as for now. Thanks!!
So now we must include to the documentation that a dataset that does not have general metadata file must not add the metadata field in the index, right? Will you remove the metadata key from all the indexes of the datasets with no metadata in the same push?

@magdalenafuentes
Copy link
Collaborator

Yes, I'll do that fix. I can add a check dataset_index['metadata'] is not None as there was before and in that case it would work even if the metadata key is present but is None

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants