deeppavlov/core/models/lr_scheduled_model.py
def from_str(cls, label: str) -> int:
        """
        Convert given string label of decay type to special index

        Args:
            label: name of decay type.
                Set of values: `"linear"`, `"cosine"`, `"exponential"`,
                 `"onecycle"`, `"trapezoid"`, `["polynomial", K]`, where K is a polynomial power

        Returns:
            index of decay type
        """
        label_norm = label.replace('1', 'one').upper()
        if label_norm in cls.__members__:
            return DecayType[label_norm]
        else:
            raise NotImplementedError
def from_str(cls, label: str) -> int:
        label_norm = label.replace('1', 'one').upper()
        if label_norm in cls.__members__:
            return DecayType[label_norm]
        else:
            raise NotImplementedError
def from_str ( cls , label : str ) -> int : label_norm = label . replace ( '1' , 'one' ) . upper ( ) if label_norm in cls . __members__ : return DecayType [ label_norm ] else : raise NotImplementedError
Convert given string label of decay type to special index

        Args:
            label: name of decay type.
                Set of values: `"linear"`, `"cosine"`, `"exponential"`,
                 `"onecycle"`, `"trapezoid"`, `["polynomial", K]`, where K is a polynomial power

        Returns:
            index of decay type
Convert given string label of decay type to special index