Profiling SLM Lab
⏱️ Profiling Runtime
conda activate lab
pip install snakeviz
# say, to profile A2C on Pong
python -m cProfile -o a2c.prof run_lab.py slm_lab/spec/benchmark/a2c_gae_pong.json a2c_gae_pong train
# then Ctrl+C to kill the process after some time to collect runtime data
# use snakeviz to render graphs
snakeviz a2c.prof
# a browser will open, showing the runtime breakdownLast updated
Was this helpful?