mindieservice_daemon运行报错
收藏回复举报
mindieservice_daemon运行报错
t('forum.solved') 已解决
新人帖
发表于2025-03-25 11:53:09
0 查看

在swr.cn-south-1.myhuaweicloud.com/ascendhub/mindie:1.0.0-300I-Duo-py311-openeuler24.03-lts 容器内执行

./mindie-service/bin/mindieservice_daemon

报错

2025-03-25 11:22:26,396 [INFO] config.py:35 - do not init dmi config 

2025-03-25 11:22:26,396 [INFO] standard_model.py:145 - rank id 1 get model config: {'backend_bin_path': '/usr/local/Ascend/mindie/1.0.0/mindie-llm/bin/', 'backend_log_file': '/usr/local/Ascend/mindie/1.0.0/mindie-service/logs/mindservice.log', 'backend_modelInstance_id': '0', 'backend_type': 'atb', 'block_size': '128', 'cpu_mem': '5', 'deploy_type': 'INTER_PROCESS', 'dp': '0', 'ep': '0', 'executor_type': 'LLM_EXECUTOR_PYTHON', 'globalRankIds': '', 'globalWorldSize': '0', 'interNodeKmcKsfMaster': 'tools/pmt/master/ksfa', 'interNodeKmcKsfStandby': 'tools/pmt/standby/ksfb', 'interNodeTLSEnabled': '1', 'interNodeTlsCaFiles': 'ca.pem,', 'interNodeTlsCaPath': 'security/grpc/ca/', 'interNodeTlsCert': 'security/grpc/certs/server.pem', 'interNodeTlsCrlFiles': 'server_crl.pem,', 'interNodeTlsCrlPath': 'security/grpc/certs/', 'interNodeTlsPk': 'security/grpc/keys/server.key.pem', 'interNodeTlsPkPwd': 'security/grpc/pass/mindie_server_key_pwd.txt', 'isMaster': '0', 'localIP': '', 'local_rank': '1', 'log_error': '1', 'log_file_num': '20', 'log_file_size': '20', 'log_info': '1', 'log_verbose': '0', 'log_warning': '1', 'masterIP': '', 'max_input_len': '2048', 'max_iter_times': '512', 'max_prefill_tokens': '8192', 'max_seq_len': '2560', 'model_cut_policy': 'standard', 'model_id': '/work', 'model_instance_number': '1', 'model_instance_type': 'Standard', 'model_name': 'qwen2-7b', 'multiNodesInferEnabled': '0', 'multiNodesInferPort': '1120', 'npu_device_id': '1', 'npu_device_ids': '0,1,2,3', 'npu_mem': '-1', 'pp': '0', 'rank': '1', 'slaveIPs': '', 'speculation_gamma': '0', 'tp': '0', 'trust_remote_code': '1', 'world_size': '4'} 

[2025-03-25 11:22:29,198] [11186] [281464284234080] [llm] [INFO] [cpu_binding.py-212] : rank_id: 0, device_id: 0, numa_id: 0, shard_devices: [0], cpus: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31] 

[2025-03-25 11:22:29,201] [11186] [281464284234080] [llm] [INFO] [cpu_binding.py-238] : process 11186, new_affinity is [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31], cpu count 32 

[2025-03-25 11:22:29,674] [11186] [281464284234080] [llm] [INFO] [logging.py-331] : model_runner.quantize: None, model_runner.kv_quant_type: None, model_runner.fa_quant_type: None, model_runner.dtype: torch.float16 

2025-03-25 11:22:30,278 [ERROR] model.py:39 - [Model]   >>> Exception:Initialize:build/CMakeFiles/torch_npu.dir/compiler_depend.ts:222 NPU function error: c10_npu::SetDevice(device_id_), error code is 107001 

[ERROR] 2025-03-25-11:22:30 (PID:11190, Device:0, RankID:-1) ERR00100 PTA call acl api failed 

[Error]: Invalid device ID. 

        Check whether the device ID is valid. 

EE1001: [PID: 11190] 2025-03-25-11:22:29.770.760 The argument is invalid.Reason: Set device failed, invalid device, set device=2, valid device range is [0, 1) 

        Solution: 1.Check the input parameter range of the function. 2.Check the function invocation relationship. 

        TraceBack (most recent call last): 

        rtSetDevice execute failed, reason=[device id error][FUNC:FuncErrorReason][FILE:error_message_manage.cc][LINE:53] 

        open device 2 failed, runtime result = 107001.[FUNC:ReportCallError][FILE:log_inner.cpp][LINE:161] 

Traceback (most recent call last): 

  File "/usr/local/lib/python3.11/site-packages/model_wrapper/model.py", line 37, in initialize 

    return self.python_model.initialize(config) 

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 

  File "/usr/local/lib/python3.11/site-packages/model_wrapper/standard_model.py", line 146, in initialize 

    self.generator = Generator( 

                     ^^^^^^^^^^ 

  File "/usr/local/lib/python3.11/site-packages/mindie_llm/text_generator/generator.py", line 79, in __init__ 

    self.generator_backend = get_generator_backend(model_config) 

                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 

  File "/usr/local/lib/python3.11/site-packages/mindie_llm/text_generator/adapter/__init__.py", line 26, in get_generator_backend 

    return generator_cls(model_config) 

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 

  File "/usr/local/lib/python3.11/site-packages/mindie_llm/text_generator/adapter/generator_torch.py", line 96, in __init__ 

    super().__init__(model_config) 

  File "/usr/local/lib/python3.11/site-packages/mindie_llm/text_generator/adapter/generator_backend.py", line 107, in __init__ 

    self.model_wrapper = get_model_wrapper(model_config, backend_type) 

                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 

  File "/usr/local/lib/python3.11/site-packages/mindie_llm/modeling/model_wrapper/__init__.py", line 15, in get_model_wrapper 

    return wrapper_cls(**model_config) 

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 

  File "/usr/local/lib/python3.11/site-packages/mindie_llm/modeling/model_wrapper/atb/atb_model_wrapper.py", line 24, in __init__ 

    self.model_runner = ModelRunner( 

                        ^^^^^^^^^^^^ 

  File "/usr/local/Ascend/atb-models/atb_llm/runner/model_runner.py", line 132, in __init__ 

    self.process_group, self.device = initialize_distributed(self.rank, self.npu_id, world_size) 

                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 

  File "/usr/local/Ascend/atb-models/atb_llm/utils/dist.py", line 76, in initialize_distributed 

    torch.npu.set_device(device) 

  File "/usr/local/lib64/python3.11/site-packages/torch_npu/npu/utils.py", line 58, in set_device 

    torch_npu._C._npu_setDevice(device_id) 

RuntimeError: Initialize:build/CMakeFiles/torch_npu.dir/compiler_depend.ts:222 NPU function error: c10_npu::SetDevice(device_id_), error code is 107001 

[ERROR] 2025-03-25-11:22:30 (PID:11190, Device:0, RankID:-1) ERR00100 PTA call acl api failed 

[Error]: Invalid device ID. 

        Check whether the device ID is valid. 

EE1001: [PID: 11190] 2025-03-25-11:22:29.770.760 The argument is invalid.Reason: Set device failed, invalid device, set device=2, valid device range is [0, 1) 

        Solution: 1.Check the input parameter range of the function. 2.Check the function invocation relationship. 

        TraceBack (most recent call last): 

        rtSetDevice execute failed, reason=[device id error][FUNC:FuncErrorReason][FILE:error_message_manage.cc][LINE:53] 

        open device 2 failed, runtime result = 107001.[FUNC:ReportCallError][FILE:log_inner.cpp][LINE:161] 

 

2025-03-25 11:22:30,282 [ERROR] model.py:42 - [Model]   >>> return initialize error result: {'status': 'error', 'npuBlockNum': '0', 'cpuBlockNum': '0'} 

2025-03-25 11:22:30,924 [ERROR] model.py:39 - [Model]   >>> Exception:Initialize:build/CMakeFiles/torch_npu.dir/compiler_depend.ts:222 NPU function error: c10_npu::SetDevice(device_id_), error code is 107001 

[ERROR] 2025-03-25-11:22:30 (PID:11193, Device:0, RankID:-1) ERR00100 PTA call acl api failed 

[Error]: Invalid device ID. 

        Check whether the device ID is valid. 

EE1001: [PID: 11193] 2025-03-25-11:22:30.088.957 The argument is invalid.Reason: Set device failed, invalid device, set device=3, valid device range is [0, 1) 

        Solution: 1.Check the input parameter range of the function. 2.Check the function invocation relationship. 

        TraceBack (most recent call last): 

        rtSetDevice execute failed, reason=[device id error][FUNC:FuncErrorReason][FILE:error_message_manage.cc][LINE:53] 

        open device 3 failed, runtime result = 107001.[FUNC:ReportCallError][FILE:log_inner.cpp][LINE:161] 

执行测试npu-smi info

cke_12829.png

执行python测试代码正常。

cke_14970.png

我要发帖子