eval-scope
eval-scope copied to clipboard
不能加载本地模型
commad:
python llmuses/run.py \
--model-type mistral-7b-instruct-v2 \
--model ../Chinese-LLM-Chat/models/Mistral-7B-Instruct-v0.2 \
--datasets arc \
--dataset-hub Local \
--dataset-dir ../opencompass/data/data/ARC
error:
2024-04-15 14:52:39,092 - modelscope - INFO - Loading done! Current index file version is 1.13.3, with md5 12d62aa670b326cc4206e2bf397648b0 and a total number of 972 components indexed
Traceback (most recent call last):
File "/home/ybZhang/miniconda3/envs/glm-m/lib/python3.8/site-packages/urllib3/connection.py", line 203, in _new_conn
sock = connection.create_connection(
File "/home/ybZhang/miniconda3/envs/glm-m/lib/python3.8/site-packages/urllib3/util/connection.py", line 60, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
File "/home/ybZhang/miniconda3/envs/glm-m/lib/python3.8/socket.py", line 918, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/ybZhang/miniconda3/envs/glm-m/lib/python3.8/site-packages/urllib3/connectionpool.py", line 790, in urlopen
response = self._make_request(
File "/home/ybZhang/miniconda3/envs/glm-m/lib/python3.8/site-packages/urllib3/connectionpool.py", line 491, in _make_request
raise new_e
File "/home/ybZhang/miniconda3/envs/glm-m/lib/python3.8/site-packages/urllib3/connectionpool.py", line 467, in _make_request
self._validate_conn(conn)
File "/home/ybZhang/miniconda3/envs/glm-m/lib/python3.8/site-packages/urllib3/connectionpool.py", line 1096, in _validate_conn
conn.connect()
File "/home/ybZhang/miniconda3/envs/glm-m/lib/python3.8/site-packages/urllib3/connection.py", line 611, in connect
self.sock = sock = self._new_conn()
File "/home/ybZhang/miniconda3/envs/glm-m/lib/python3.8/site-packages/urllib3/connection.py", line 210, in _new_conn
raise NameResolutionError(self.host, self, e) from e
urllib3.exceptions.NameResolutionError: <urllib3.connection.HTTPSConnection object at 0x7fe86c059040>: Failed to resolve 'www.modelscope.cn' ([Errno -2] Name or service not known)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/ybZhang/miniconda3/envs/glm-m/lib/python3.8/site-packages/requests/adapters.py", line 486, in send
resp = conn.urlopen(
File "/home/ybZhang/miniconda3/envs/glm-m/lib/python3.8/site-packages/urllib3/connectionpool.py", line 874, in urlopen
return self.urlopen(
File "/home/ybZhang/miniconda3/envs/glm-m/lib/python3.8/site-packages/urllib3/connectionpool.py", line 874, in urlopen
return self.urlopen(
File "/home/ybZhang/miniconda3/envs/glm-m/lib/python3.8/site-packages/urllib3/connectionpool.py", line 844, in urlopen
retries = retries.increment(
File "/home/ybZhang/miniconda3/envs/glm-m/lib/python3.8/site-packages/urllib3/util/retry.py", line 515, in increment
raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type]
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='www.modelscope.cn', port=443): Max retries exceeded with url: /api/v1/Chinese-LLM-Chat/models/Mistral-7B-Instruct-v0.2/revisions (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7fe86c059040>: Failed to resolve 'www.modelscope.cn' ([Errno -2] Name or service not known)"))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "llmuses/run.py", line 340, in <module>
main()
File "llmuses/run.py", line 334, in main
run_task(task_cfg)
File "llmuses/run.py", line 252, in run_task
model_adapter = imported_modules['ModelAdapterClass'](model_id=model_id,
File "/data/disk2/ybZhang/Chinese-LLM-Chat/eval-scope/llmuses/models/model_adapter.py", line 108, in __init__
tokenizer = AutoTokenizer.from_pretrained(self.model_id, # self.model_id
File "/home/ybZhang/miniconda3/envs/glm-m/lib/python3.8/site-packages/modelscope/utils/hf_util.py", line 105, in from_pretrained
model_dir = snapshot_download(
File "/home/ybZhang/miniconda3/envs/glm-m/lib/python3.8/site-packages/modelscope/hub/snapshot_download.py", line 98, in snapshot_download
revision_detail = _api.get_valid_revision_detail(
File "/home/ybZhang/miniconda3/envs/glm-m/lib/python3.8/site-packages/modelscope/hub/api.py", line 497, in get_valid_revision_detail
all_branches_detail, all_tags_detail = self.get_model_branches_and_tags_details(
File "/home/ybZhang/miniconda3/envs/glm-m/lib/python3.8/site-packages/modelscope/hub/api.py", line 575, in get_model_branches_and_tags_details
r = self.session.get(path, cookies=cookies,
File "/home/ybZhang/miniconda3/envs/glm-m/lib/python3.8/site-packages/requests/sessions.py", line 602, in get
return self.request("GET", url, **kwargs)
File "/home/ybZhang/miniconda3/envs/glm-m/lib/python3.8/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
File "/home/ybZhang/miniconda3/envs/glm-m/lib/python3.8/site-packages/requests/sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
File "/home/ybZhang/miniconda3/envs/glm-m/lib/python3.8/site-packages/requests/adapters.py", line 519, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='www.modelscope.cn', port=443): Max retries exceeded with url: /api/v1/Chinese-LLM-Chat/models/Mistral-7B-Instruct-v0.2/revisions (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7fe86c059040>: Failed to resolve 'www.modelscope.cn' ([Errno -2] Name or service not known)"))