Getting StartedΒΆ
Setup Configuration
Customize the
dc_config.json
file to specify your DC environment settings. To learn more about the DC parameters you can customize, check Data Center Configuration FileEnvironment Configuration
The main environment for wrapping the environments is
sustaindc_env.py
, which reads configurations from theEnvConfig
class and manages the external data sources using managers for weather, carbon intensity, and workload. For instructions how to customize the enviroment configuration, check Main Configuration FileTrain Example:
Specify
location
insideharl.configs.envs_cfgs.sustaindc.yaml
. Specify other algorithm hyperparameteres inharl.configs.algos_cfgs.happo.yaml
. User can also specify the choice of reinforcement learning vs baseline agents in thehappo.yaml
python train_sustaindc.py --algo happo --exp_name happo
Evaluation Example:
To evaluate the trained model run:
python eval_sustaindc.py
The results are stored in the SAVE_EVAL
folder. This can be modified inside eval_sustaindc.py
with other experiment identifiers such as checkpoint
, location
and run
Running in background mode
If you want to run the SustainDC framework in background mode use:
nohup python PYTHON_SCRIPT > OUTPUT_FILE.txt &
where PYTHON_SCRIPT
is the script you want to run (e.g., train_sustaindc.py
) and OUTPUT_FILE
is the name of the file that will contain the output (e.g. latest_experiment_output
)
Monitor the results
The training logs and the results of each trial are stored in the specified local directory, under a sub-folder called results
and can be visualized with TensorBoard by specifying the output directory of the results
Example:
tensorboard --logdir ./results/dcrl/<location>/happo
A detailed description of the configurations are provided in the Custom Use section.