Closed floschne closed 4 years ago
Can you add this before calling the build_dataset
:
from mmf.utils.env import setup_imports
setup_imports()
works like a charm :-) thank you very much! Can you recommend another tutorial where stuff like you comment get explained? :)
Can you recommend another tutorial where stuff like you comment get explained?
@floschne, you could read the source code to understand what setup_imports()
is doing. As shown here, it is doing 2 things:
pythia_path
and mmf_path
equal to the root_folder, which would be mmf/
in most cases.mmf/*
, which would register all the keys in those modules. Hence you wouldn't get this error anymore.
AssertionError: Key hateful_memes doesn't have a registered dataset builder
Hope this helps! :)
❓ Questions and Help
Hi, I'm currently trying to work through you tutorial on bootstrapping-a-multimodal-project-using-mmf.
I downloaded the dataset as described from https://www.drivendata.org/competitions/64/hateful-memes/data/.
But I'm encountering different problems when trying different versions of MMF:
Problem with the MMF package from pypi
Install procedure (on clean conda python 3.7 env):
pip install --upgrade --pre mmf
creating the dataset
mmf_convert_hm --zip_file ./XjiOc5ycDBRRNwbhRlgH.zip --password DontTellYou
This won't work because of the checksum so I bypass the checksum
mmf_convert_hm --zip_file ./XjiOc5ycDBRRNwbhRlgH.zip --password DontTellYou --bypass_checksum=1
This leads to the following error:
When I ignore this and try to visualize some samples like in the tutorial another error occurs:
What makes sense for me since the dataset was not created correctly as indicated by the checksum error and the 1st assertion error from above.
Problem with the up-to-date version of MMF from the master branch of this repo
Install procedure (on clean conda python 3.7 env in the root directory of the cloned repo):
pip install --editable .
Now I can successfully run
mmf_convert_hm --zip_file ./XjiOc5ycDBRRNwbhRlgH.zip --password DontTellYou
to create the dataset.Still, there is an error when executing the code to visualize some samples with the following error message:
Since I'm very new to MMF I would really appreciate you help :-)