Repository navigation
Conversation
…rator state when there is a change (#54623)" This reverts commit 7cb74e8. Signed-off-by: Alexey Kudinkin <[email protected]>
There was a problem hiding this comment.
Summary of Changes
Hello @alexeykudinkin, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
This pull request is a revert of a previous change that aimed to update the Export API metadata and refresh the dataset/operator state when there was a change. The original commit broke the master branch due to a conflict with another pull request. My primary goal with this revert is to restore stability to the master branch by removing the conflicting changes. This involves undoing the introduction of detailed state and timing information for datasets and operators within the Export API, simplifying the relevant protobuf definitions, and removing the associated state management logic from the codebase.
Highlights
- Revert of Detailed State Tracking: Reverted the introduction of detailed state tracking (e.g., PENDING, RUNNING, FINISHED, FAILED states) and execution timing (execution_start_time, execution_end_time) for Ray Data datasets and individual operators within the Export API.
- DatasetState Enum Relocation and Simplification: Removed the DatasetState enum from its original location (
python/ray/data/_internal/execution/dataset_state.py) and simplified its definition, moving it topython/ray/data/_internal/stats.py. - Codebase Cleanup: Cleaned up the
streaming_executor.pyandmetadata_exporter.pyfiles by removing references and logic related to the detailed state and timing metadata. - Protobuf Definition Simplification: Removed corresponding fields and enums from the
export_dataset_metadata.protoprotobuf definition, simplifying the data structure for exported metadata. - Test Removal: Deleted unit tests specifically designed to verify the functionality of updating dataset and operator metadata states, as this functionality is no longer present.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments or fill out our survey to provide feedback.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
There was a problem hiding this comment.
Code Review
This pull request reverts a previous commit to fix a build issue on the master branch. The changes primarily involve removing the recently added functionality for exporting dataset and operator state metadata. The revert appears to be correct and addresses the issue. I've included a couple of minor suggestions to improve code style related to an import statement.
| Topology, | ||
| get_dataset_metadata_exporter, | ||
| ) | ||
| from ray.data._internal.metadata_exporter import Topology, get_dataset_metadata_exporter |
There was a problem hiding this comment.
To adhere to PEP 8 guidelines, it's generally better to have imports at the top of the file. Since there doesn't appear to be a circular dependency, DatasetMetadata can be imported here instead of locally within the register_dataset function.1
Style Guide References
| from ray.data._internal.metadata_exporter import Topology, get_dataset_metadata_exporter | |
| from ray.data._internal.metadata_exporter import ( | |
| DatasetMetadata, | |
| Topology, | |
| get_dataset_metadata_exporter, | |
| ) |
Footnotes
-
PEP 8 recommends placing all imports at the top of the file, after module docstrings and before globals. Local imports should only be used for specific reasons like avoiding circular dependencies, which doesn't seem to be the case here. ↩
| from ray.data._internal.metadata_exporter import DatasetMetadata | ||
|
|
…es (#55355) <!-- Thank you for your contribution! Please review https://github.com/ray-project/ray/blob/master/CONTRIBUTING.rst before opening a pull request. --> <!-- Please add a reviewer to the assignee section when you create a PR. If you don't have the access to it, we will shortly find a reviewer and assign them to your PR. --> ## Why are these changes needed? This PR is a revert of [#55333](#55333) and resolves conflict by [#55163](#55163) Original description: Some frequently used metadata fields are missing in the export API schema: - For both dataset and operator: state, execution start and end time These fields are important for us to observe the lifecycle of the datasets and operators, and can be used to improve the accuracy of reported metrics, such as throughput, which relies on the duration. <!-- Please give a short summary of the change and the problem this solves. --> Summary of change: - Add state, execution start and end time at the export API schema - Add a new state enum `PENDING` for dataset and operator, to represent the state when they are not running yet. - Refresh the metadata when ever the state of dataset/operator gets updated. And the event will always contains the latest snapshot of all the metadata. ## Related issue number <!-- For example: "Closes #1234" --> ## Checks - [X] I've signed off every commit(by using the -s flag, i.e., `git commit -s`) in this PR. - [X] I've run `scripts/format.sh` to lint the changes in this PR. - [ ] I've included any doc changes needed for https://docs.ray.io/en/master/. - [ ] I've added any new APIs to the API Reference. For example, if I added a method in Tune, I've added it in `doc/source/tune/api/` under the corresponding `.rst` file. - [ ] I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/ - Testing Strategy - [X] Unit tests - [ ] Release tests - [ ] This PR is not tested :( Signed-off-by: cong.qian <[email protected]>
…rator state when there is a change (ray-project#54623)" (ray-project#55333) reverts commit 7cb74e8, that broke master branch due to conflict with ray-project#55163 Signed-off-by: Alexey Kudinkin <[email protected]> Signed-off-by: Andrew Grosser <[email protected]>
…es (ray-project#55355) <!-- Thank you for your contribution! Please review https://github.com/ray-project/ray/blob/master/CONTRIBUTING.rst before opening a pull request. --> <!-- Please add a reviewer to the assignee section when you create a PR. If you don't have the access to it, we will shortly find a reviewer and assign them to your PR. --> ## Why are these changes needed? This PR is a revert of [ray-project#55333](ray-project#55333) and resolves conflict by [ray-project#55163](ray-project#55163) Original description: Some frequently used metadata fields are missing in the export API schema: - For both dataset and operator: state, execution start and end time These fields are important for us to observe the lifecycle of the datasets and operators, and can be used to improve the accuracy of reported metrics, such as throughput, which relies on the duration. <!-- Please give a short summary of the change and the problem this solves. --> Summary of change: - Add state, execution start and end time at the export API schema - Add a new state enum `PENDING` for dataset and operator, to represent the state when they are not running yet. - Refresh the metadata when ever the state of dataset/operator gets updated. And the event will always contains the latest snapshot of all the metadata. ## Related issue number <!-- For example: "Closes ray-project#1234" --> ## Checks - [X] I've signed off every commit(by using the -s flag, i.e., `git commit -s`) in this PR. - [X] I've run `scripts/format.sh` to lint the changes in this PR. - [ ] I've included any doc changes needed for https://docs.ray.io/en/master/. - [ ] I've added any new APIs to the API Reference. For example, if I added a method in Tune, I've added it in `doc/source/tune/api/` under the corresponding `.rst` file. - [ ] I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/ - Testing Strategy - [X] Unit tests - [ ] Release tests - [ ] This PR is not tested :( Signed-off-by: cong.qian <[email protected]> Signed-off-by: Andrew Grosser <[email protected]>
…rator state when there is a change (ray-project#54623)" (ray-project#55333) reverts commit 7cb74e8, that broke master branch due to conflict with ray-project#55163 Signed-off-by: Alexey Kudinkin <[email protected]> Signed-off-by: jugalshah291 <[email protected]>
…es (ray-project#55355) <!-- Thank you for your contribution! Please review https://github.com/ray-project/ray/blob/master/CONTRIBUTING.rst before opening a pull request. --> <!-- Please add a reviewer to the assignee section when you create a PR. If you don't have the access to it, we will shortly find a reviewer and assign them to your PR. --> ## Why are these changes needed? This PR is a revert of [ray-project#55333](ray-project#55333) and resolves conflict by [ray-project#55163](ray-project#55163) Original description: Some frequently used metadata fields are missing in the export API schema: - For both dataset and operator: state, execution start and end time These fields are important for us to observe the lifecycle of the datasets and operators, and can be used to improve the accuracy of reported metrics, such as throughput, which relies on the duration. <!-- Please give a short summary of the change and the problem this solves. --> Summary of change: - Add state, execution start and end time at the export API schema - Add a new state enum `PENDING` for dataset and operator, to represent the state when they are not running yet. - Refresh the metadata when ever the state of dataset/operator gets updated. And the event will always contains the latest snapshot of all the metadata. ## Related issue number <!-- For example: "Closes ray-project#1234" --> ## Checks - [X] I've signed off every commit(by using the -s flag, i.e., `git commit -s`) in this PR. - [X] I've run `scripts/format.sh` to lint the changes in this PR. - [ ] I've included any doc changes needed for https://docs.ray.io/en/master/. - [ ] I've added any new APIs to the API Reference. For example, if I added a method in Tune, I've added it in `doc/source/tune/api/` under the corresponding `.rst` file. - [ ] I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/ - Testing Strategy - [X] Unit tests - [ ] Release tests - [ ] This PR is not tested :( Signed-off-by: cong.qian <[email protected]> Signed-off-by: jugalshah291 <[email protected]>
…rator state when there is a change (ray-project#54623)" (ray-project#55333) reverts commit 7cb74e8, that broke master branch due to conflict with ray-project#55163 Signed-off-by: Alexey Kudinkin <[email protected]> Signed-off-by: Douglas Strodtman <[email protected]>
…es (ray-project#55355) <!-- Thank you for your contribution! Please review https://github.com/ray-project/ray/blob/master/CONTRIBUTING.rst before opening a pull request. --> <!-- Please add a reviewer to the assignee section when you create a PR. If you don't have the access to it, we will shortly find a reviewer and assign them to your PR. --> ## Why are these changes needed? This PR is a revert of [ray-project#55333](ray-project#55333) and resolves conflict by [ray-project#55163](ray-project#55163) Original description: Some frequently used metadata fields are missing in the export API schema: - For both dataset and operator: state, execution start and end time These fields are important for us to observe the lifecycle of the datasets and operators, and can be used to improve the accuracy of reported metrics, such as throughput, which relies on the duration. <!-- Please give a short summary of the change and the problem this solves. --> Summary of change: - Add state, execution start and end time at the export API schema - Add a new state enum `PENDING` for dataset and operator, to represent the state when they are not running yet. - Refresh the metadata when ever the state of dataset/operator gets updated. And the event will always contains the latest snapshot of all the metadata. ## Related issue number <!-- For example: "Closes ray-project#1234" --> ## Checks - [X] I've signed off every commit(by using the -s flag, i.e., `git commit -s`) in this PR. - [X] I've run `scripts/format.sh` to lint the changes in this PR. - [ ] I've included any doc changes needed for https://docs.ray.io/en/master/. - [ ] I've added any new APIs to the API Reference. For example, if I added a method in Tune, I've added it in `doc/source/tune/api/` under the corresponding `.rst` file. - [ ] I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/ - Testing Strategy - [X] Unit tests - [ ] Release tests - [ ] This PR is not tested :( Signed-off-by: cong.qian <[email protected]> Signed-off-by: Douglas Strodtman <[email protected]>
Why are these changes needed?
This reverts commit 7cb74e8, that broke master due to conflict with #55163
Related issue number
Checks
git commit -s) in this PR.scripts/format.shto lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/under thecorresponding
.rstfile.