KeyError when instantiating AutoModel.from_pretrained("songlab/gpn-brassicales")

#2
by emmazchen - opened

When I try to instantiate a pre-trained AutoModel, I get the following key error. I don't think I had the error with the same code a few days ago. Does anyone know what the issue is? Thank you!

File "/projects/projectx/model/model.py", line 29, in init
self.gpn_model = AutoModel.from_pretrained("songlab/gpn-brassicales")
File "/userx/mambaforge/projectx/lib/python3.10/site-packages/transformers/models/auto/auto_factory.py", line 456, in from_pretrained
config, kwargs = AutoConfig.from_pretrained(
File "/userx/mambaforge/projectx/lib/python3.10/site-packages/transformers/models/auto/configuration_auto.py", line 957, in from_pretrained
config_class = CONFIG_MAPPING[config_dict["model_type"]]
File "/userx/mambaforge/projectx/lib/python3.10/site-packages/transformers/models/auto/configuration_auto.py", line 671, in getitem
raise KeyError(key)
KeyError: 'ConvNet'

Song Lab @ Cal org

Hi! I suspect you need to first import gpn.model, which defines the ConvNet architecture.

gonzalobenegas changed discussion status to closed

Sign up or log in to comment