aind_behavior_curriculum.curriculum.PolicyTransition¶
- class aind_behavior_curriculum.curriculum.PolicyTransition(function: Callable[[_P], _R], *, skip_validation: bool = False)[source]¶
Bases:
_Rule[(<class ‘aind_behavior_curriculum.curriculum.Metrics’>,),bool]User-defined function that defines how current Policies change during a Stage. It subclasses _Rule.
- __init__(function: Callable[[_P], _R], *, skip_validation: bool = False) None[source]¶
Initializes a new instance of the class. :param function: The function to be used. If an instance of _Rule is passed,
the callable attribute of the _Rule instance will be used.
- Parameters:
skip_validation (bool, optional) – If set to True, skips the validation of the callable’s typing. Defaults to False.
- Returns:
None
Methods
__init__(function, *[, skip_validation])Initializes a new instance of the class. :param function: The function to be used. If an instance of _Rule is passed, the callable attribute of the _Rule instance will be used. :type function: Callable[_P, _R] :param skip_validation: If set to True, skips the validation of the callable's typing. Defaults to False. :type skip_validation: bool, optional.
invoke(*args, **kwargs)Wraps the inner callable.
Ensures the outgoing type is normalized from a Callable or _Rule.
serialize_rule(value)Custom Serialization.
Attributes