Skip to content

Commit

Permalink
[tune] fix pbt ptl example (ray-project#11573)
Browse files Browse the repository at this point in the history
* [tune] fix pbt ptl example

* wider smoke test
  • Loading branch information
krfricke committed Oct 23, 2020
1 parent 7a0184e commit 8ee4f7e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/ray/tune/examples/mnist_pytorch_lightning.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ def tune_mnist_pbt(num_samples=10, num_epochs=10, gpus_per_trial=0):
mode="min",
perturbation_interval=4,
hyperparam_mutations={
"lr": lambda: tune.loguniform(1e-4, 1e-1).func(None),
"lr": tune.loguniform(1e-4, 1e-1),
"batch_size": [32, 64, 128]
})

Expand Down Expand Up @@ -285,8 +285,8 @@ def tune_mnist_pbt(num_samples=10, num_epochs=10, gpus_per_trial=0):
args, _ = parser.parse_known_args()

if args.smoke_test:
tune_mnist_asha(num_samples=1, num_epochs=1, gpus_per_trial=0)
tune_mnist_pbt(num_samples=1, num_epochs=1, gpus_per_trial=0)
tune_mnist_asha(num_samples=1, num_epochs=6, gpus_per_trial=0)
tune_mnist_pbt(num_samples=1, num_epochs=6, gpus_per_trial=0)
else:
# ASHA scheduler
tune_mnist_asha(num_samples=10, num_epochs=10, gpus_per_trial=0)
Expand Down

0 comments on commit 8ee4f7e

Please sign in to comment.