You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
当我采用如下配置时:
from mmengine.config import read_base
from opencompass.models import HuggingFacewithChatTemplate
from configs.base_config import MODEL_NAME
with read_base():
from opencompass.configs.datasets.math.math_500_gen import math_datasets
datasets = math_datasets
models = [
dict(
type=HuggingFacewithChatTemplate,
abbr='qwen2.5-1.5b-instruct-hf',
path=MODEL_NAME,
max_out_len=4096,
batch_size=8,
run_cfg=dict(num_gpus=1),
)
]
报错日志如下:
08/15 07:41:18 - OpenCompass - INFO - Task [qwen2.5-1.5b-instruct-hf/math-500]
2025-08-15 07:41:21.432593: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:467] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
E0000 00:00:1755243681.453652 23237 cuda_dnn.cc:8579] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
E0000 00:00:1755243681.460138 23237 cuda_blas.cc:1407] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
W0000 00:00:1755243681.475862 23237 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once.
W0000 00:00:1755243681.475969 23237 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once.
W0000 00:00:1755243681.476013 23237 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once.
W0000 00:00:1755243681.476055 23237 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once.
Traceback (most recent call last):
File "/usr/local/lib/python3.11/dist-packages/huggingface_hub/utils/_http.py", line 409, in hf_raise_for_status
response.raise_for_status()
File "/usr/local/lib/python3.11/dist-packages/requests/models.py", line 1024, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://huggingface.co/configs.base_config.MODEL_PATH/resolve/main/config.json
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.11/dist-packages/transformers/utils/hub.py", line 479, in cached_files
hf_hub_download(
File "/usr/local/lib/python3.11/dist-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/huggingface_hub/file_download.py", line 1010, in hf_hub_download
return _hf_hub_download_to_cache_dir(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/huggingface_hub/file_download.py", line 1117, in _hf_hub_download_to_cache_dir
_raise_on_head_call_error(head_call_error, force_download, local_files_only)
File "/usr/local/lib/python3.11/dist-packages/huggingface_hub/file_download.py", line 1658, in _raise_on_head_call_error
raise head_call_error
File "/usr/local/lib/python3.11/dist-packages/huggingface_hub/file_download.py", line 1546, in _get_metadata_or_catch_error
metadata = get_hf_file_metadata(
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/huggingface_hub/file_download.py", line 1463, in get_hf_file_metadata
r = _request_wrapper(
^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/huggingface_hub/file_download.py", line 286, in _request_wrapper
response = _request_wrapper(
^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/huggingface_hub/file_download.py", line 310, in _request_wrapper
hf_raise_for_status(response)
File "/usr/local/lib/python3.11/dist-packages/huggingface_hub/utils/_http.py", line 459, in hf_raise_for_status
raise _format(RepositoryNotFoundError, message, response) from e
huggingface_hub.errors.RepositoryNotFoundError: 401 Client Error. (Request ID: Root=1-689ee4a5-5db9d2a24b8cb4d8238abfe5;272e2ae0-68a0-4594-8bf8-9e50a0f2d3e5)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.11/dist-packages/opencompass/tasks/openicl_infer.py", line 161, in
inferencer.run()
File "/usr/local/lib/python3.11/dist-packages/opencompass/tasks/openicl_infer.py", line 73, in run
self.model = build_model_from_cfg(model_cfg)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/opencompass/utils/build.py", line 24, in build_model_from_cfg
return MODELS.build(model_cfg)
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/mmengine/registry/registry.py", line 570, in build
return self.build_func(cfg, *args, **kwargs, registry=self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/mmengine/registry/build_functions.py", line 121, in build_from_cfg
obj = obj_cls(**args) # type: ignore
^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/opencompass/models/huggingface_above_v4_33.py", line 175, in init
self.max_seq_len = _get_possible_max_seq_len(max_seq_len, path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/opencompass/models/huggingface_above_v4_33.py", line 50, in _get_possible_max_seq_len
config = AutoConfig.from_pretrained(path, trust_remote_code=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/transformers/models/auto/configuration_auto.py", line 1250, in from_pretrained
config_dict, unused_kwargs = PretrainedConfig.get_config_dict(pretrained_model_name_or_path, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/transformers/configuration_utils.py", line 649, in get_config_dict
config_dict, kwargs = cls._get_config_dict(pretrained_model_name_or_path, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/transformers/configuration_utils.py", line 708, in _get_config_dict
resolved_config_file = cached_file(
^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/transformers/utils/hub.py", line 321, in cached_file
file = cached_files(path_or_repo_id=path_or_repo_id, filenames=[filename], **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/transformers/utils/hub.py", line 511, in cached_files
raise OSError(
OSError: configs.base_config.MODEL_PATH is not a local folder and is not a valid model identifier listed on 'https://huggingface.co/models'
If this is a private repository, make sure to pass a token having permission to this repo either by logging in with hf auth login or by passing token=<your_token>
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
当我采用如下配置时:
from mmengine.config import read_base
from opencompass.models import HuggingFacewithChatTemplate
from configs.base_config import MODEL_NAME
with read_base():
from opencompass.configs.datasets.math.math_500_gen import math_datasets
datasets = math_datasets
models = [
dict(
type=HuggingFacewithChatTemplate,
abbr='qwen2.5-1.5b-instruct-hf',
path=MODEL_NAME,
max_out_len=4096,
batch_size=8,
run_cfg=dict(num_gpus=1),
)
]
报错日志如下:
08/15 07:41:18 - OpenCompass - INFO - Task [qwen2.5-1.5b-instruct-hf/math-500]
2025-08-15 07:41:21.432593: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:467] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
E0000 00:00:1755243681.453652 23237 cuda_dnn.cc:8579] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
E0000 00:00:1755243681.460138 23237 cuda_blas.cc:1407] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
W0000 00:00:1755243681.475862 23237 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once.
W0000 00:00:1755243681.475969 23237 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once.
W0000 00:00:1755243681.476013 23237 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once.
W0000 00:00:1755243681.476055 23237 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once.
Traceback (most recent call last):
File "/usr/local/lib/python3.11/dist-packages/huggingface_hub/utils/_http.py", line 409, in hf_raise_for_status
response.raise_for_status()
File "/usr/local/lib/python3.11/dist-packages/requests/models.py", line 1024, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://huggingface.co/configs.base_config.MODEL_PATH/resolve/main/config.json
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.11/dist-packages/transformers/utils/hub.py", line 479, in cached_files
hf_hub_download(
File "/usr/local/lib/python3.11/dist-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/huggingface_hub/file_download.py", line 1010, in hf_hub_download
return _hf_hub_download_to_cache_dir(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/huggingface_hub/file_download.py", line 1117, in _hf_hub_download_to_cache_dir
_raise_on_head_call_error(head_call_error, force_download, local_files_only)
File "/usr/local/lib/python3.11/dist-packages/huggingface_hub/file_download.py", line 1658, in _raise_on_head_call_error
raise head_call_error
File "/usr/local/lib/python3.11/dist-packages/huggingface_hub/file_download.py", line 1546, in _get_metadata_or_catch_error
metadata = get_hf_file_metadata(
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/huggingface_hub/file_download.py", line 1463, in get_hf_file_metadata
r = _request_wrapper(
^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/huggingface_hub/file_download.py", line 286, in _request_wrapper
response = _request_wrapper(
^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/huggingface_hub/file_download.py", line 310, in _request_wrapper
hf_raise_for_status(response)
File "/usr/local/lib/python3.11/dist-packages/huggingface_hub/utils/_http.py", line 459, in hf_raise_for_status
raise _format(RepositoryNotFoundError, message, response) from e
huggingface_hub.errors.RepositoryNotFoundError: 401 Client Error. (Request ID: Root=1-689ee4a5-5db9d2a24b8cb4d8238abfe5;272e2ae0-68a0-4594-8bf8-9e50a0f2d3e5)
Repository Not Found for url: https://huggingface.co/configs.base_config.MODEL_PATH/resolve/main/config.json.
Please make sure you specified the correct
repo_idandrepo_type.If you are trying to access a private or gated repo, make sure you are authenticated. For more details, see https://huggingface.co/docs/huggingface_hub/authentication
User Access Token "token" is expired
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.11/dist-packages/opencompass/tasks/openicl_infer.py", line 161, in
inferencer.run()
File "/usr/local/lib/python3.11/dist-packages/opencompass/tasks/openicl_infer.py", line 73, in run
self.model = build_model_from_cfg(model_cfg)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/opencompass/utils/build.py", line 24, in build_model_from_cfg
return MODELS.build(model_cfg)
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/mmengine/registry/registry.py", line 570, in build
return self.build_func(cfg, *args, **kwargs, registry=self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/mmengine/registry/build_functions.py", line 121, in build_from_cfg
obj = obj_cls(**args) # type: ignore
^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/opencompass/models/huggingface_above_v4_33.py", line 175, in init
self.max_seq_len = _get_possible_max_seq_len(max_seq_len, path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/opencompass/models/huggingface_above_v4_33.py", line 50, in _get_possible_max_seq_len
config = AutoConfig.from_pretrained(path, trust_remote_code=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/transformers/models/auto/configuration_auto.py", line 1250, in from_pretrained
config_dict, unused_kwargs = PretrainedConfig.get_config_dict(pretrained_model_name_or_path, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/transformers/configuration_utils.py", line 649, in get_config_dict
config_dict, kwargs = cls._get_config_dict(pretrained_model_name_or_path, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/transformers/configuration_utils.py", line 708, in _get_config_dict
resolved_config_file = cached_file(
^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/transformers/utils/hub.py", line 321, in cached_file
file = cached_files(path_or_repo_id=path_or_repo_id, filenames=[filename], **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/transformers/utils/hub.py", line 511, in cached_files
raise OSError(
OSError: configs.base_config.MODEL_PATH is not a local folder and is not a valid model identifier listed on 'https://huggingface.co/models'
If this is a private repository, make sure to pass a token having permission to this repo either by logging in with
hf auth loginor by passingtoken=<your_token>看起来是把变量的签名configs.base_config.MODEL_PATH转换成字符串了?有没有办法传入变量?
Beta Was this translation helpful? Give feedback.
All reactions