LLMException

If an exception occurs when LLM-DataDist APIs are called, an LLMException may be thrown. Currently, this class contains only the status_code API.

Applicable Products

Product

Supported (Yes/No)

Ascend 950PR/Ascend 950DT

No

Atlas A3 training products/Atlas A3 inference products

Yes

Atlas A2 training products/Atlas A2 inference products

Yes

Atlas 200I/500 A2 inference products

No

Atlas inference products

No

Atlas training products

No

Note: For the Atlas A2 training products/Atlas A2 inference products, only the Atlas 800I A2 inference server and A200I A2 Box heterogeneous subrack are supported.

Function Description

Obtains the error code of an exception. For details about the error code list, see LLMStatusCode.

Prototype

1
status_code()

Parameters

None

Example

1
2
3
4
5
6
7
from llm_datadist import *
...
cache_keys = [CacheKey(1, req_id=1), CacheKey(1, req_id=2)]
try:
    kv_cache_manager.pull_cache(cache_keys[0], cache, 0)
except LLMException as exe:
    print(exe.status_code)

Returns

An error code is returned.

Constraints

None