| ```CODE: | |
| # Load model directly | |
| from transformers import AutoModel | |
| model = AutoModel.from_pretrained("nvidia/omnivinci", trust_remote_code=True, torch_dtype="auto") | |
| ``` | |
| ERROR: | |
| Traceback (most recent call last): | |
| File "/tmp/nvidia_omnivinci_1WDbFYo.py", line 16, in <module> | |
| model = AutoModel.from_pretrained("nvidia/omnivinci", trust_remote_code=True, torch_dtype="auto") | |
| File "/tmp/.cache/uv/environments-v2/8038d2e724327129/lib/python3.13/site-packages/transformers/models/auto/auto_factory.py", line 549, in from_pretrained | |
| config, kwargs = AutoConfig.from_pretrained( | |
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^ | |
| pretrained_model_name_or_path, | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| ...<4 lines>... | |
| **kwargs, | |
| ^^^^^^^^^ | |
| ) | |
| ^ | |
| File "/tmp/.cache/uv/environments-v2/8038d2e724327129/lib/python3.13/site-packages/transformers/models/auto/configuration_auto.py", line 1346, in from_pretrained | |
| config_class = get_class_from_dynamic_module( | |
| class_ref, pretrained_model_name_or_path, code_revision=code_revision, **kwargs | |
| ) | |
| File "/tmp/.cache/uv/environments-v2/8038d2e724327129/lib/python3.13/site-packages/transformers/dynamic_module_utils.py", line 604, in get_class_from_dynamic_module | |
| final_module = get_cached_module_file( | |
| repo_id, | |
| ...<8 lines>... | |
| repo_type=repo_type, | |
| ) | |
| File "/tmp/.cache/uv/environments-v2/8038d2e724327129/lib/python3.13/site-packages/transformers/dynamic_module_utils.py", line 427, in get_cached_module_file | |
| modules_needed = check_imports(resolved_module_file) | |
| File "/tmp/.cache/uv/environments-v2/8038d2e724327129/lib/python3.13/site-packages/transformers/dynamic_module_utils.py", line 260, in check_imports | |
| raise ImportError( | |
| ...<2 lines>... | |
| ) | |
| ImportError: This modeling file requires the following packages that were not found in your environment: einops, whisper. Run `pip install einops whisper` | |