[train] Create top-level ray.train aliases for public APIs#57758
[train] Create top-level ray.train aliases for public APIs#57758justinvyu merged 15 commits intoray-project:masterfrom
Conversation
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
There was a problem hiding this comment.
Code Review
This pull request refactors Ray Train's public API by creating top-level aliases for TrainingFailedError, WorkerGroupError, ControllerError, and TrainContext in the ray.train namespace. This is a good improvement for user experience, as it avoids imports from internal modules. The changes in the documentation and the __init__.py file are mostly correct. I've found a couple of minor issues regarding redundancy and consistency in __init__.py and have left specific comments with suggestions to address them.
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
doc/source/train/api/api.rst
Outdated
| ~train.v2.api.exceptions.WorkerGroupError | ||
| ~train.ControllerError | ||
| ~train.WorkerGroupError | ||
| ~train.TrainingFailedError |
There was a problem hiding this comment.
curious how the generated doc looks like for this since it's just a union of the other two errors
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
aslonnie
left a comment
There was a problem hiding this comment.
approve for check_api_discrepancy change
…ct#57758) Add top-level aliases for public APIs. Users should never import from internal modules. This includes: * `ray.train.TrainingFailedError` * `ray.train.WorkerGroupError` * `ray.train.ControllerError` * `ray.train.TrainContext` Also removes the top-level `ray.train.TrainingIterator` import since this is a V1 DeveloperAPI that shouldn't be imported anymore. --------- Signed-off-by: Justin Yu <justinvyu@anyscale.com>
…ct#57758) Add top-level aliases for public APIs. Users should never import from internal modules. This includes: * `ray.train.TrainingFailedError` * `ray.train.WorkerGroupError` * `ray.train.ControllerError` * `ray.train.TrainContext` Also removes the top-level `ray.train.TrainingIterator` import since this is a V1 DeveloperAPI that shouldn't be imported anymore. --------- Signed-off-by: Justin Yu <justinvyu@anyscale.com> Signed-off-by: xgui <xgui@anyscale.com>
Add top-level aliases for public APIs. Users should never import from internal modules. This includes: * `ray.train.TrainingFailedError` * `ray.train.WorkerGroupError` * `ray.train.ControllerError` * `ray.train.TrainContext` Also removes the top-level `ray.train.TrainingIterator` import since this is a V1 DeveloperAPI that shouldn't be imported anymore. --------- Signed-off-by: Justin Yu <justinvyu@anyscale.com> Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>
…ct#57758) Add top-level aliases for public APIs. Users should never import from internal modules. This includes: * `ray.train.TrainingFailedError` * `ray.train.WorkerGroupError` * `ray.train.ControllerError` * `ray.train.TrainContext` Also removes the top-level `ray.train.TrainingIterator` import since this is a V1 DeveloperAPI that shouldn't be imported anymore. --------- Signed-off-by: Justin Yu <justinvyu@anyscale.com>
…ct#57758) Add top-level aliases for public APIs. Users should never import from internal modules. This includes: * `ray.train.TrainingFailedError` * `ray.train.WorkerGroupError` * `ray.train.ControllerError` * `ray.train.TrainContext` Also removes the top-level `ray.train.TrainingIterator` import since this is a V1 DeveloperAPI that shouldn't be imported anymore. --------- Signed-off-by: Justin Yu <justinvyu@anyscale.com> Signed-off-by: Aydin Abiar <aydin@anyscale.com>
…ct#57758) Add top-level aliases for public APIs. Users should never import from internal modules. This includes: * `ray.train.TrainingFailedError` * `ray.train.WorkerGroupError` * `ray.train.ControllerError` * `ray.train.TrainContext` Also removes the top-level `ray.train.TrainingIterator` import since this is a V1 DeveloperAPI that shouldn't be imported anymore. --------- Signed-off-by: Justin Yu <justinvyu@anyscale.com> Signed-off-by: Future-Outlier <eric901201@gmail.com>
Description
Add top-level aliases for public APIs. Users should never import from internal modules.
This includes:
ray.train.TrainingFailedErrorray.train.WorkerGroupErrorray.train.ControllerErrorray.train.TrainContextAlso removes the top-level
ray.train.TrainingIteratorimport since this is a V1 DeveloperAPI that shouldn't be imported anymore.Related issues
Types of change
Checklist
Does this PR introduce breaking changes?
Testing:
Code Quality:
git commit -s)Documentation:
doc/source/(if applicable)Additional context