Profiling

using py-spy

py-spy record - o ./profile.svg -- <command>

speedscope integration

py-spy record -f speedscope -o ./profile.svg -- <command>

e.g.

py-spy record -f speedscope -o ./profile.svg -- rr_trading alg train -c ./trading/configs/multi_ticker_ppo.json
speedscope example