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

[tune] Add multinode sync test #23229

Merged
merged 6 commits into from
Mar 21, 2022

Conversation

krfricke
Copy link
Contributor

@krfricke krfricke commented Mar 16, 2022

Why are these changes needed?

This adds a multinode checkpoint/restore test for Ray Tune. This covers some of the functionality of the release tests, but in a more controlled environment. In a follow-up PR, we should test (mocked) cloud checkpointing, too.

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 :(

Kai Fricke added 4 commits March 15, 2022 19:52
# Conflicts:
#	python/ray/autoscaler/_private/fake_multi_node/docker_monitor.py
#	python/ray/autoscaler/_private/fake_multi_node/node_provider.py
#	python/ray/autoscaler/_private/fake_multi_node/test_utils.py
@krfricke krfricke marked this pull request as ready for review March 16, 2022 17:17
@@ -798,6 +798,9 @@ def restore(self, trial) -> None:
else:
logger.debug("Trial %s: Attempting restore from %s", trial, value)
if trial.uses_cloud_checkpointing or not trial.sync_on_checkpoint:
# If using cloud checkpointing, trial will get cp from cloud.
# If not syncing to driver, assume it has access to the cp
Copy link
Contributor

Choose a reason for hiding this comment

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

and what guarantees that this is the case?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nothing (in fact we sometimes run into errors when this is misconfigured). I've added the comment for future reference (as I find this part confusing). We should probably have better guarantees in the future.

python/ray/tune/tests/test_multinode_sync.py Show resolved Hide resolved
python/ray/tune/tests/test_multinode_sync.py Show resolved Hide resolved
python/ray/tune/tests/test_multinode_sync.py Outdated Show resolved Hide resolved
python/ray/tune/trial_runner.py Outdated Show resolved Hide resolved
python/ray/tune/tests/test_multinode_sync.py Outdated Show resolved Hide resolved
python/ray/tune/tests/test_multinode_sync.py Show resolved Hide resolved
python/ray/tune/tests/test_multinode_sync.py Show resolved Hide resolved
python/ray/tune/tests/test_multinode_sync.py Show resolved Hide resolved
python/ray/tune/tests/test_multinode_sync.py Show resolved Hide resolved
@xwjiang2010
Copy link
Contributor

Overall looks good, thanks Kai! Just some comments on documentation for future maintenance of these tests.

@@ -158,6 +158,16 @@ some limitations still remain:

3. In docker-in-docker setups, a careful setup has to be followed to make the fake multinode docker provider work (see below).

Shared directories within the docker environment
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for adding this!

@krfricke krfricke merged commit b64452b into ray-project:master Mar 21, 2022
@krfricke krfricke deleted the tune/fix-cloud-tests branch March 21, 2022 17:02
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.

None yet

2 participants