[Error]: The model class you are passing has a `config_class'
#1
by
brainer
- opened
ValueError Traceback (most recent call last)
<ipython-input-15-476be4fa303b> in <cell line: 2>()
1 from transformers import AutoModel
----> 2 flowformer = AutoModel.from_pretrained("matth/flowformer", trust_remote_code=True)
3
4 output = flowformer(x, markers=["TARGET"])
1 frames
/usr/local/lib/python3.10/dist-packages/transformers/models/auto/auto_factory.py in from_pretrained(cls, pretrained_model_name_or_path, *model_args, **kwargs)
553 model_class.register_for_auto_class(cls.__name__)
554 else:
--> 555 cls.register(config.__class__, model_class, exist_ok=True)
556 return model_class.from_pretrained(
557 pretrained_model_name_or_path, *model_args, config=config, **hub_kwargs, **kwargs
/usr/local/lib/python3.10/dist-packages/transformers/models/auto/auto_factory.py in register(cls, config_class, model_class, exist_ok)
579 """
580 if hasattr(model_class, "config_class") and model_class.config_class != config_class:
--> 581 raise ValueError(
582 "The model class you are passing has a `config_class` attribute that is not consistent with the "
583 f"config class you passed (model has {model_class.config_class} and you passed {config_class}. Fix "
ValueError: The model class you are passing has a `config_class` attribute that is not consistent with the config class you passed (model has None and you passed <class 'transformers_modules.matth.flowformer.172f89c4436997765797c4b4859bceafc5d5e03f.configuration_flowformer.FlowformerConfig'>. Fix one of those so they match!
brainer
changed discussion title from
[Error]: The model class you are passing has a `config_class
to [Error]: The model class you are passing has a `config_class'
It should be fixed. Thanks!
matth
changed discussion status to
closed