Added docstrings to class intialisers
This commit is contained in:
@@ -24,7 +24,8 @@ _EXAMPLE_TRAINING: Final[Path] = USERS_CONFIG_DIR / "example_config" / "training
|
||||
|
||||
|
||||
def main_training_config_path() -> Path:
|
||||
"""The path to the example training_config_main.yaml file.
|
||||
"""
|
||||
The path to the example training_config_main.yaml file.
|
||||
|
||||
:return: The file path.
|
||||
"""
|
||||
@@ -234,7 +235,8 @@ class TrainingConfig:
|
||||
|
||||
|
||||
def load(file_path: Union[str, Path], legacy_file: bool = False) -> TrainingConfig:
|
||||
"""Read in a training config yaml file.
|
||||
"""
|
||||
Read in a training config yaml file.
|
||||
|
||||
:param file_path: The config file path.
|
||||
:param legacy_file: True if the config file is legacy format, otherwise
|
||||
@@ -278,7 +280,8 @@ def convert_legacy_training_config_dict(
|
||||
action_type: ActionType = ActionType.ANY,
|
||||
num_steps: int = 256,
|
||||
) -> Dict[str, Any]:
|
||||
"""Convert a legacy training config dict to the new format.
|
||||
"""
|
||||
Convert a legacy training config dict to the new format.
|
||||
|
||||
:param legacy_config_dict: A legacy training config dict.
|
||||
:param agent_framework: The agent framework to use as legacy training configs don't have agent_framework values.
|
||||
@@ -305,7 +308,8 @@ def convert_legacy_training_config_dict(
|
||||
|
||||
|
||||
def _get_new_key_from_legacy(legacy_key: str) -> str:
|
||||
"""Maps legacy training config keys to the new format keys.
|
||||
"""
|
||||
Maps legacy training config keys to the new format keys.
|
||||
|
||||
:param legacy_key: A legacy training config key.
|
||||
:return: The mapped key.
|
||||
|
||||
Reference in New Issue
Block a user