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

[Test] Fix broken test_base_trainer #27855

Merged
merged 2 commits into from
Aug 15, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions python/ray/train/tests/test_base_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,13 @@ def train_loop(self):
)
tune.run(trainer.as_trainable(), num_samples=4)

# TODO(ekl/sang) this currently fails.
# Check we don't deadlock with too low of a fraction either.
scale_config = ScalingConfig(num_workers=1, _max_cpu_fraction_per_node=0.01)
# Needs to request 0 CPU for the trainer otherwise the pg
# will require {CPU: 1} * 2 resources, which means
# _max_cpu_fraction_per_node == 0.01 cannot schedule it
# (because this only allows to have 1 CPU for pg per node).
scale_config = ScalingConfig(
num_workers=1, _max_cpu_fraction_per_node=0.01, trainer_resources={"CPU": 0}
)
trainer = DummyTrainer(
train_loop,
scaling_config=scale_config,
Expand Down