mirror of
https://github.com/NVIDIA/TensorRT-LLM.git
synced 2026-01-23 20:23:08 +08:00
25 lines
642 B
Python
25 lines
642 B
Python
from tensorrt_llm.llmapi.utils import ApiStatusRegistry
|
|
|
|
|
|
def test_api_status_registry():
|
|
|
|
@ApiStatusRegistry.set_api_status("beta")
|
|
def _my_method(self, *args, **kwargs):
|
|
pass
|
|
|
|
assert ApiStatusRegistry.get_api_status(_my_method) == "beta"
|
|
|
|
@ApiStatusRegistry.set_api_status("prototype")
|
|
def _my_method(self, *args, **kwargs):
|
|
pass
|
|
|
|
assert ApiStatusRegistry.get_api_status(_my_method) == "prototype"
|
|
|
|
class App:
|
|
|
|
@ApiStatusRegistry.set_api_status("beta")
|
|
def _my_method(self, *args, **kwargs):
|
|
pass
|
|
|
|
assert ApiStatusRegistry.get_api_status(App._my_method) == "beta"
|