intelligent-environments-lab / CityLearn

Official reinforcement learning environment for demand response and load shaping
MIT License
462 stars 167 forks source link

Reduce simulation and RL training time #40

Closed kingsleynweye closed 1 year ago

kingsleynweye commented 1 year ago

As a CityLearn developer, I want to speed up the training of RL agents so that I can use fewer HPC resources for simulations, train for longer episodes and scale up my district size.

This enhancement only applies to the internally defined RL agents in CityLearn:

  1. sac.py
  2. marlisa.py

The citylearn.py, building.py and energy_model.py can also benefit from source code optimization for speed.

One approach can be to profile the simulation of the SAC agent example in example.ipynb.

Acceptance Criteria

References

  1. [Python Profilers]((https://docs.python.org/3/library/profile.html)
  2. [How do I profile a Python script?](https://stackoverflow.com/questions/582336/how-do-i-profile-a-python-script)