Skip to content

[Bug]api-key is set up incorrectly #101

@XiaobinZhao

Description

@XiaobinZhao

here my command

genai-bench benchmark \
  --api-backend sglang \
  --task text-to-text \
  --api-model-name "DeepSeek-V3.1" \
  --api-base https://172.10.2.3/v3.1 \
  --api-key "112233445566" \
  --additional-request-params '{"stream_options": {"include_usage": true}, "chat_template_kwargs": {"thinking": true}}' \
  --server-engine "SGLang" \
  --server-version "0.4.10" \
  --server-gpu-type "H200" \
  --server-gpu-count "32*8" \
  --model-tokenizer /root/deepseek-tokenizer-v3.1 \
  --experiment-base-dir ./genai-bench-result \
  --dataset-path /root/LongAlpaca-12k.csv \
  --dataset-prompt-column "instruction" \
  --traffic-scenario "U(1,12001)/(1,2001)" \
  --num-concurrency 260 \
  --max-requests-per-run 3000 \
  --max-time-per-run 60 \
  --num-workers 2 \
  --spawn-rate 20

run faled, here the log:

[11/04/25 10:49:41] INFO     👋 Welcome to genai-bench 0.0.2! I am an intelligent benchmark tool for Large Language Model.                                                                                              cli.py:154
                    INFO     Options you provided:                                                                                                                                                                      cli.py:160
                    INFO     num_concurrency: (1,)                                                                                                                                                                      cli.py:162
                    INFO     batch_size: [1]                                                                                                                                                                            cli.py:162
                    INFO     api_backend: sglang                                                                                                                                                                        cli.py:162
                    INFO     task: text-to-text                                                                                                                                                                         cli.py:162
                    INFO     api_model_name: DeepSeek-V3.1                                                                                                                                                              cli.py:162
                    INFO     api_base: https://172.10.2.3/v3.1                                                                                                                                             cli.py:162
                    INFO     api_key: 112233445566                                                                                                                               cli.py:162
                    INFO     additional_request_params: {'stream_options': {'include_usage': True}, 'chat_template_kwargs': {'thinking': True}}                                                                         cli.py:162
                    INFO     server_engine: SGLang                                                                                                                                                                      cli.py:162
                    INFO     server_version: 0.4.10                                                                                                                                                                     cli.py:162
                    INFO     server_gpu_type: H200                                                                                                                                                                      cli.py:162
                    INFO     server_gpu_count: 32*8                                                                                                                                                                     cli.py:162
                    INFO     model_tokenizer: /root/deepseek-tokenizer-v3.1                                                                                                                                             cli.py:162
                    INFO     experiment_base_dir: ./genai-bench-result                                                                                                                                                  cli.py:162
                    INFO     dataset_path: /root/LongAlpaca-12k.csv                                                                                                                                                     cli.py:162
                    INFO     dataset_prompt_column: instruction                                                                                                                                                         cli.py:162
                    INFO     traffic_scenario: ['U(1,12001)/(1,2001)']                                                                                                                                                  cli.py:162
                    INFO     max_requests_per_run: 1                                                                                                                                                                    cli.py:162
                    INFO     max_time_per_run: 60                                                                                                                                                                       cli.py:162
                    INFO     num_workers: 1                                                                                                                                                                             cli.py:162
                    INFO     spawn_rate: 20                                                                                                                                                                             cli.py:162
                    INFO     gcp_credentials_path: None                                                                                                                                                                 cli.py:162
                    INFO     gcp_location: us-central1                                                                                                                                                                  cli.py:162
                    INFO     gcp_project_id: None                                                                                                                                                                       cli.py:162
                    INFO     azure_ad_token: None                                                                                                                                                                       cli.py:162
                    INFO     azure_api_version: 2024-02-01                                                                                                                                                              cli.py:162
                    INFO     azure_deployment: None                                                                                                                                                                     cli.py:162
                    INFO     azure_endpoint: None                                                                                                                                                                       cli.py:162
                    INFO     aws_region: None                                                                                                                                                                           cli.py:162
                    INFO     aws_profile: None                                                                                                                                                                          cli.py:162
                    INFO     aws_session_token: None                                                                                                                                                                    cli.py:162
                    INFO     aws_secret_access_key: None                                                                                                                                                                cli.py:162
                    INFO     aws_access_key_id: None                                                                                                                                                                    cli.py:162
                    INFO     model_api_key: None                                                                                                                                                                        cli.py:162
                    INFO     model_auth_type: None                                                                                                                                                                      cli.py:162
                    INFO     region: None                                                                                                                                                                               cli.py:162
                    INFO     security_token: None                                                                                                                                                                       cli.py:162
                    INFO     profile: DEFAULT                                                                                                                                                                           cli.py:162
                    INFO     config_file: ~/.oci/config                                                                                                                                                                 cli.py:162
                    INFO     auth: user_principal                                                                                                                                                                       cli.py:162
                    INFO     model: deepseek-tokenizer-v3.1                                                                                                                                                             cli.py:162
                    INFO     iteration_type: num_concurrency                                                                                                                                                            cli.py:162
                    INFO     experiment_folder_name: None                                                                                                                                                               cli.py:162
                    INFO     dataset_image_column: None                                                                                                                                                                 cli.py:162
                    INFO     dataset_config: None                                                                                                                                                                       cli.py:162
                    INFO     master_port: 5557                                                                                                                                                                          cli.py:162
                    INFO     upload_results: False                                                                                                                                                                      cli.py:162
                    INFO     namespace: None                                                                                                                                                                            cli.py:162
                    INFO     github_repo: None                                                                                                                                                                          cli.py:162
                    INFO     github_owner: None                                                                                                                                                                         cli.py:162
                    INFO     github_token: None                                                                                                                                                                         cli.py:162
                    INFO     storage_gcp_credentials_path: None                                                                                                                                                         cli.py:162
                    INFO     storage_gcp_project_id: None                                                                                                                                                               cli.py:162
                    INFO     storage_azure_sas_token: None                                                                                                                                                              cli.py:162
                    INFO     storage_azure_connection_string: None                                                                                                                                                      cli.py:162
                    INFO     storage_azure_account_key: None                                                                                                                                                            cli.py:162
                    INFO     storage_azure_account_name: None                                                                                                                                                           cli.py:162
                    INFO     storage_aws_profile: None                                                                                                                                                                  cli.py:162
                    INFO     storage_aws_region: None                                                                                                                                                                   cli.py:162
                    INFO     storage_aws_session_token: None                                                                                                                                                            cli.py:162
                    INFO     storage_aws_secret_access_key: None                                                                                                                                                        cli.py:162
                    INFO     storage_aws_access_key_id: None                                                                                                                                                            cli.py:162
                    INFO     storage_auth_type: None                                                                                                                                                                    cli.py:162
                    INFO     storage_prefix:                                                                                                                                                                            cli.py:162
                    INFO     storage_bucket: None                                                                                                                                                                       cli.py:162
                    INFO     storage_provider: oci                                                                                                                                                                      cli.py:162
                    INFO     Using sglang authentication                                                                                                                                                                cli.py:237
[11/04/25 10:49:42] INFO     The average character token ratio is: 4.10597519729425                                                                                                                                     cli.py:262
                    INFO     Loading CSV file: /root/LongAlpaca-12k.csv                                                                                                                                              sources.py:69
[11/04/25 10:49:45] INFO     Loaded 12000 rows from CSV file with columns: ['instruction', 'output', 'file', 'input']                                                                                                sources.py:73
                    INFO     This experiment will be saved in folder /root/genai-bench-result/sglang_SGLang_0.4.10_text-to-text_deepseek-tokenizer-v3.1_20251104_104945.                                                cli.py:310
                    INFO     bench-vm_4533774c69e045939838207046ac1d05 (index 0) reported as ready. 1 workers connected.                                                                                           runners.py:1019
[11/04/25 10:49:47] INFO     Starting benchmark with concurrency=1, spawn_rate=20                                                                                                                                       cli.py:412
                    INFO     Sending spawn jobs of 1 users at 20.00 spawn rate to 1 ready workers                                                                                                                   runners.py:746
                    INFO     [Worker 0] Worker 0 started successfully and connected to master                                                                                                                        runner.py:182
                    INFO     All users spawned: {"OpenAIUser": 1} (1 total users)                                                                                                                                   runners.py:833
[11/04/25 10:49:48] INFO     [Worker 0] ======================url=https://172.10.2.3/v3.1/v1/chat/completions,headers={'Authorization': "Bearer {'api_key':                                             runner.py:182
                             '112233445566'}", 'Content-Type': 'application/json'}=====================
                    WARNING  [Worker 0] Received error response from server. Error code: 401, message: {"error":{"message":"无效的令牌 (request id: 2025110410494817548450709760043)","type":"my_gw_error"}}.        runner.py:182
                    INFO     [Worker 0] ======================url=https://172.10.2.3/v3.1/v1/chat/completions,headers={'Authorization': "Bearer {'api_key':                                             runner.py:182
                             '112233445566'}", 'Content-Type': 'application/json'}=====================
                    WARNING  [Worker 0] Received error response from server. Error code: 401, message: {"error":{"message":"无效的令牌 (request id: 2025110410494829539122892188686)","type":"my_gw_error"}}.        runner.py:182
                    INFO     [Worker 0] ======================url=https://172.10.2.3/v3.1/v1/chat/completions,headers={'Authorization': "Bearer {'api_key':                                             runner.py:182
                             '112233445566'}", 'Content-Type': 'application/json'}=====================
                    WARNING  [Worker 0] Received error response from server. Error code: 401, message: {"error":{"message":"无效的令牌 (request id: 2025110410494842845579422772361)","type":"my_gw_error"}}.        runner.py:182
                    INFO     [Worker 0] ======================url=https://172.10.2.3/v3.1/v1/chat/completions,headers={'Authorization': "Bearer {'api_key':                                             runner.py:182
                             '112233445566'}", 'Content-Type': 'application/json'}=====================
                    WARNING  [Worker 0] Received error response from server. Error code: 401, message: {"error":{"message":"无效的令牌 (request id: 2025110410494855240007358256515)","type":"my_gw_error"}}.        runner.py:182
                    INFO     [Worker 0] ======================url=https://172.10.2.3/v3.1/v1/chat/completions,headers={'Authorization': "Bearer {'api_key':                                             runner.py:182
                             '112233445566'}", 'Content-Type': 'application/json'}=====================
                    WARNING  [Worker 0] Received error response from server. Error code: 401, message: {"error":{"message":"无效的令牌 (request id: 2025110410494867523575411824994)","type":"my_gw_error"}}.        runner.py:182
                    INFO     [Worker 0] ======================url=https://172.10.2.3/v3.1/v1/chat/completions,headers={'Authorization': "Bearer {'api_key':                                             runner.py:182
                             '112233445566'}", 'Content-Type': 'application/json'}=====================
                    WARNING  [Worker 0] Received error response from server. Error code: 401, message: {"error":{"message":"无效的令牌 (request id: 2025110410494876735453645882633)","type":"my_gw_error"}}.        runner.py:182
                    INFO     [Worker 0] ======================url=https://172.10.2.3/v3.1/v1/chat/completions,headers={'Authorization': "Bearer {'api_key':                                             runner.py:182
                             '112233445566'}", 'Content-Type': 'application/json'}=====================
[11/04/25 10:49:49] INFO     ⏩ Exit the run as 7 requests have been completed.                                                                                                                                        utils.py:46
                    WARNING  [Worker 0] Received error response from server. Error code: 401, message: {"error":{"message":"无效的令牌 (request id: 2025110410494892529093883715967)","type":"my_gw_error"}}.        runner.py:182
                    INFO     [Worker 0] ======================url=https://172.10.2.3/v3.1/v1/chat/completions,headers={'Authorization': "Bearer {'api_key':                                             runner.py:182
                             '112233445566'}", 'Content-Type': 'application/json'}=====================
                    WARNING  [Worker 0] Received error response from server. Error code: 401, message: {"error":{"message":"无效的令牌 (request id: 2025110410494899923319380065588)","type":"my_gw_error"}}.        runner.py:182
                    INFO     [Worker 0] ======================url=https://172.10.2.3/v3.1/v1/chat/completions,headers={'Authorization': "Bearer {'api_key':                                             runner.py:182
                             '112233445566'}", 'Content-Type': 'application/json'}=====================
                    INFO     bench-vm_4533774c69e045939838207046ac1d05 (index 0) reported that it has stopped                                                                                                      runners.py:1082
                    INFO     bench-vm_4533774c69e045939838207046ac1d05 (index 0) reported as ready. 1 workers connected.                                                                                           runners.py:1019
[11/04/25 10:49:50] ERROR    Uncaught exception

the api-key is set up incorrectly; should be set "Bearer 112233445566", but "Bearer {'api_key':'112233445566'}"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions