forked from ray-project/ray
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Templates] Remove
runtime_env
usage and use a custom docker image …
…when needed (ray-project#35475) Signed-off-by: Justin Yu <[email protected]>
- Loading branch information
Showing
30 changed files
with
959 additions
and
2,293 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,14 @@ | ||
# Scaling Batch Inference with Ray Data | ||
|
||
This template is a quickstart to using [Ray | ||
Data](https://docs.ray.io/en/latest/data/data.html) for batch | ||
inference. Ray Data is one of many libraries under the [Ray AI | ||
Runtime](https://docs.ray.io/en/latest/ray-air/getting-started.html). | ||
See [this blog | ||
post](https://www.anyscale.com/blog/model-batch-inference-in-ray-actors-actorpool-and-datasets) | ||
for more information on why and how you should perform batch inference | ||
with Ray! | ||
| Template Specification | Description | | ||
| ---------------------- | ----------- | | ||
| Summary | This template walks through GPU batch inference on an image dataset using a PyTorch ResNet model. | | ||
| Time to Run | Less than 2 minutes to compute predictions on the dataset. | | ||
| Minimum Compute Requirements | No hard requirements. The default is 4 nodes, each with 1 NVIDIA T4 GPU. | | ||
| Cluster Environment | This template uses the latest Anyscale-provided Ray ML image using Python 3.9: [`anyscale/ray-ml:2.4.0-py39-gpu`](https://docs.anyscale.com/reference/base-images/ray-240/py39#ray-ml-2-4-0-py39). If you want to change to a different cluster environment, make sure that it is based off of this image! | | ||
|
||
This template walks through GPU batch prediction on an image dataset | ||
using a PyTorch model, but the framework and data format are there just | ||
to help you build your own application! | ||
## Getting Started | ||
|
||
At a high level, this template will: | ||
**When the workspace is up and running, start coding by clicking on the Jupyter or VSCode icon above. Open the `start.ipynb` file and follow the instructions there.** | ||
|
||
1. [Load your dataset using Ray | ||
Data.](https://docs.ray.io/en/latest/data/loading-data.html) | ||
2. [Preprocess your dataset before feeding it to your | ||
model.](https://docs.ray.io/en/latest/data/transforming-data.html) | ||
3. [Initialize your model and perform inference on a shard of your | ||
dataset with a remote | ||
actor.](https://docs.ray.io/en/latest/data/transforming-data.html#callable-class-udfs) | ||
4. [Save your prediction | ||
results.](https://docs.ray.io/en/latest/data/api/input_output.html) | ||
|
||
Start coding by clicking on the Jupyter or VSCode icon above. | ||
By the end, we will have classified around 4000 images using the pre-trained ResNet model and saved these predictions to a local directory. |
Oops, something went wrong.