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] pyarrow.fs persistence (15/n): Trainable and Train worker artifact uploading #38871

Merged

Conversation

justinvyu
Copy link
Contributor

Why are these changes needed?

This PR enables artifact syncing on the Trainable (trial driver) and Train remote workers:

  • Artifact uploading happens as a background task now on a result report, rather than a synchronous upload on a checkpoint report.
  • sync_on_checkpoint is now used (previously it was only used in the head node syncing case). It forces a blocking artifact sync to happen on trial checkpoints.
  • sync_artifacts=True by default still -- to be updated in a follow-up.

Related issue number

#38865

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • 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
    • Unit tests
    • Release tests
    • This PR is not tested :(

Signed-off-by: Justin Yu <justinvyu@anyscale.com>
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
@justinvyu
Copy link
Contributor Author

sync_on_checkpoint forces a blocking artifact sync to happen on trial checkpoints.

@ericl Should this instead force a WAIT on the previous task, then schedule a new one, and not necessarily block on the new one to finish?

-- wait on previous sync --> | launch new one | ---> let training continue

vs.

-- wait on previous sync --> | launch new one | --- wait on the new one --> | let training continue

@ericl ericl added the @author-action-required The PR author is responsible for the next step. Remove tag to send back to the reviewer. label Aug 25, 2023
@ericl
Copy link
Contributor

ericl commented Aug 25, 2023

-- wait on previous sync --> | launch new one | --- wait on the new one --> | let training continue

Unfortunately I think we have to do this one, otherwise you might miss some recently written files.

@justinvyu
Copy link
Contributor Author

The code should be blocked at this point though, as we're waiting on the previous sync to finish up. What files are going to be missed?

Signed-off-by: Justin Yu <justinvyu@anyscale.com>
@ericl
Copy link
Contributor

ericl commented Aug 25, 2023

The code should be blocked at this point though, as we're waiting on the previous sync to finish up. What files are going to be missed?

There's no guarantee the previous sync actually picked up a file that was written just before we called report. The sync could have started long before that point.

@justinvyu
Copy link
Contributor Author

If we first wait for the old sync, then launch a new sync in report, I think we should be uploading the most up to date artifacts.

Signed-off-by: Justin Yu <justinvyu@anyscale.com>
@justinvyu justinvyu added tests-ok The tagger certifies test failures are unrelated and assumes personal liability. Ray 2.7 and removed @author-action-required The PR author is responsible for the next step. Remove tag to send back to the reviewer. labels Aug 25, 2023
Copy link
Collaborator

@zhe-thoughts zhe-thoughts left a comment

Choose a reason for hiding this comment

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

Necessary change for Train

@zhe-thoughts zhe-thoughts merged commit 71073ca into ray-project:master Aug 25, 2023
62 of 64 checks passed
@justinvyu justinvyu deleted the air/persistence/trial_artifacts branch August 25, 2023 16:52
arvind-chandra pushed a commit to lmco/ray that referenced this pull request Aug 31, 2023
…ifact uploading (ray-project#38871)

* implement trial artifact syncing

Signed-off-by: Justin Yu <justinvyu@anyscale.com>

* update test

Signed-off-by: Justin Yu <justinvyu@anyscale.com>

* also support for class trainable

Signed-off-by: Justin Yu <justinvyu@anyscale.com>

* small comment fixes

Signed-off-by: Justin Yu <justinvyu@anyscale.com>

* guard w/ FF

Signed-off-by: Justin Yu <justinvyu@anyscale.com>

---------

Signed-off-by: Justin Yu <justinvyu@anyscale.com>
Signed-off-by: e428265 <arvind.chandramouli@lmco.com>
LeonLuttenberger pushed a commit to jaidisido/ray that referenced this pull request Sep 5, 2023
…ifact uploading (ray-project#38871)

* implement trial artifact syncing

Signed-off-by: Justin Yu <justinvyu@anyscale.com>

* update test

Signed-off-by: Justin Yu <justinvyu@anyscale.com>

* also support for class trainable

Signed-off-by: Justin Yu <justinvyu@anyscale.com>

* small comment fixes

Signed-off-by: Justin Yu <justinvyu@anyscale.com>

* guard w/ FF

Signed-off-by: Justin Yu <justinvyu@anyscale.com>

---------

Signed-off-by: Justin Yu <justinvyu@anyscale.com>
jimthompson5802 pushed a commit to jimthompson5802/ray that referenced this pull request Sep 12, 2023
…ifact uploading (ray-project#38871)

* implement trial artifact syncing

Signed-off-by: Justin Yu <justinvyu@anyscale.com>

* update test

Signed-off-by: Justin Yu <justinvyu@anyscale.com>

* also support for class trainable

Signed-off-by: Justin Yu <justinvyu@anyscale.com>

* small comment fixes

Signed-off-by: Justin Yu <justinvyu@anyscale.com>

* guard w/ FF

Signed-off-by: Justin Yu <justinvyu@anyscale.com>

---------

Signed-off-by: Justin Yu <justinvyu@anyscale.com>
Signed-off-by: Jim Thompson <jimthompson5802@gmail.com>
vymao pushed a commit to vymao/ray that referenced this pull request Oct 11, 2023
…ifact uploading (ray-project#38871)

* implement trial artifact syncing

Signed-off-by: Justin Yu <justinvyu@anyscale.com>

* update test

Signed-off-by: Justin Yu <justinvyu@anyscale.com>

* also support for class trainable

Signed-off-by: Justin Yu <justinvyu@anyscale.com>

* small comment fixes

Signed-off-by: Justin Yu <justinvyu@anyscale.com>

* guard w/ FF

Signed-off-by: Justin Yu <justinvyu@anyscale.com>

---------

Signed-off-by: Justin Yu <justinvyu@anyscale.com>
Signed-off-by: Victor <vctr.y.m@example.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ray 2.7 tests-ok The tagger certifies test failures are unrelated and assumes personal liability.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants