Skip to content

[data] documentation for ray data metrics#58610

Merged
richardliaw merged 3 commits intoray-project:masterfrom
iamjustinhsu:jhsu/ray-data-metrics-documentation
Nov 15, 2025
Merged

[data] documentation for ray data metrics#58610
richardliaw merged 3 commits intoray-project:masterfrom
iamjustinhsu:jhsu/ray-data-metrics-documentation

Conversation

@iamjustinhsu
Copy link
Contributor

@iamjustinhsu iamjustinhsu commented Nov 14, 2025

Description

Adds ray data metrics documentation for visibility. This should be periodically updated with the latest metrics.

Related issues

None

Additional information

None

Signed-off-by: iamjustinhsu <jhsu@anyscale.com>
@iamjustinhsu iamjustinhsu requested a review from a team as a code owner November 14, 2025 00:41
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds valuable documentation for Ray Data's Prometheus metrics, which will greatly help users in monitoring their data workloads. The structure is clear and the information is comprehensive. I've provided a few suggestions to enhance the accuracy and clarity of some metric descriptions and to remove a redundant note, ensuring the documentation is as precise as possible.

* - `data_freed_bytes`
- Bytes freed by dataset operators
* - `data_current_bytes`
- Bytes in the memory store used by dataset operators
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For clarity and consistency with Ray's terminology, it's better to use 'object store memory' instead of 'memory store'.

Suggested change
- Bytes in the memory store used by dataset operators
- Bytes of object store memory used by dataset operators

* - `average_bytes_inputs_per_task`
- Average size in bytes of ref bundles passed to tasks, or `None` if no tasks submitted
* - `average_rows_inputs_per_task`
- Average number of rows passed in to the task, or `None` if no task submitted
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To be more precise and consistent with the source code documentation, it's better to specify that this is the average number of rows in the input blocks.

Suggested change
- Average number of rows passed in to the task, or `None` if no task submitted
- Average number of rows in input blocks per task, or `None` if no task submitted

* - `rows_task_outputs_generated`
- Number of output rows generated by tasks
* - `row_outputs_taken`
- Number of rows taken by downstream operators
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Adding 'that are already' makes the description more precise, aligning it better with the source code's description.

Suggested change
- Number of rows taken by downstream operators
- Number of rows that are already taken by downstream operators

* - `row_outputs_taken`
- Number of rows taken by downstream operators
* - `block_outputs_taken`
- Number of blocks taken by downstream operators
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Adding 'that are already' makes the description more precise, aligning it better with the source code's description.

Suggested change
- Number of blocks taken by downstream operators
- Number of blocks that are already taken by downstream operators

* - `block_outputs_taken`
- Number of blocks taken by downstream operators
* - `num_outputs_taken`
- Number of output blocks taken by downstream operators
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Adding 'that are already' makes the description more precise, aligning it better with the source code's description.

Suggested change
- Number of output blocks taken by downstream operators
- Number of output blocks that are already taken by downstream operators

* - `num_outputs_taken`
- Number of output blocks taken by downstream operators
* - `bytes_outputs_taken`
- Byte size of output blocks taken by downstream operators
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Adding 'that are already' makes the description more precise, aligning it better with the source code's description.

Suggested change
- Byte size of output blocks taken by downstream operators
- Byte size of output blocks that are already taken by downstream operators

* - `bytes_outputs_taken`
- Byte size of output blocks taken by downstream operators
* - `num_outputs_of_finished_tasks`
- Number of generated output blocks from finished tasks
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Adding 'that are' makes the description more precise, aligning it better with the source code's description.

Suggested change
- Number of generated output blocks from finished tasks
- Number of generated output blocks that are from finished tasks

* - `task_completion_time`
- Histogram of time spent running tasks to completion
* - `block_completion_time`
- Histogram of time spent running a single block to completion
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The source code mentions an important detail about how this metric is approximated when multiple blocks are generated per task. It would be beneficial to include this in the documentation for accuracy.

Suggested change
- Histogram of time spent running a single block to completion
- Histogram of time spent running a single block to completion. If multiple blocks are generated per task, this is approximated by assuming each block took an equal amount of time to process.

Comment on lines +330 to +331
.. note::
Most metrics are only available for physical operators that use the map operation, such as operators created by :meth:`~ray.data.Dataset.map_batches`, :meth:`~ray.data.Dataset.map`, and :meth:`~ray.data.Dataset.flat_map`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This note is redundant as a similar note is already present at a higher level in the document (line 53), which applies to this section as well. Removing this duplication will improve the document's clarity.

Signed-off-by: iamjustinhsu <jhsu@anyscale.com>
@ray-gardener ray-gardener bot added docs An issue or change related to documentation data Ray Data-related issues labels Nov 14, 2025
Copy link
Contributor

@richardliaw richardliaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if you can automatically generate this in the future like what we do for all of our API docs

@richardliaw richardliaw added the go add ONLY when ready to merge, run all tests label Nov 15, 2025
@richardliaw richardliaw enabled auto-merge (squash) November 15, 2025 01:37
@richardliaw richardliaw merged commit ec680fa into ray-project:master Nov 15, 2025
8 checks passed
justinrmiller pushed a commit to justinrmiller/ray that referenced this pull request Nov 15, 2025
## Description
Adds ray data metrics documentation for visibility. This should be
periodically updated with the latest metrics.

## Related issues
None

## Additional information
None

---------

Signed-off-by: iamjustinhsu <jhsu@anyscale.com>
Signed-off-by: Justin Miller <justinrmiller@gmail.com>
ArturNiederfahrenhorst pushed a commit to ArturNiederfahrenhorst/ray that referenced this pull request Nov 16, 2025
## Description
Adds ray data metrics documentation for visibility. This should be
periodically updated with the latest metrics.

## Related issues
None

## Additional information
None

---------

Signed-off-by: iamjustinhsu <jhsu@anyscale.com>
Aydin-ab pushed a commit to Aydin-ab/ray-aydin that referenced this pull request Nov 19, 2025
## Description
Adds ray data metrics documentation for visibility. This should be
periodically updated with the latest metrics.

## Related issues
None

## Additional information
None

---------

Signed-off-by: iamjustinhsu <jhsu@anyscale.com>
Signed-off-by: Aydin Abiar <aydin@anyscale.com>
ykdojo pushed a commit to ykdojo/ray that referenced this pull request Nov 27, 2025
## Description
Adds ray data metrics documentation for visibility. This should be
periodically updated with the latest metrics.

## Related issues
None

## Additional information
None

---------

Signed-off-by: iamjustinhsu <jhsu@anyscale.com>
Signed-off-by: YK <1811651+ykdojo@users.noreply.github.com>
SheldonTsen pushed a commit to SheldonTsen/ray that referenced this pull request Dec 1, 2025
## Description
Adds ray data metrics documentation for visibility. This should be
periodically updated with the latest metrics.

## Related issues
None

## Additional information
None

---------

Signed-off-by: iamjustinhsu <jhsu@anyscale.com>
Future-Outlier pushed a commit to Future-Outlier/ray that referenced this pull request Dec 7, 2025
## Description
Adds ray data metrics documentation for visibility. This should be
periodically updated with the latest metrics.

## Related issues
None

## Additional information
None

---------

Signed-off-by: iamjustinhsu <jhsu@anyscale.com>
Signed-off-by: Future-Outlier <eric901201@gmail.com>
peterxcli pushed a commit to peterxcli/ray that referenced this pull request Feb 25, 2026
## Description
Adds ray data metrics documentation for visibility. This should be
periodically updated with the latest metrics.

## Related issues
None

## Additional information
None

---------

Signed-off-by: iamjustinhsu <jhsu@anyscale.com>
Signed-off-by: peterxcli <peterxcli@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

data Ray Data-related issues docs An issue or change related to documentation go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants