
    9i                     P    S SK Jr  S SKJr   " S S\5      rS\\\\4   S\4S jrg)	    )Enum)Unionc                   <    \ rS rSrSrSrSrSrSrSr	Sr
S	rS
rSrSrg)Priority   a  Hook priority levels.

+--------------+------------+
| Level        | Value      |
+==============+============+
| HIGHEST      | 0          |
+--------------+------------+
| VERY_HIGH    | 10         |
+--------------+------------+
| HIGH         | 30         |
+--------------+------------+
| ABOVE_NORMAL | 40         |
+--------------+------------+
| NORMAL       | 50         |
+--------------+------------+
| BELOW_NORMAL | 60         |
+--------------+------------+
| LOW          | 70         |
+--------------+------------+
| VERY_LOW     | 90         |
+--------------+------------+
| LOWEST       | 100        |
+--------------+------------+
r   
      (   2   <   F   Z   d    N)__name__
__module____qualname____firstlineno____doc__HIGHEST	VERY_HIGHHIGHABOVE_NORMALNORMALBELOW_NORMALLOWVERY_LOWLOWEST__static_attributes__r       b/var/www/html/land-doc-ocr/venv/lib/python3.13/site-packages/modelscope/trainers/hooks/priority.pyr   r      s6    2 GIDLFL
CHFr    r   priorityreturnc                 "   [        U [        5      (       a  U S:  d  U S:  a  [        S5      eU $ [        U [        5      (       a  U R                  $ [        U [
        5      (       a!  [        U R                  5          R                  $ [        S5      e)zzGet priority value.

Args:
    priority (int or str or :obj:`Priority`): Priority.

Returns:
    int: The priority value.
r   r   z"priority must be between 0 and 100z2priority must be an integer or Priority enum value)
isinstanceint
ValueErrorr   valuestrupper	TypeError)r"   s    r!   get_priorityr,   ,   sw     (C  a<8c>ABB	Hh	'	'~~	Hc	"	"()///LMMr    N)enumr   typingr   r   r&   r)   r,   r   r    r!   <module>r/      s<     "t "JN5c8!34 N Nr    