nip.parameters.update_schedule.ContiguousPeriodicUpdateSchedule#
- class nip.parameters.update_schedule.ContiguousPeriodicUpdateSchedule(period: int, start: int, stop: int)[source]#
A periodic schedule where the agent is updated between start and stop iterations.
The updates are scheduled in a cycle of length
period
. The agent is updated from thestart
iteration to thestop
iteration in each cycle.- Parameters:
Methods Summary
__init__
(period, start, stop)__repr__
()Return repr(self).
Get the constructor arguments of the schedule as a dictionary.
_get_param_class_from_dict
(param_dict)Try to get the parameter class from a dictionary of serialised parameters.
from_dict
(params_dict[, ignore_extra_keys])Create an agent update schedule from a dictionary.
to_dict
()Convert the agent update schedule to a dictionary.
Methods
- _get_arguments_dict() dict [source]#
Get the constructor arguments of the schedule as a dictionary.
- Returns:
arguments (dict) – A dictionary of the arguments of the schedule.
- classmethod _get_param_class_from_dict(param_dict: dict) type[ParameterValue] | None [source]#
Try to get the parameter class from a dictionary of serialised parameters.
- Parameters:
param_dict (dict) – A dictionary of parameters, which may have come from a
to_dict
method. This dictionary may contain a_type
key, which is used to determine the class of the parameter.- Returns:
param_class (type[ParameterValue] | None) – The class of the parameter, if it can be determined.
- Raises:
ValueError – If the class specified in the dictionary is not a valid parameter class.
- classmethod from_dict(params_dict: dict, ignore_extra_keys: bool = False) AgentUpdateSchedule [source]#
Create an agent update schedule from a dictionary.