Closed Yulmart closed 1 year ago
Hi @Yulmart .. can you share the command you used to run?
Hi @Yulmart .. can you share the command you used to run?
Hey, this is the code that we ran.
visual_bert = registry.get_model_class("visual_bert").from_pretrained("visual_bert.pretrained.coco")
Hi, don't know if this has been resolved, but I solved this issue by modifying the config file that came with the downloaded pretrained checkpoint. Find that config.yaml under your default cache folder and change any attributes with 'home/private/xxx/...' to your own directories.
Hey @junqi-jiang, thanks for the followup. We ended up changing the attributes manually as well.
Hi, met the same issue when trying below;
from mmf.models.vilbert import ViLBERT
model = ViLBERT.from_pretrained("vilbert.finetuned.hateful_memes.direct")
In my case I did the manual fixes as below to ~/.cache/torch/mmf/data/models/vilbert.finetuned.hateful_memes.direct/config.yaml
;
dataset_config:
hateful_memes:
# data_dir: /private/home/vedanuj/.cache/torch/mmf/data/datasets
data_dir: /absolute/path/to/.cache/torch/mmf/data/datasets
env:
# cache_dir: /private/home/vedanuj/.cache/torch/mmf
cache_dir: /absolute/path/to/.cache/torch/mmf
dataset_zoo: configs/zoo/datasets.yaml
model_zoo: configs/zoo/models.yaml
# data_dir: /private/home/vedanuj/.cache/torch/mmf/data
data_dir: /absolute/path/to/.cache/torch/mmf/data
# save_dir: /private/home/vedanuj/projects/save_dir
save_dir: /absolute/path/to/save_dir
❓ Questions and Help
My team and I were using the
visual_bert.pretrained.coco
model and ran into the following error.We noticed that the cached model configuration file
~/.cache/torch/mmf/data/models/visual_bert.pretrained.coco.defaults/config.yaml
contains absolute paths that were causing thePermissionError
. For example, there was an entry forcache_dir: /private/home/vedanuj/.cache/torch/mmf
. After changing these paths, the error went away. However. I'm not sure if this is a bug or if it's intended to be this way. Are we expected to change and override such paths whenever we download models?