Closed titaniumrain closed 4 years ago
You are mixing model
and checkpoint.resume_zoo
parameters. Your model
value needs to be visual_bert
and what you have specified in model currently will go as value to checkpoint.resume_zoo
ah... thanks!
Just followed the installation documentation to reproduce hateful meme baselines.
However, the system keeps on reporting the following error:
mmf_run config='projects/hateful_memes/configs/visual_bert/direct.yaml' model=visual_bert.finetuned.hateful_memes.direct dataset=hateful_memes Namespace(config_override=None, local_rank=None, opts=['config=projects/hateful_memes/configs/visual_bert/direct.yaml', 'model=visual_bert.finetuned.hateful_memes.direct', 'dataset=hateful_memes']) /FB/mmf/mmf/utils/configuration.py:274: UserWarning: No model named 'visual_bert.finetuned.hateful_memes.direct' has been registered warnings.warn(warning) Overriding option config to projects/hateful_memes/configs/visual_bert/direct.yaml Overriding option model to visual_bert.finetuned.hateful_memes.direct Overriding option datasets to hateful_memes Distributed Init (Rank 1): tcp://localhost:13493 Distributed Init (Rank 0): tcp://localhost:13493 Initialized Host 4abc53e653fc as Rank 1 Initialized Host 4abc53e653fc as Rank 0 Using seed 5545527 Logging to: ./save/logs/train_2020-05-24T00:06:05.log 2020-05-24T00:06:05 INFO: Loading datasets {'visual_bert': {'training_head_type': 'classification', 'num_labels': 2, 'losses': ['cross_entropy']}} visual_bert.finetuned.hateful_memes.direct Traceback (most recent call last): File "/opt/conda/bin/mmf_run", line 11, in
load_entry_point('mmf', 'console_scripts', 'mmf_run')()
File "/FB/mmf/mmf_cli/run.py", line 86, in run
nprocs=config.distributed.world_size,
File "/opt/conda/lib/python3.7/site-packages/torch/multiprocessing/spawn.py", line 171, in spawn
while not spawn_context.join():
File "/opt/conda/lib/python3.7/site-packages/torch/multiprocessing/spawn.py", line 118, in join
raise Exception(msg)
Exception:
-- Process 1 terminated with the following error: Traceback (most recent call last): File "/opt/conda/lib/python3.7/site-packages/torch/multiprocessing/spawn.py", line 19, in _wrap fn(i, *args) File "/FB/mmf/mmf_cli/run.py", line 51, in distributed_main main(configuration, init_distributed=True, predict=predict) File "/FB/mmf/mmf_cli/run.py", line 37, in main trainer.load() File "/FB/mmf/mmf/trainers/base_trainer.py", line 61, in load self.load_model_and_optimizer() File "/FB/mmf/mmf/trainers/base_trainer.py", line 106, in load_model_and_optimizer attributes = self.config.model_config[self.config.model] File "/opt/conda/lib/python3.7/site-packages/omegaconf/dictconfig.py", line 307, in getitem key=key, value=None, cause=e, type_override=ConfigKeyError File "/opt/conda/lib/python3.7/site-packages/omegaconf/base.py", line 96, in _format_and_raise type_override=type_override, File "/opt/conda/lib/python3.7/site-packages/omegaconf/_utils.py", line 464, in format_andraise raise(ex, cause) File "/opt/conda/lib/python3.7/site-packages/omegaconf/utils.py", line 457, in raise raise ex omegaconf.errors.ConfigKeyError: Key 'visual_bert.finetuned.hateful_memes.direct' in not in struct full_key: model_config.visual_bert.finetuned.hateful_memes.direct reference_type=Any object_type=dict
Not for sure where it went wrong?