- renamed _config_values_main to training_config.py and renamed the ConfigValuesMain class to TrainingConfig. Moved training_config.py to src/primaite/config/training_config.py - Renamed all training config yaml file keys to make creating an instance of TrainingConfig easier. Moved action_type and num_steps over to the training config. - Decoupled the training config and lay down config. - Refactored main.py so that it can be ran from CLI and can take a training config path and a lay down config path. - refactored all outputs so that they save to the session dir. - Added some necessary setup scripts that handle creating app dirs, fronting example config files to the user, fronting demo notebooks to the user, performing clean-up in between installations etc. - Added functions that attempt to retrieve the file path of users example config files that have been fronted by the primaite setup. - Added logging config and a getLogger function in the top-level init. - Refactored all logs entries logged to use a logger using the primaite logging config. - Added basic typer CLI for doing things like setup, viewing logs, viewing primaite version, running a basic session. - Updated test to use new features and config structures. - Began updating docs. More to do here.
90 lines
2.5 KiB
YAML
90 lines
2.5 KiB
YAML
# Main Config File
|
|
|
|
# Generic config values
|
|
# Choose one of these (dependent on Agent being trained)
|
|
# "STABLE_BASELINES3_PPO"
|
|
# "STABLE_BASELINES3_A2C"
|
|
# "GENERIC"
|
|
agentIdentifier: STABLE_BASELINES3_A2C
|
|
# Number of episodes to run per session
|
|
numEpisodes: 10
|
|
# Time delay between steps (for generic agents)
|
|
timeDelay: 10
|
|
# Filename of the scenario / laydown
|
|
configFilename: config_5_DATA_MANIPULATION.yaml
|
|
# Type of session to be run (TRAINING or EVALUATION)
|
|
sessionType: TRAINING
|
|
# Determine whether to load an agent from file
|
|
loadAgent: False
|
|
# File path and file name of agent if you're loading one in
|
|
agentLoadFile: C:\[Path]\[agent_saved_filename.zip]
|
|
|
|
# Environment config values
|
|
# The high value for the observation space
|
|
observationSpaceHighValue: 1000000000
|
|
|
|
# Reward values
|
|
# Generic
|
|
allOk: 0
|
|
# Node Hardware State
|
|
offShouldBeOn: -10
|
|
offShouldBeResetting: -5
|
|
onShouldBeOff: -2
|
|
onShouldBeResetting: -5
|
|
resettingShouldBeOn: -5
|
|
resettingShouldBeOff: -2
|
|
resetting: -3
|
|
# Node Software or Service State
|
|
goodShouldBePatching: 2
|
|
goodShouldBeCompromised: 5
|
|
goodShouldBeOverwhelmed: 5
|
|
patchingShouldBeGood: -5
|
|
patchingShouldBeCompromised: 2
|
|
patchingShouldBeOverwhelmed: 2
|
|
patching: -3
|
|
compromisedShouldBeGood: -20
|
|
compromisedShouldBePatching: -20
|
|
compromisedShouldBeOverwhelmed: -20
|
|
compromised: -20
|
|
overwhelmedShouldBeGood: -20
|
|
overwhelmedShouldBePatching: -20
|
|
overwhelmedShouldBeCompromised: -20
|
|
overwhelmed: -20
|
|
# Node File System State
|
|
goodShouldBeRepairing: 2
|
|
goodShouldBeRestoring: 2
|
|
goodShouldBeCorrupt: 5
|
|
goodShouldBeDestroyed: 10
|
|
repairingShouldBeGood: -5
|
|
repairingShouldBeRestoring: 2
|
|
repairingShouldBeCorrupt: 2
|
|
repairingShouldBeDestroyed: 0
|
|
repairing: -3
|
|
restoringShouldBeGood: -10
|
|
restoringShouldBeRepairing: -2
|
|
restoringShouldBeCorrupt: 1
|
|
restoringShouldBeDestroyed: 2
|
|
restoring: -6
|
|
corruptShouldBeGood: -10
|
|
corruptShouldBeRepairing: -10
|
|
corruptShouldBeRestoring: -10
|
|
corruptShouldBeDestroyed: 2
|
|
corrupt: -10
|
|
destroyedShouldBeGood: -20
|
|
destroyedShouldBeRepairing: -20
|
|
destroyedShouldBeRestoring: -20
|
|
destroyedShouldBeCorrupt: -20
|
|
destroyed: -20
|
|
scanning: -2
|
|
# IER status
|
|
redIerRunning: -5
|
|
greenIerBlocked: -10
|
|
|
|
# Patching / Reset durations
|
|
osPatchingDuration: 5 # The time taken to patch the OS
|
|
nodeResetDuration: 5 # The time taken to reset a node (hardware)
|
|
servicePatchingDuration: 5 # The time taken to patch a service
|
|
fileSystemRepairingLimit: 5 # The time take to repair the file system
|
|
fileSystemRestoringLimit: 5 # The time take to restore the file system
|
|
fileSystemScanningLimit: 5 # The time taken to scan the file system
|