ray-project / ray

Ray is a unified framework for scaling AI and Python applications. Ray consists of a core distributed runtime and a set of AI Libraries for accelerating ML workloads.
https://ray.io
Apache License 2.0
32.95k stars 5.58k forks source link

[Core] Allow customizing session name #46281

Open han-steve opened 2 months ago

han-steve commented 2 months ago

Description

Currently, the session name for a ray cluster is set to session_{timestamp}_{pid} (documentation), which is hard to retrieve/predict. We want to provide users the Grafana metrics for their KubeRay ray cluster, but we don't know what the SessionName label filter should be set to. If we can customize the session name as a command-line argument to ray start, we can generate a unique name and pass it to the Kuberay as RayStartParams. Then, we can easily filter the prometheus metrics with this name.

There is another thread for a similar request for a different reason: https://discuss.ray.io/t/how-to-change-the-ray-session-name-format/9217

Use case

Another solution to our use case is to have the KubeRay operator find this session name and surface it to the RayCluster CRD. If this is preferred, I can open an issue in the KubeRay repo.

enori commented 2 months ago

Hi, I would like to take on this issue. I'm a begginer to this project and open-source contributions, but I'm eager to learn and contribute if necessary. Thanks!

jjyao commented 3 weeks ago

There is code that depends on the session name being this particular format. I think it's safer to retrieve the ray auto generated session name and expose it to the users.