[train] train v1 export api#51177
Merged
matthewdeng merged 7 commits intoray-project:masterfrom Mar 14, 2025
Merged
Conversation
Signed-off-by: Matthew Deng <matt@anyscale.com>
Signed-off-by: Matthew Deng <matt@anyscale.com>
| ) | ||
|
|
||
| TRAIN_SCHEMA_VERSION = 0 | ||
| TRAIN_SCHEMA_VERSION = 1 |
Contributor
There was a problem hiding this comment.
how do we decide when to update this value? maybe add a comment above, illustrating when to increment this value, i.e., upon x, y, z files being updated. Or is it just a differentiator between train v1 and v2?
hongpeng-guo
approved these changes
Mar 13, 2025
|
|
||
| core_context = ray.runtime_context.get_runtime_context() | ||
| controller_log_file_path = ( | ||
| ray._private.worker.global_worker.get_err_file_path() |
Contributor
There was a problem hiding this comment.
I think by default the python loggers write to process .err file. But it would be better to double check if we may lose anything that are unique to the .out file.
I think the udf print func may write to the .out file of the worker process.
Contributor
Author
There was a problem hiding this comment.
Yep this is just best effort.
park12sj
pushed a commit
to park12sj/ray
that referenced
this pull request
Mar 18, 2025
This PR implements the export API for Ray Train V1 state. This builds on top of ray-project#50622, which implements the export API for Ray Train V2. ## Key Changes - Added `export.py` with conversion functions between Train V1 state models and Train (V2) state export protobuf - Updated `TrainRunInfo` and `TrainWorkerInfo` schemas with additional fields for compatibility: - Log file paths for controller and workers - Note that these point to the Ray worker stderr logs, rather than specific train logs. - Resource allocation information - Made worker status a required field - Note that it is always set as ACTIVE for now. Signed-off-by: Matthew Deng <matt@anyscale.com>
dhakshin32
pushed a commit
to dhakshin32/ray
that referenced
this pull request
Mar 27, 2025
This PR implements the export API for Ray Train V1 state. This builds on top of ray-project#50622, which implements the export API for Ray Train V2. ## Key Changes - Added `export.py` with conversion functions between Train V1 state models and Train (V2) state export protobuf - Updated `TrainRunInfo` and `TrainWorkerInfo` schemas with additional fields for compatibility: - Log file paths for controller and workers - Note that these point to the Ray worker stderr logs, rather than specific train logs. - Resource allocation information - Made worker status a required field - Note that it is always set as ACTIVE for now. Signed-off-by: Matthew Deng <matt@anyscale.com> Signed-off-by: Dhakshin Suriakannu <d_suriakannu@apple.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements the export API for Ray Train V1 state. This builds on top of #50622, which implements the export API for Ray Train V2.
Key Changes
export.pywith conversion functions between Train V1 state models and Train (V2) state export protobufTrainRunInfoandTrainWorkerInfoschemas with additional fields for compatibility: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.