ray.timeline#

ray.timeline(filename=None)[source]#

Return a list of profiling events that can viewed as a timeline.

Ray profiling must be enabled by setting the RAY_PROFILING=1 environment variable prior to starting Ray, and RAY_task_events_report_interval_ms set to be positive (default 1000)

To view this information as a timeline, simply dump it as a json file by passing in “filename” or using using json.dump, and then load go to chrome://tracing in the Chrome web browser and load the dumped file.

Parameters:

filename – If a filename is provided, the timeline is dumped to that file.

Returns:

If filename is not provided, this returns a list of profiling events.

Each profile event is a dictionary.

DeveloperAPI: This API may change across minor Ray releases.