eta_ctrl.config.config_settings module

eta_ctrl.config.config_settings.convert_datetime(datetime_: str) datetime[source]

Convert a string to a datetime object using pandas.

class eta_ctrl.config.config_settings.ConfigSettings(*, seed=None, verbose=2, n_environments=1, n_episodes_play=None, n_episodes_learn=None, interact_with_env=False, save_model_every_x_episodes=10, plot_interval=10, scenario_time_begin: str | None = None, scenario_time_end: str | None = None, use_random_time_slice: bool = False, episode_duration, sampling_time, sim_steps_per_sample=None, scale_actions=None, round_actions=None, environment=NOTHING, interaction_env: dict[str, Any] | None = None, agent=NOTHING, log_to_file=True)[source]

Bases: object

seed: int | None

Seed for random sampling (default: None).

verbose: int

Logging verbosity of the framework (default: 2).

n_environments: int

Number of vectorized environments to instantiate (if not using DummyVecEnv) (default: 1).

n_episodes_play: int | None

Number of episodes to execute when the agent is playing (default: None).

n_episodes_learn: int | None

Number of episodes to execute when the agent is learning (default: None).

interact_with_env: bool

Flag to determine whether the interaction env is used or not (default: False).

save_model_every_x_episodes: int

How often to save the model during training (default: 10 - after every ten episodes).

plot_interval: int

How many episodes to pass between each render call (default: 10 - after every ten episodes).

scenario_time_begin: datetime | None

Beginning time of the scenario.

scenario_time_end: datetime | None

Ending time of the scenario.

use_random_time_slice: bool

Boolean flag whether to use a random time slice when the difference of scenario_time_end and scenario_time_begin is greater than the episode duration (default: False).

episode_duration: float

Duration of an episode in seconds (can be a float value).

sampling_time: float

Duration between time samples in seconds (can be a float value).

sim_steps_per_sample: int | None

Simulation steps for every sample.

scale_actions: float | None

Multiplier for scaling the agent actions before passing them to the environment (especially useful with interaction environments) (default: None).

round_actions: int | None

Number of digits to round actions to before passing them to the environment (especially useful with interaction environments) (default: None).

environment: dict[str, Any]

Settings dictionary for the environment.

interaction_env: dict[str, Any] | None

Settings dictionary for the interaction environment (default: None).

agent: dict[str, Any]

Settings dictionary for the agent.

log_to_file: bool

Flag which is true if the log output should be written to a file

classmethod from_dict(dikt: dict[str, dict[str, Any]]) ConfigSettings[source]
create_scenario_manager(scenarios_path: Path | None = None) None[source]

Create a ScenarioManager for the environment.

Parameters:

scenarios_path (Path) – Path to the scenario files, default None.