You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File "/home/verena/miniconda3/envs/py37-iml/lib/python3.7/site-packages/madmom/evaluation/chords.py", line 753, in __init__
self.ann_chords = merge_chords(encode(annotations))
File "/home/verena/miniconda3/envs/py37-iml/lib/python3.7/site-packages/madmom/evaluation/chords.py", line 66, in encode
encoded_chords['start'] = chord_labels['start']
TypeError: string indices must be integers
I suggest either an update to the documentation or calling load_chords inside ChordEvaluation in case you expect the user to pass the files, but from how this test is implemented I assume the implementation is correct and documentations needs an update.
If you agree I can take care of fixing it! (I didn't take a very close look yet but it seems not all Evaluation classes are implemented the same way, but at least KeyEvaluation seems to have the same issue)
The text was updated successfully, but these errors were encountered:
expectopatronum
changed the title
Confusion when using ChordEvaluation
Confusion when using class ChordEvaluation
Sep 8, 2020
Sorry for the late response, yes the documentation should be updated. However, I would also merge a patch which adds loading of chords in a try/except block for convenience — but still the docs should be updated to reflect this as well.
I see that we did not take too much care about the docstrings all over the whole evaluation module. We should fix the other classes as well.
Also late to the party! Thanks for finding this. Yes, the docs are wrong and should be updated. In a next step, we could change all eval classes so that they accept filenames as well.
Expected behaviour
When looking at the docs for
ChordEvaluation
I expected that I need to pass the file paths to the annotation and prediction files.The doc says:
Actual behaviour
It actually expects
like
encode()
for example.Steps needed to reproduce the behaviour
results in
the following works:
I suggest either an update to the documentation or calling
load_chords
insideChordEvaluation
in case you expect the user to pass the files, but from how this test is implemented I assume the implementation is correct and documentations needs an update.If you agree I can take care of fixing it! (I didn't take a very close look yet but it seems not all Evaluation classes are implemented the same way, but at least
KeyEvaluation
seems to have the same issue)The text was updated successfully, but these errors were encountered: