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

[release] update torch_tune_serve_test to use anyscale connect #16754

Merged
merged 4 commits into from
Jul 7, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions release/golden_notebook_tests/golden_notebook_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
compute_template: gpu_tpl.yaml

run:
use_connect: True
timeout: 1800
script: python workloads/torch_tune_serve_test.py

Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import argparse
import os

import ray
import requests
Expand Down Expand Up @@ -177,7 +178,9 @@ def test_predictions(test_mode=False):
help="Finish quickly for testing.")
args = parser.parse_args()

ray.client("anyscale:https://").connect()
job_name = os.environ.get("RAY_JOB_NAME", "torch_tune_serve_test")
ray.client().job_name(job_name).connect()
matthewdeng marked this conversation as resolved.
Show resolved Hide resolved

num_workers = 2
use_gpu = True

Expand All @@ -186,7 +189,8 @@ def test_predictions(test_mode=False):

print("Retrieving best model.")
best_checkpoint = analysis.best_checkpoint
model_id = get_best_model(best_checkpoint)
get_best_model_remote = ray.remote(get_best_model)
Copy link
Contributor

@amogkam amogkam Jun 29, 2021

Choose a reason for hiding this comment

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

Is it possible to test out the ray.client().download_results() workflow here instead of wrapping in a task?

model_id = ray.get(get_best_model_remote.remote(best_checkpoint))

print("Setting up Serve.")
setup_serve(model_id)
Expand Down