[core] Split raylet cython file into multiple files (timeseries_utils.pxi)
This is a sub issue of #51080.
Proposed Changes:
Move the code from ray/python/ray/includes/timeseries_utils.pxi into a new, dedicated file: ray/python/ray/serve/_private/timeseries_utils.pyx.
Rationale:
Currently, this file is being included through the massive _raylet.pyx file. However, it appears that only serve/_private/metrics_utils.py depends on the functions inside timeseries_utils.pxi.
Extracting this into its own file will help achieve the goal of #51080 (reducing the build time for the core raylet cython file) while having minimal impact on existing code dependencies.
Hi @edoakes, I'd like to pick this up, since #63256 was closed as stale in August. Plan: move python/ray/includes/timeseries_utils.pxi into its own Cython module next to its only user, python/ray/serve/_private/metrics_utils.py, as the issue proposes; remove its include from _raylet.pyx; add the build target; and update the import. Behaviour should be identical. I'll run the Serve metrics tests and confirm _raylet still builds without it. Is chillCode404 still working on this, and is there an existing Cython extension target you'd like me to copy for the new module? Could you assign it to me?