Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AssertionError: either nn_name or nn_model_path has to be provided When running M2-Encode #8

Closed
zhengxingmao opened this issue Apr 8, 2024 · 2 comments

Comments

@zhengxingmao
Copy link

zhengxingmao commented Apr 8, 2024

Running the provided M2-Encode demo example results in an error.

Ant-Multi-Modal-Framework/prj/M2_Encoder# python3 run.py 
Traceback (most recent call last):
  File "/data/IdeaProjects/Ant-Multi-Modal-Framework/prj/M2_Encoder/run.py", line 17, in <module>
    encoder.warmup_local_model()
  File "/usr/local/lib/python3.10/dist-packages/nn4k/invoker/base.py", line 192, in warmup_local_model
    model_args, *_ = parser.parse_dict(self.init_args, allow_extra_keys=True)
  File "/usr/local/lib/python3.10/dist-packages/transformers/hf_argparser.py", line 373, in parse_dict
    obj = dtype(**inputs)
  File "<string>", line 7, in __init__
  File "/usr/local/lib/python3.10/dist-packages/nn4k/executor/base.py", line 209, in __post_init__
    self.nn_name is not None or self.nn_model_path is not None
AssertionError: either nn_name or nn_model_path has to be provided
@smtrnd
Copy link

smtrnd commented May 3, 2024

vi run.py
image
add nn_name in cfg

@HanxiaoZhang
Copy link
Collaborator

@zhengxingmao This issue can be resolved by installing a specific version using the command: pip install openspg-nn4k==0.0.2b3. We have already fixed it. https://github.com/alipay/Ant-Multi-Modal-Framework/blob/a6b512902b0e4d4721886e8751b8dcd5721f18d5/prj/M2_Encoder/requirements.txt#L24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants