
    g[	                     F    d Z ddlZddlmZ ddlmZ ddlmZ dedefd	ZdS )
zJContains utilities to flag a feature as "experimental" in Huggingface Hub.    N)wraps)Callable   )	constantsfnreturnc                       j                             d          r j         dt          d                    n j         t                      fd            }|S )aC  Decorator to flag a feature as experimental.

    An experimental feature trigger a warning when used as it might be subject to breaking changes in the future.
    Warnings can be disabled by setting the environment variable `HF_EXPERIMENTAL_WARNING` to `0`.

    Args:
        fn (`Callable`):
            The function to flag as experimental.

    Returns:
        `Callable`: The decorated function.

    Example:

    ```python
    >>> from huggingface_hub.utils import experimental

    >>> @experimental
    ... def my_function():
    ...     print("Hello world!")

    >>> my_function()
    UserWarning: 'my_function' is experimental and might be subject to breaking changes in the future. You can disable
    this warning by setting `HF_HUB_DISABLE_EXPERIMENTAL_WARNING=1` as environment variable.
    Hello world!
    ```
    z.__new__Nc                  h    t           j        st          j        d dt                      | i |S )N'z' is experimental and might be subject to breaking changes in the future. You can disable this warning by setting `HF_HUB_DISABLE_EXPERIMENTAL_WARNING=1` as environment variable.)r   #HF_HUB_DISABLE_EXPERIMENTAL_WARNINGwarningswarnUserWarning)argskwargsr   names     _/var/www/html/ai-engine/env/lib/python3.11/site-packages/huggingface_hub/utils/_experimental.py	_inner_fnzexperimental.<locals>._inner_fn7   sT    < 	MD    	   r4"6"""    )__qualname__endswithlenr   )r   r   r   s   ` @r   experimentalr      su    : 35/2J2J:2V2Vk2?-c*oo--..\^\kD
2YY# # # # # Y# r   )	__doc__r   	functoolsr   typingr    r   r    r   r   <module>r      sy    Q P                   *X *( * * * * * *r   