csle_agents.agents.ppg_clean package

Submodules

csle_agents.agents.ppg_clean.ppg_clean_agent module

MIT License

Copyright (c) 2019 CleanRL developers https://github.com/vwxyzjn/cleanrl

class csle_agents.agents.ppg_clean.ppg_clean_agent.PPGCleanAgent(simulation_env_config: csle_common.dao.simulation_config.simulation_env_config.SimulationEnvConfig, emulation_env_config: Union[None, csle_common.dao.emulation_config.emulation_env_config.EmulationEnvConfig], experiment_config: csle_common.dao.training.experiment_config.ExperimentConfig, training_job: Optional[csle_common.dao.jobs.training_job_config.TrainingJobConfig] = None, save_to_metastore: bool = True)[source]

Bases: csle_agents.agents.base.base_agent.BaseAgent

A Phasic Policy Gradient agent using the implementation from CleanRL

hparam_names() List[str][source]
Returns

a list with the hyperparameter names

make_env() Callable[[], gymnasium.wrappers.record_episode_statistics.RecordEpisodeStatistics][source]

Helper function for creating the environment to use for training

Returns

a function that creates the environment

run_ppg(exp_result: csle_common.dao.training.experiment_result.ExperimentResult, seed: int) Tuple[csle_common.dao.training.experiment_result.ExperimentResult, csle_common.dao.simulation_config.base_env.BaseEnv, csle_common.models.ppo_network.PPONetwork][source]

Runs PPG with a given seed

Parameters
  • exp_result – the object to save the experiment results

  • seed – the random seed

Returns

the updated experiment results, the environment, and the trained model

train() csle_common.dao.training.experiment_execution.ExperimentExecution[source]

Runs the training process

Returns

the results

Module contents