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.

Applicability

Product

Supported

Atlas A3 training products/Atlas A3 inference products

√

Atlas A2 training products/Atlas A2 inference products

√

Atlas 200I/500 A2 inference products

x

Atlas inference products

x

Atlas training products

x

Note: For the Atlas A2 training products/Atlas A2 inference products, only the Atlas 800I A2 inference server, Atlas 300I A2 inference card, and A200I A2 Box heterogeneous components 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.

Restrictions

None