Ë
    ÿÍ:jó  ã                  ó6   — d Z ddlmZ ddlmZ  G d„ de«      Zy)zEnumerated utilities.é    )Úannotations)ÚStrEnumc                  ó<   — e Zd ZdZdZdZedd„«       Zedd„«       Zy)	ÚGradClipAlgorithmTypea×  Define gradient_clip_algorithm types - training-tricks.
    NORM type means "clipping gradients by norm". This computed over all model parameters together.
    VALUE type means "clipping gradients by value". This will clip the gradient value for each parameter.

    References:
        clip_by_norm: https://pytorch.org/docs/stable/nn.html#torch.nn.utils.clip_grad_norm_
        clip_by_value: https://pytorch.org/docs/stable/nn.html#torch.nn.utils.clip_grad_value_
    ÚvalueÚnormc                ó4   ‡ — t        ˆ fd„t        D «       «      S )Nc              3  ó<   •K  — | ]  }|j                   ‰k(  –— Œ y ­w©N)r   )Ú.0ÚxÚvals     €úv/home/mcse/projects/srt_converter/srt-converter-venv/lib/python3.12/site-packages/pytorch_lightning/utilities/enums.pyú	<genexpr>z7GradClipAlgorithmType.supported_type.<locals>.<genexpr>$   s   øè ø€ ÒA a�1—7‘7˜c•>ÑAùs   ƒ)Úanyr   )r   s   `r   Úsupported_typez$GradClipAlgorithmType.supported_type"   s   ø€ äÓAÔ+@ÔAÓAÐAó    c                 óH   — t         D � cg c]  } | j                  ‘Œ c} S c c} w r   )r   r   )r   s    r   Úsupported_typesz%GradClipAlgorithmType.supported_types&   s   € ä!6Ö7˜A�—“Ò7Ð7ùÒ7s   ‰N)r   ÚstrÚreturnÚbool)r   z	list[str])	Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚVALUEÚNORMÚstaticmethodr   r   © r   r   r   r      s;   „ ñð €EØ€DàòBó ðBð ò8ó ñ8r   r   N)r   Ú
__future__r   Úlightning_utilities.core.enumsr   ÚLightningEnumr   r    r   r   ú<module>r$      s   ðñ å "å Cô8˜Mõ 8r   