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

no attribute '_TASKS_TO_AUTOMODELS' error #1852

Open
2 of 4 tasks
klutzDrawers opened this issue May 9, 2024 · 0 comments
Open
2 of 4 tasks

no attribute '_TASKS_TO_AUTOMODELS' error #1852

klutzDrawers opened this issue May 9, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@klutzDrawers
Copy link

System Info

Python: 3.10
Optimum: 1.18.0 (installed by using `pip install --upgrade --upgrade-strategy eager optimum[neuronx]`)
Platform: Ubuntu 20.04.6 LTS

Who can help?

@michaelbenayoun

Information

  • The official example scripts
  • My own modified scripts

Tasks

  • An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
  • My own task or dataset (give details below)

Reproduction (minimal, reproducible, runnable)

I'm following this link to convert HuggingFaceH4/zephyr-7b-beta into a neuron model. When I use this command optimum-cli export neuron -m HuggingFaceH4/zephyr-7b-beta --batch_size 4 --sequence_length 2048 --num_cores 2 --auto_cast_type bf16 ./zephyr-7b-beta-neuron, I encounter the following error:

Traceback (most recent call last):
  File "/home/ubuntu/anaconda3/envs/inf/bin/optimum-cli", line 8, in <module>
    sys.exit(main())
  File "/home/ubuntu/anaconda3/envs/inf/lib/python3.10/site-packages/optimum/commands/optimum_cli.py", line 153, in main
    register_optimum_cli_subcommand(command_or_command_info, parent_command=parent_command_instance)
  File "/home/ubuntu/anaconda3/envs/inf/lib/python3.10/site-packages/optimum/commands/optimum_cli.py", line 133, in register_optimum_cli_subcommand
    parent_command.register_subcommand(command_info)
  File "/home/ubuntu/anaconda3/envs/inf/lib/python3.10/site-packages/optimum/commands/base.py", line 135, in register_subcommand
    self.registered_subcommands.append(command_info.subcommand_class(self.subparsers, command=command_info))
  File "/home/ubuntu/anaconda3/envs/inf/lib/python3.10/site-packages/optimum/commands/export/neuronx.py", line 105, in __init__
    super().__init__(
  File "/home/ubuntu/anaconda3/envs/inf/lib/python3.10/site-packages/optimum/commands/base.py", line 87, in __init__
    self.parse_args(self.parser)
  File "/home/ubuntu/anaconda3/envs/inf/lib/python3.10/site-packages/optimum/commands/export/neuronx.py", line 112, in parse_args
    return parse_args_neuronx(parser)
  File "/home/ubuntu/anaconda3/envs/inf/lib/python3.10/site-packages/optimum/commands/export/neuronx.py", line 46, in parse_args_neuronx
    f" {str(list(TasksManager._TASKS_TO_AUTOMODELS.keys()))}."
AttributeError: type object 'TasksManager' has no attribute '_TASKS_TO_AUTOMODELS'

The error pops up regardless of optimum-cli commands, e.g., solely run optimum-cli.

Expected behavior

Expect optimum-cli can successfully convert zephyr as demo-ed in link.

@klutzDrawers klutzDrawers added the bug Something isn't working label May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant