nip.parameters.update_schedule.ConstantUpdateSchedule#

class nip.parameters.update_schedule.ConstantUpdateSchedule[source]#

An agent update schedule which updates the agent on all iterations.

Methods Summary

__repr__()

Return repr(self).

_get_arguments_dict()

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

__repr__() str[source]#

Return repr(self).

_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.

Parameters:
  • params_dict (dict) – A dictionary of the agent update schedule.

  • ignore_extra_keys (bool, default=False) – If True, ignore keys in the dictionary that do not correspond to fields in the parameters object.

Returns:

schedule (AgentUpdateSchedule) – The agent update schedule.

to_dict() dict[source]#

Convert the agent update schedule to a dictionary.

Returns:

as_dict (dict) – A dictionary representation of the agent update schedule.