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
I'm currently creating a loader for my own dataset that defines a custom MultiTrack class and am running into some issues with running test_full_dataset.py.
This hits an error for the test_load_mtracks function:
def test_load_mtracks(skip_remote, dataset):
if dataset is None or dataset._multitrack_class is None:
pytest.skip()
# run load
all_data = dataset.load_multitracks()
assert isinstance(all_data, dict)
> mtrack_ids = dataset.mm
E AttributeError: 'Dataset' object has no attribute 'mm'
It seems that the mm attribute is not currently defined in mirdata.core.Dataset so it's not inherited by my custom Dataset class. This error can be reproduced with other datasets that also define the _multitrack_class attribute, e.g. dagstuhl_choirset, so I don't think it's necessarily something I'm doing wrong with my loader.
Steps to reproduce
(Reproducing using the dagstuhl_choirset loader that is currently implemented in mirdata, but the error is the same).
Looking at the code, it seems like the mm attribute should be an iterable of multitrack IDs. A hacky fix that I'm using in my loader is to define the .mm attribute in my Dataset after calling super().__init__() and populating it with the multitrack IDs from the ._index attribute. E.g.:
Hi, many thanks for this great package.
I'm currently creating a loader for my own dataset that defines a custom
MultiTrack
class and am running into some issues with runningtest_full_dataset.py
.As requested in the contributor information document, I run the test for my full dataset:
This hits an error for the
test_load_mtracks
function:It seems that the
mm
attribute is not currently defined inmirdata.core.Dataset
so it's not inherited by my customDataset
class. This error can be reproduced with other datasets that also define the_multitrack_class
attribute, e.g.dagstuhl_choirset
, so I don't think it's necessarily something I'm doing wrong with my loader.Steps to reproduce
(Reproducing using the
dagstuhl_choirset
loader that is currently implemented inmirdata
, but the error is the same).Hacky fix
Looking at the code, it seems like the
mm
attribute should be an iterable of multitrack IDs. A hacky fix that I'm using in my loader is to define the.mm
attribute in myDataset
after callingsuper().__init__()
and populating it with the multitrack IDs from the._index
attribute. E.g.:This allows the test to pass, at least for my dataset.
System information
The text was updated successfully, but these errors were encountered: