TypeError: PrismConfig.__init__() missing required arguments 'biogpt_config' and 'perceiver_config' after latest commit

#8
by ezicStar - opened

Hello, I am having a type error with the last changes in prism.

Code Snippet:

from transformers import AutoModel
model = AutoModel.from_pretrained("paige-ai/Prism", trust_remote_code=True)

Error Traceback:

    model = AutoModel.from_pretrained("paige-ai/Prism", trust_remote_code=True)

  File "/mnt/bulk-sirius/juan/pap_screening/STAMP/.venv/lib/python3.11/site-packages/transformers/models/auto/auto_factory.py", line 531, in from_pretrained
    config, kwargs = AutoConfig.from_pretrained(

  File "/mnt/bulk-sirius/juan/pap_screening/STAMP/.venv/lib/python3.11/site-packages/transformers/models/auto/configuration_auto.py", line 1167, in from_pretrained
    return config_class.from_pretrained(pretrained_model_name_or_path, **kwargs)

  File "/mnt/bulk-sirius/juan/pap_screening/STAMP/.venv/lib/python3.11/site-packages/transformers/configuration_utils.py", line 573, in from_pretrained
    return cls.from_dict(config_dict, **kwargs)

  File "/mnt/bulk-sirius/juan/pap_screening/STAMP/.venv/lib/python3.11/site-packages/transformers/configuration_utils.py", line 770, in from_dict
    logger.info(f"Model config {config}")

  File "/mnt/bulk-sirius/juan/pap_screening/STAMP/.venv/lib/python3.11/site-packages/transformers/configuration_utils.py", line 802, in __repr__
    return f"{self.__class__.__name__} {self.to_json_string()}"

  File "/mnt/bulk-sirius/juan/pap_screening/STAMP/.venv/lib/python3.11/site-packages/transformers/configuration_utils.py", line 914, in to_json_string
    config_dict = self.to_diff_dict()

  File "/mnt/bulk-sirius/juan/pap_screening/STAMP/.venv/lib/python3.11/site-packages/transformers/configuration_utils.py", line 822, in to_diff_dict
    class_config_dict = self.__class__().to_dict() if not self.has_no_defaults_at_init else {}

TypeError: PrismConfig.__init__() missing 2 required positional arguments: 'biogpt_config' and 'perceiver_config'```

Environment:

    Python version: 3.11.2

    Transformers version: 4.52.3

    Torch version: 2.7.0

Recent Changes:
The issue began after the latest commit: 65d4d47e625ac852fb74adfb27a529a19389a60c

I'm following the usage steps provided in the README. Any insights or assistance would be appreciated. Thank you in advance :)

I have the same problem. Any progress ?

Paige AI org

Hi both, sorry for the late reply, I somehow missed this message.

Please check what version of transformers you’re using. The last supported version is 4.42.

Could you downgrade transformers in your local env where you’re trying to use Prism and try again? Let me know if that solves it or not.

If the issue is the version I can upgrade Prism to newer transformers in the next few weeks.

Best,
George

Hello George,
thank you for your response. Downgrading transformers solves the issue, so the update would be great for me as transformers 4.42 is not compatible with numpy v2.

Best,
Juan Pablo

Paige AI org

Thanks for confirming - I will push a fix next week. Sorry for inconvenience.

Sign up or log in to comment