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

[docs] [tune] replace tune.report with session.report #34435

Merged
merged 2 commits into from
Apr 21, 2023
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
3 changes: 2 additions & 1 deletion python/ray/tune/tests/tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import torch.nn.functional as F

from ray import air, tune
from ray.air import session
from ray.tune.schedulers import ASHAScheduler
# __tutorial_imports_end__
# fmt: on
Expand Down Expand Up @@ -105,7 +106,7 @@ def train_mnist(config):
acc = test(model, test_loader)

# Send the current training result back to Tune
tune.report(mean_accuracy=acc)
session.report(mean_accuracy=acc)
Copy link
Contributor

Choose a reason for hiding this comment

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

Will need to also include the proper import at the top:

from ray.air import session


if i % 5 == 0:
# This saves the model to the trial directory
Expand Down