Decorators
deprecated(reason)
¶
Create a decorator that marks functions as deprecated.
This decorator will emit a warning when the decorated function is called, indicating that the function is deprecated and providing a reason.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
reason
|
str
|
The reason why the function is deprecated. |
required |
Returns:
Name | Type | Description |
---|---|---|
callable |
A decorator function that can be applied to mark functions as deprecated. |
Source code in inference_sdk/utils/decorators.py
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 32 |
|
experimental(info)
¶
Create a decorator that marks functions as experimental.
This decorator will emit a warning when the decorated function is called, indicating that the function is experimental and providing additional information.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
info
|
str
|
Information about the experimental status of the function. |
required |
Returns:
Name | Type | Description |
---|---|---|
callable |
A decorator function that can be applied to mark functions as experimental. |
Source code in inference_sdk/utils/decorators.py
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
|