[release] add golden notebook release test for torch/tune/serve #16619
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why are these changes needed?
This test tests the integration between PyTorch, Ray Tune and Ray Serve.
At a high level, the MNIST dataset is loaded and Tune is used to train a ResNet model. This trained model is exposed for predictions through Serve, and a sample of 10 images are run through the deployed prediction service.
Notes
predict_and_validate
in a@ray.remote
decoration to parallelize the calls. As such, the requests made tohttp://localhost:8000/mnist
may be executed on any of the head or worker nodes. To enable routing on the worker nodes, we set"location": "EveryNode"
when starting Serve. In a real user setting, requests are typically from external sources and the requests would be directed to the head node URL alone.Related issue number
n/a
Checks
scripts/format.sh
to lint the changes in this PR.