skypilot-org / skypilot

SkyPilot: Run AI and batch jobs on any infra (Kubernetes or 12+ clouds). Get unified execution, cost savings, and high GPU availability via a simple interface.
https://skypilot.readthedocs.io
Apache License 2.0
6.82k stars 512 forks source link

[timeline] disable trace collection if SKYPILOT_TIMELINE_FILE_PATH is not set #4340

Open cg505 opened 1 week ago

cg505 commented 1 week ago

This is a tiny performance penalty from timeline trace collection. Currently we unconditionally collect the trace info, but only write it to a file if the SKYPILOT_TIMELINE_FILE_PATH env var is set. Instead, we could check if this env var is set on startup, and only keep the trace info in memory if it is.

ref https://github.com/skypilot-org/skypilot/pull/4331#discussion_r1837316232