Command-line examples
Use Python 3.11 or newer for CLI training/evaluation. The current CLI also imports Stable Baselines3. Install both packages in the notebook environment:
[ ]:
%pip install citylearn "stable-baselines3==2.3.2"
The CityLearn installation comes with a CLI for running simulations. The CLI is useful for use cases where multiple environment-agent setups that have been defined in schemas need to be submitted as 1 job for parallel running e.g. in an HPC.
The CLI documentation is returned by executing the following in a shell terminal or PowerShell:
[ ]:
!python -m citylearn -h
Running a Simulation using the CLI
The simulate command is used to train or evaluate a trained agent:
See the running guide for complete training/evaluation commands and the CLI reference for all arguments.
[ ]:
!python -m citylearn simulate -h