Skip to content

RuntimeContext ​

python
RuntimeContext(config: ConfigT, actor_device: torch.device, learner_device: torch.device, stop_event: Event, metrics: MetricsTracker, game_configuration: GameConfiguration, model_configuration: ModelConfiguration, training_configuration: TrainingConfiguration) -> None

Shared per-run wiring passed to every training component.

Bundles the experiment configuration, devices, stop signal, metrics tracker and OakEmu configurations that previously had to be threaded through every constructor, so components only declare their component-specific inputs. Agents run on actor_device; learners run on learner_device.

Source

Values ​

actor_device ​

python
actor_device: torch.device

The device environment-interacting components run inference on.

Source

config ​

python
config: ConfigT

The experiment configuration.

Source

game_configuration ​

python
game_configuration: GameConfiguration

OakEmu game configuration.

Source

learner_device ​

python
learner_device: torch.device

The device learners run training on.

Source

metrics ​

python
metrics: MetricsTracker

Tracker for logging metrics.

Source

model_configuration ​

python
model_configuration: ModelConfiguration

OakEmu model configuration.

Source

stop_event ​

python
stop_event: Event

Event signalling that all components should stop.

Source

training_configuration ​

python
training_configuration: TrainingConfiguration

OakEmu training configuration.

Source