Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AIR/train] Use new Train API #25735

Merged
merged 89 commits into from
Jul 7, 2022
Merged

Conversation

Yard1
Copy link
Member

@Yard1 Yard1 commented Jun 13, 2022

Why are these changes needed?

Uses the new AIR Train API for examples and tests.

The Result object gets a new attribute - log_dir, pointing to the Trial's logdir allowing users to access tensorboard logs and artifacts of other loggers.

This PR only deals with "low hanging fruit" - tests that need substantial rewriting or Train user guide are not touched. Those will be updated in followup PRs.

Tests and examples that concern deprecated features or which are duplicated in AIR have been removed or disabled.

Requires #25943 to be merged in first

Related issue number

Checks

  • 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 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
    • Unit tests
    • Release tests
    • This PR is not tested :(

@Yard1
Copy link
Member Author

Yard1 commented Jun 16, 2022

tune_cifar_pytorch_pbt_example will be fixed by #25849

@Yard1 Yard1 requested a review from matthewdeng July 6, 2022 22:04
@Yard1 Yard1 removed the tests-ok The tagger certifies test failures are unrelated and assumes personal liability. label Jul 6, 2022
Copy link
Contributor

@amogkam amogkam left a comment

Choose a reason for hiding this comment

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

Thanks @Yard1 lgtm overall!

Please ping again when this is ready to merge!

python/ray/train/BUILD Show resolved Hide resolved
python/ray/train/examples/horovod/horovod_example.py Outdated Show resolved Hide resolved
python/ray/train/examples/mlflow_fashion_mnist_example.py Outdated Show resolved Hide resolved
@@ -2,14 +2,14 @@
from typing import Dict
Copy link
Contributor

Choose a reason for hiding this comment

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

+1 we should make sure to dedup and move over the AIR examples to train in a follow up

@Yard1
Copy link
Member Author

Yard1 commented Jul 7, 2022

@amogkam it's ready to merge!

@amogkam amogkam merged commit b9a4f64 into ray-project:master Jul 7, 2022
@Yard1 Yard1 deleted the use_new_train_api branch July 7, 2022 19:31
amogkam pushed a commit that referenced this pull request Jul 7, 2022
This PR replaces legacy API calls to `train.` with AIR `session.` in Train code, examples and docs.

Depends on #25735
Stefan-1313 pushed a commit to Stefan-1313/ray_mod that referenced this pull request Aug 18, 2022
Uses the new AIR Train API for examples and tests.

The `Result` object gets a new attribute - `log_dir`, pointing to the Trial's `logdir` allowing users to access tensorboard logs and artifacts of other loggers.

This PR only deals with "low hanging fruit" - tests that need substantial rewriting or Train user guide are not touched. Those will be updated in followup PRs.

Tests and examples that concern deprecated features or which are duplicated in AIR have been removed or disabled.

Requires ray-project#25943 to be merged in first

Signed-off-by: Stefan van der Kleij <[email protected]>
Stefan-1313 pushed a commit to Stefan-1313/ray_mod that referenced this pull request Aug 18, 2022
This PR replaces legacy API calls to `train.` with AIR `session.` in Train code, examples and docs.

Depends on ray-project#25735

Signed-off-by: Stefan van der Kleij <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants