Repository: modelscope/evalscope
Issue: 如何进行无外网环境离线测评？
Root cause: Documentation Deficiency

## 问题描述 / Issue Description

在无互联网环境下测评（gsm8k），报错连不上

## 使用的工具 / Tools Used
- [√] Native / 原生框架
- [ ] Opencompass backend
- [ ] VLMEvalKit backend
- [ ] RAGEval backend
- [ ] Perf / 模型推理压测工具
- [ ] Arena  /竞技场模式


## 执行的代码或指令 / Code or Commands Executed

```bash
root@12baba3b59fe:/home/LLMEval# evalscope eval --model test --api-url http://host.docker.internal:8000/v1/chat/completions --eval-type service --datasets gsm8k --limit 10 --generation-config max_tokens=256,temperature=0.0 --judge-model-args '{"api_url":"http://host.docker.internal:8000/v1","model_id":"test"}'
```

## 错误日志 / Error Log

```
2025-03-25 03:22:00,250 - evalscope - INFO - Args: Task config is provided with CommandLine type.
2025-03-25 03:22:00,460 - evalscope - INFO - Dump task config to ./outputs/20250325_032200/configs/task_config_a7a950.yaml
2025-03-25 03:22:00,466 - evalscope - INFO - {
    "model": "test",
    "model_id": "test",
    "model_args": {
        "revision": "master",
        "precision": "torch.float16"
    },
    "template_type": null,
    "chat_template": null,
    "datasets": [
        "gsm8k"
    ],
    "dataset_args": {
        "gsm8k": {
            "name": "gsm8k",
            "dataset_id": "modelscope/gsm8k",
            "model_adapter": "generation",
            "output_types": [
                "generation"
            ],
            "subset_list": [
                "main"
            ],
            "metric_list": [
                "AverageAccuracy"
            ],
            "few_shot_num": 4,
            "few_shot_random": false,
            "train_split": null,
            "eval_split": "test",
            "prompt_template": "Question: {query}\nLet's think step by step\nAnswer:",
            "system_prompt": null,
            "query_template": null,
            "pretty_name": "GSM8K",
            "filters": null,
            "extra_params": {}
        }
    },
    "dataset_dir": "/root/.cache/modelscope/hub/datasets",
    "dataset_hub": "modelscope",
    "generation_config": {
        "max_tokens": 256,
        "temperature": 0.0
    },
    "eval_type": "service",
    "eval_backend": "Native",
    "eval_config": null,
    "stage": "all",
    "limit": 10,
    "eval_batch_size": 1,
    "mem_cache": false,
    "use_cache": null,
    "work_dir": "./outputs/20250325_032200",
    "outputs": null,
    "debug": false,
    "dry_run": false,
    "seed": 42,
    "api_url": "http://host.docker.internal:8000/v1/chat/completions",
    "api_key": "EMPTY",
    "timeout": null,
    "stream": false,
    "judge_strategy": "auto",
    "judge_worker_num": 8,
    "judge_model_args": {
        "api_url": "http://host.docker.internal:8000/v1",
        "model_id": "test"
    }
}
2025-03-25 03:22:00,467 - evalscope - INFO - **** Start evaluating on dataset modelscope/gsm8k ****
2025-03-25 03:22:00,467 - evalscope - INFO - Loading dataset from hub: modelscope/gsm8k
2025-03-25 03:22:00,766 - evalscope - INFO - Loading dataset: dataset_name: modelscope/gsm8k > subsets: ['main']
2025-03-25 03:22:00,766 - modelscope - WARNING - Use trust_remote_code=True. Will invoke codes from gsm8k. Please make sure that you can trust the external codes.
2025-03-25 03:22:00,788 - urllib3.connectionpool - WARNING - Retrying (Retry(total=1, connect=1, read=2, redirect=None, status=None)) after connection broken by 'NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7f0ecdd0e830>: Failed to resolve 'www.modelscope.cn' ([Errno -2] Name or service not known)")': /api/v1/datasets/modelscope/gsm8k
2025-03-25 03:22:02,809 - urllib3.connectionpool - WARNING - Retrying (Retry(total=0, connect=0, read=2, redirect=None, status=None)) after connection broken by 'NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7f0ecdd0d900>: Failed to resolve 'www.modelscope.cn' ([Errno -2] Name or service not known)")': /api/v1/datasets/modelscope/gsm8k
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 198, in _new_conn
    sock = connection.create_connection(
  File "/usr/local/lib/python3.10/site-packages/urllib3/util/connection.py", line 60, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/usr/local/lib/python3.10/socket.py", line 955, 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 "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 787, in urlopen
    response = self._make_request(
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 488, in _make_request
    raise new_e
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 464, in _make_request
    self._validate_conn(conn)
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 1093, in _validate_conn
    conn.connect()
  File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 704, in connect
    self.sock = sock = self._new_conn()
  File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 205, in _new_conn
    raise NameResolutionError(self.host, self, e) from e
urllib3.exceptions.NameResolutionError: <urllib3.connection.HTTPSConnection object at 0x7f0ecdd0f460>: 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 "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 871, in urlopen
    return self.urlopen(
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 871, in urlopen
    return self.urlopen(
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 841, in urlopen
    retries = retries.increment(
  File "/usr/local/lib/python3.10/site-packages/urllib3/util/retry.py", line 519, 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/datasets/modelscope/gsm8k (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7f0ecdd0f460>: 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 "/usr/local/bin/evalscope", line 8, in <module>
    sys.exit(run_cmd())
  File "/usr/local/lib/python3.10/site-packages/evalscope/cli/cli.py", line 25, in run_cmd
    cmd.execute()
  File "/usr/local/lib/python3.10/site-packages/evalscope/cli/start_eval.py", line 32, in execute
    run_task(self.args)
  File "/usr/local/lib/python3.10/site-packages/evalscope/run.py", line 31, in run_task
    return run_single_task(task_cfg, run_time)
  File "/usr/local/lib/python3.10/site-packages/evalscope/run.py", line 44, in run_single_task
    return evaluate_model(task_cfg, outputs)
  File "/usr/local/lib/python3.10/site-packages/evalscope/run.py", line 117, in evaluate_model
    res_dict = evaluator.eval()
  File "/usr/local/lib/python3.10/site-packages/evalscope/evaluator/evaluator.py", line 405, in eval
    prompts = self.load_dataset()
  File "/usr/local/lib/python3.10/site-packages/evalscope/evaluator/evaluator.py", line 73, in load_dataset
    dataset = self.data_adapter.load(
  File "/usr/local/lib/python3.10/site-packages/evalscope/benchmarks/data_adapter.py", line 103, in load
    data_dict = self.load_from_hub(
  File "/usr/local/lib/python3.10/site-packages/evalscope/benchmarks/data_adapter.py", line 139, in load_from_hub
    dataset = MsDataset.load(
  File "/usr/local/lib/python3.10/site-packages/modelscope/msdatasets/ms_dataset.py", line 297, in load
    endpoint = _api.get_endpoint_for_read(
  File "/usr/local/lib/python3.10/site-packages/modelscope/hub/api.py", line 331, in get_endpoint_for_read
    if not self.repo_exists(
  File "/usr/local/lib/python3.10/site-packages/modelscope/hub/api.py", line 387, in repo_exists
    r = self.session.get(path, cookies=cookies,
  File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 602, in get
    return self.request("GET", url, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 700, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='www.modelscope.cn', port=443): Max retries exceeded with url: /api/v1/datasets/modelscope/gsm8k (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7f0ecdd0f460>: Failed to resolve 'www.modelscope.cn' ([Errno -2] Name or service not known)"))
```

## 运行环境 / Runtime Environment

- 操作系统 / Operating System:
  - [√] Windows
  - [ ] macOS
  - [ ] Ubuntu

- Python版本 / Python Version:
  - [ ] 3.11
  - [√] 3.10
  - [ ] 3.9


## 其他信息 / Additional Information
python:3.10的docker容器中运行



自己回头看了下是数据集需要离线下载，指定路径，已解决。