nip.parameters.agents.RandomAgentParameters#
- class nip.parameters.agents.RandomAgentParameters(agent_lr_factor: ~nip.parameters.agents.LrFactors | dict | None = None, body_lr_factor: ~nip.parameters.agents.LrFactors | dict | None = None, update_schedule: ~nip.parameters.update_schedule.AgentUpdateSchedule = ConstantUpdateSchedule(), use_manual_architecture: bool = False, normalize_message_history: bool = False, load_checkpoint_and_parameters: bool = False, checkpoint_entity: str = <factory>, checkpoint_project: str = <factory>, checkpoint_run_id: str | None = None, checkpoint_version: str = 'latest', use_orthogonal_initialisation: bool = True, orthogonal_initialisation_gain: float = 1.0)[source]#
Parameters which specify a random agent.
Methods Summary
__eq__(other)Return self==value.
__init__([agent_lr_factor, body_lr_factor, ...])__repr__()Return repr(self).
_get_param_class_from_dict(param_dict)Try to get the parameter class from a dictionary of serialised parameters.
Construct a set of basic parameters for testing.
from_dict(params_dict[, ignore_extra_keys])Create a parameters object from a dictionary.
get(address)Get a value from the parameters object using a dot-separated address.
load_from_wandb_config(wandb_config)Load the parameters from a W&B config dictionary.
to_dict()Convert the parameters object to a dictionary.
Attributes
LOAD_PRESERVED_PARAMETERSagent_lr_factorbody_lr_factorcheckpoint_run_idcheckpoint_versionis_randomload_checkpoint_and_parametersnormalize_message_historyorthogonal_initialisation_gainupdate_scheduleuse_manual_architectureuse_orthogonal_initialisationcheckpoint_entitycheckpoint_projectMethods
- __eq__(other)#
Return self==value.
- __init__(agent_lr_factor: ~nip.parameters.agents.LrFactors | dict | None = None, body_lr_factor: ~nip.parameters.agents.LrFactors | dict | None = None, update_schedule: ~nip.parameters.update_schedule.AgentUpdateSchedule = ConstantUpdateSchedule(), use_manual_architecture: bool = False, normalize_message_history: bool = False, load_checkpoint_and_parameters: bool = False, checkpoint_entity: str = <factory>, checkpoint_project: str = <factory>, checkpoint_run_id: str | None = None, checkpoint_version: str = 'latest', use_orthogonal_initialisation: bool = True, orthogonal_initialisation_gain: float = 1.0) None#
- __repr__()#
Return repr(self).
- 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_dictmethod. This dictionary may contain a_typekey, 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 construct_test_params() BaseHyperParameters[source]#
Construct a set of basic parameters for testing.
- classmethod from_dict(params_dict: dict, ignore_extra_keys: bool = False) AgentsParameters[source]#
Create a parameters object from a dictionary.
- get(address: str) Any[source]#
Get a value from the parameters object using a dot-separated address.