Skip to content

Commit 0f30304

Browse files
committed
deploy: 67c2a0f
1 parent 2e3ab34 commit 0f30304

File tree

11 files changed

+13
-273
lines changed

11 files changed

+13
-273
lines changed

_sources/courses/anyscale_101/output/101_anyscale_intro_jobs_02.ipynb

Lines changed: 2 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,7 @@
44
"cell_type": "markdown",
55
"metadata": {},
66
"source": [
7-
"## Part 1. Creating and Submitting your first job\n",
8-
"\n",
9-
"#### After navigating to a specific Anyscale Workspace, you can submit your main python script as a Anyscale Job. \n",
10-
"\n",
11-
"#### 1. In the Anyscale Console, open (or create) a Workspace. \n",
12-
"\n",
13-
"<img src=\"./images/jobs1.png\" alt=\"Alt text\" width=\"500\"/>\n",
14-
"\n",
15-
"#### 2. Once in the workspace, navigate to the VS Code Editor\n",
16-
"\n",
17-
"#### 3. Next, create a new file. You can name it hello_world.py\n",
18-
"\n",
19-
"<img src=\"images/jobs2.png\" alt=\"Alt text\" width=\"500\"/>\n",
20-
"\n",
21-
"#### 4. Paste the basic Ray example below into the file. "
7+
"## Part 1. Creating and Submitting your first job\n\n#### After navigating to a specific Anyscale Workspace, you can submit your main python script as a Anyscale Job. \n\n#### 1. In the Anyscale Console, open (or create) a Workspace. \n\n<img src=\"https://raw.githubusercontent.com/ray-project/enablement-content/refs/heads/main/courses/anyscale_101/images/jobs1.png\" alt=\"Alt text\" width=\"500\"/>\n\n#### 2. Once in the workspace, navigate to the VS Code Editor\n\n#### 3. Next, create a new file. You can name it hello_world.py\n\n<img src=\"https://raw.githubusercontent.com/ray-project/enablement-content/refs/heads/main/courses/anyscale_101/images/jobs2.png\" alt=\"Alt text\" width=\"500\"/>\n\n#### 4. Paste the basic Ray example below into the file. "
228
]
239
},
2410
{
@@ -41,22 +27,7 @@
4127
"cell_type": "markdown",
4228
"metadata": {},
4329
"source": [
44-
"#### 5. Open the terminal and run the following command to submit the Ray workflow as an Anyscale Job.\n",
45-
"\n",
46-
"<img src=\"./images/jobs3.png\" alt=\"Alt text\" width=\"500\"/>\n",
47-
"\n",
48-
"\n",
49-
"`anyscale job submit -- python hello_world.py `\n",
50-
"\n",
51-
"\n",
52-
"#### 6. Track the status of the job, head over to the Jobs tab and find the submitted Anyscale Job. The url is also displayed in the terminal. \n",
53-
"\n",
54-
"<img src=\"./images/jobs4.png\" alt=\"Alt text\" width=\"500\"/>\n",
55-
"\n",
56-
"\n",
57-
"#### 7. In the Anyscale Jobs console, we can check out the status of the submitted job. From the logs, we can verify that our job was successfully executed and Anyscale will now handle the cleanup. \n",
58-
"\n",
59-
"<img src=\"./images/jobs5.png\" alt=\"Alt text\" width=\"500\"/>\n"
30+
"#### 5. Open the terminal and run the following command to submit the Ray workflow as an Anyscale Job.\n\n<img src=\"https://raw.githubusercontent.com/ray-project/enablement-content/refs/heads/main/courses/anyscale_101/images/jobs3.png\" alt=\"Alt text\" width=\"500\"/>\n\n\n`anyscale job submit -- python hello_world.py `\n\n\n#### 6. Track the status of the job, head over to the Jobs tab and find the submitted Anyscale Job. The url is also displayed in the terminal. \n\n<img src=\"https://raw.githubusercontent.com/ray-project/enablement-content/refs/heads/main/courses/anyscale_101/images/jobs4.png\" alt=\"Alt text\" width=\"500\"/>\n\n\n#### 7. In the Anyscale Jobs console, we can check out the status of the submitted job. From the logs, we can verify that our job was successfully executed and Anyscale will now handle the cleanup. \n\n<img src=\"https://raw.githubusercontent.com/ray-project/enablement-content/refs/heads/main/courses/anyscale_101/images/jobs5.png\" alt=\"Alt text\" width=\"500\"/>\n"
6031
]
6132
}
6233
],

_sources/courses/anyscale_101/output/101_anyscale_intro_jobs_03.ipynb

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,7 @@
1818
"cell_type": "markdown",
1919
"metadata": {},
2020
"source": [
21-
"#### 1. Using the same workspace, create a notebook folder\n",
22-
"\n",
23-
"<img src=\"./images/jobs6.png\" alt=\"Alt text\" width=\"500\"/>\n",
24-
"\n",
25-
"\n",
26-
"#### 2. Use the Anyscale CLI to submit the Anyscale Job. For a full list of all available arguments, check out the [Anyscale Job CLI documentation](https://docs.anyscale.com/reference/job-api/#job-cli).\n",
27-
"\n",
28-
"Copy the following command and execute the cell (Shift + Enter). Check out the job status in the Anyscale Jobs console. \n",
29-
"\n",
30-
"`! anyscale job submit --name say-hello-world -- python main.py`\n",
31-
"\n",
32-
"#### 3. Submit the job again using the [Anyscale Python SDK](https://docs.anyscale.com/reference/job-api/#job-sdk)\n",
33-
"\n",
34-
"Copy and paste the code below to a new cell and run. "
21+
"#### 1. Using the same workspace, create a notebook folder\n\n<img src=\"https://raw.githubusercontent.com/ray-project/enablement-content/refs/heads/main/courses/anyscale_101/images/jobs6.png\" alt=\"Alt text\" width=\"500\"/>\n\n\n#### 2. Use the Anyscale CLI to submit the Anyscale Job. For a full list of all available arguments, check out the [Anyscale Job CLI documentation](https://docs.anyscale.com/reference/job-api/#job-cli).\n\nCopy the following command and execute the cell (Shift + Enter). Check out the job status in the Anyscale Jobs console. \n\n`! anyscale job submit --name say-hello-world -- python main.py`\n\n#### 3. Submit the job again using the [Anyscale Python SDK](https://docs.anyscale.com/reference/job-api/#job-sdk)\n\nCopy and paste the code below to a new cell and run. "
3522
]
3623
},
3724
{

_sources/courses/anyscale_101/output/101_anyscale_intro_services_02.ipynb

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,7 @@
44
"cell_type": "markdown",
55
"metadata": {},
66
"source": [
7-
"## Part 1: Starting your first Anyscale Service\n",
8-
"\n",
9-
"#### 1. Spin up a **Anyscale Workspace,** we will use this as the environment to develop and publish the Anyscale Service. Give this workspace a name, check the **Auto-Select Worker Nodes** and leave everything else as default.\n",
10-
"\n",
11-
"\n",
12-
"\n",
13-
"<img src=\"./images/service1.png\" alt=\"Alt text\" width=\"500\"/>\n",
14-
"\n",
15-
"\n",
16-
"#### 2.Download starter template. Clone a github repository containing the files needed to deploy a Anyscale Service. Head over to the VSCode Tab (**In Anyscale Workspace**) and enter the following command into the terminal.\n",
17-
"\n",
18-
"\n",
19-
"`git clone https://github.com/anyscale/examples.git`\n",
20-
"\n",
21-
"\n",
22-
"<img src=\"./images/service2.png\" alt=\"Alt text\" width=\"500\"/>\n",
23-
"\n",
24-
"Next use terminal to navigate to the downloaded services directory.\n",
25-
"\n",
26-
"`cd examples/02_service_hello_world/`\n",
27-
"\n",
28-
"\n",
29-
"#### 3. Inspect the code for the Service Endpoint **(./examples/02_service_hello_world/main.py)**\n",
30-
"\n",
31-
"For this implementation, we will define a FastAPI application and deploy it using Ray Serve. Ray Serve wraps the FastAPI app (`FastAPIDeployment`) to manage this API (e.g. Autoscaling, Load Balancing).\n",
32-
"\n",
33-
"**Make the following modification to the last line of code,** this prepares the app for deployment instead of running it immediately."
7+
"## Part 1: Starting your first Anyscale Service\n\n#### 1. Spin up a **Anyscale Workspace,** we will use this as the environment to develop and publish the Anyscale Service. Give this workspace a name, check the **Auto-Select Worker Nodes** and leave everything else as default.\n\n\n\n<img src=\"https://raw.githubusercontent.com/ray-project/enablement-content/refs/heads/main/courses/anyscale_101/images/service1.png\" alt=\"Alt text\" width=\"500\"/>\n\n\n#### 2.Download starter template. Clone a github repository containing the files needed to deploy a Anyscale Service. Head over to the VSCode Tab (**In Anyscale Workspace**) and enter the following command into the terminal.\n\n\n`git clone https://github.com/anyscale/examples.git`\n\n\n<img src=\"https://raw.githubusercontent.com/ray-project/enablement-content/refs/heads/main/courses/anyscale_101/images/service2.png\" alt=\"Alt text\" width=\"500\"/>\n\nNext use terminal to navigate to the downloaded services directory.\n\n`cd examples/02_service_hello_world/`\n\n\n#### 3. Inspect the code for the Service Endpoint **(./examples/02_service_hello_world/main.py)**\n\nFor this implementation, we will define a FastAPI application and deploy it using Ray Serve. Ray Serve wraps the FastAPI app (`FastAPIDeployment`) to manage this API (e.g. Autoscaling, Load Balancing).\n\n**Make the following modification to the last line of code,** this prepares the app for deployment instead of running it immediately."
348
]
359
},
3610
{

_sources/courses/ray-101/4_Intro_Data.ipynb

Lines changed: 0 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -467,65 +467,6 @@
467467
" assert image.min() >= -1 and image.max() <= 1 # normalized to [-1, 1]"
468468
]
469469
},
470-
{
471-
"cell_type": "markdown",
472-
"metadata": {},
473-
"source": [
474-
"<div class=\"alert alert-block alert-info\">\n",
475-
"\n",
476-
"### Activity: Add the ground truth label using the image path.\n",
477-
"\n",
478-
"In this activity, you will add the ground truth label using the image path.\n",
479-
"\n",
480-
"The image path is in the format of `s3://anyscale-public-materials/ray-ai-libraries/mnist/50_per_index/{label}/{image_id}.png`.\n",
481-
"\n",
482-
"See the suggested code below:\n",
483-
"\n",
484-
"```python\n",
485-
"# Hint: define the add_label function\n",
486-
"\n",
487-
"ds_labeled = ds_normalized.map_batches(add_label)\n",
488-
"labeled_batch = ds_labeled.take_batch(10)\n",
489-
"print(labeled_batch[\"ground_truth_label\"])\n",
490-
"```\n",
491-
"\n",
492-
"\n",
493-
"</div>\n"
494-
]
495-
},
496-
{
497-
"cell_type": "code",
498-
"execution_count": null,
499-
"metadata": {},
500-
"outputs": [],
501-
"source": [
502-
"# Write your solution here"
503-
]
504-
},
505-
{
506-
"cell_type": "markdown",
507-
"metadata": {},
508-
"source": [
509-
"<div class=\"alert alert-block alert-info\">\n",
510-
"\n",
511-
"<details>\n",
512-
"\n",
513-
"<summary>Click to view solution</summary>\n",
514-
"\n",
515-
"```python\n",
516-
"def add_label(batch: dict[str, np.ndarray]) -> dict[str, np.ndarray]:\n",
517-
" batch[\"ground_truth_label\"] = [int(path.split(\"/\")[-2]) for path in batch[\"path\"]]\n",
518-
" return batch\n",
519-
"\n",
520-
"ds_labeled = ds_normalized.map_batches(add_label)\n",
521-
"labeled_batch = ds_labeled.take_batch(10)\n",
522-
"print(labeled_batch[\"ground_truth_label\"])\n",
523-
"```\n",
524-
"\n",
525-
"</details> \n",
526-
"</div>"
527-
]
528-
},
529470
{
530471
"cell_type": "markdown",
531472
"metadata": {},

_sources/courses/ray-101/output/4_Intro_Data_04.ipynb

Lines changed: 0 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -217,65 +217,6 @@
217217
" assert image.min() >= -1 and image.max() <= 1 # normalized to [-1, 1]"
218218
]
219219
},
220-
{
221-
"cell_type": "markdown",
222-
"metadata": {},
223-
"source": [
224-
"<div class=\"alert alert-block alert-info\">\n",
225-
"\n",
226-
"### Activity: Add the ground truth label using the image path.\n",
227-
"\n",
228-
"In this activity, you will add the ground truth label using the image path.\n",
229-
"\n",
230-
"The image path is in the format of `s3://anyscale-public-materials/ray-ai-libraries/mnist/50_per_index/{label}/{image_id}.png`.\n",
231-
"\n",
232-
"See the suggested code below:\n",
233-
"\n",
234-
"```python\n",
235-
"# Hint: define the add_label function\n",
236-
"\n",
237-
"ds_labeled = ds_normalized.map_batches(add_label)\n",
238-
"labeled_batch = ds_labeled.take_batch(10)\n",
239-
"print(labeled_batch[\"ground_truth_label\"])\n",
240-
"```\n",
241-
"\n",
242-
"\n",
243-
"</div>\n"
244-
]
245-
},
246-
{
247-
"cell_type": "code",
248-
"execution_count": null,
249-
"metadata": {},
250-
"outputs": [],
251-
"source": [
252-
"# Write your solution here"
253-
]
254-
},
255-
{
256-
"cell_type": "markdown",
257-
"metadata": {},
258-
"source": [
259-
"<div class=\"alert alert-block alert-info\">\n",
260-
"\n",
261-
"<details>\n",
262-
"\n",
263-
"<summary>Click to view solution</summary>\n",
264-
"\n",
265-
"```python\n",
266-
"def add_label(batch: dict[str, np.ndarray]) -> dict[str, np.ndarray]:\n",
267-
" batch[\"ground_truth_label\"] = [int(path.split(\"/\")[-2]) for path in batch[\"path\"]]\n",
268-
" return batch\n",
269-
"\n",
270-
"ds_labeled = ds_normalized.map_batches(add_label)\n",
271-
"labeled_batch = ds_labeled.take_batch(10)\n",
272-
"print(labeled_batch[\"ground_truth_label\"])\n",
273-
"```\n",
274-
"\n",
275-
"</details> \n",
276-
"</div>"
277-
]
278-
},
279220
{
280221
"cell_type": "markdown",
281222
"metadata": {},

courses/anyscale_101/output/101_anyscale_intro_jobs_02.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -461,14 +461,14 @@ <h2>After navigating to a specific Anyscale Workspace, you can submit your main
461461
</section>
462462
<section id="in-the-anyscale-console-open-or-create-a-workspace">
463463
<h2>1. In the Anyscale Console, open (or create) a Workspace.<a class="headerlink" href="#in-the-anyscale-console-open-or-create-a-workspace" title="Link to this heading">#</a></h2>
464-
<img src="./images/jobs1.png" alt="Alt text" width="500"/>
464+
<img src="https://raw.githubusercontent.com/ray-project/enablement-content/refs/heads/main/courses/anyscale_101/images/jobs1.png" alt="Alt text" width="500"/>
465465
</section>
466466
<section id="once-in-the-workspace-navigate-to-the-vs-code-editor">
467467
<h2>2. Once in the workspace, navigate to the VS Code Editor<a class="headerlink" href="#once-in-the-workspace-navigate-to-the-vs-code-editor" title="Link to this heading">#</a></h2>
468468
</section>
469469
<section id="next-create-a-new-file-you-can-name-it-hello-world-py">
470470
<h2>3. Next, create a new file. You can name it hello_world.py<a class="headerlink" href="#next-create-a-new-file-you-can-name-it-hello-world-py" title="Link to this heading">#</a></h2>
471-
<img src="images/jobs2.png" alt="Alt text" width="500"/>
471+
<img src="https://raw.githubusercontent.com/ray-project/enablement-content/refs/heads/main/courses/anyscale_101/images/jobs2.png" alt="Alt text" width="500"/>
472472
</section>
473473
<section id="paste-the-basic-ray-example-below-into-the-file">
474474
<h2>4. Paste the basic Ray example below into the file.<a class="headerlink" href="#paste-the-basic-ray-example-below-into-the-file" title="Link to this heading">#</a></h2>
@@ -489,16 +489,16 @@ <h2>4. Paste the basic Ray example below into the file.<a class="headerlink" hre
489489
</section>
490490
<section id="open-the-terminal-and-run-the-following-command-to-submit-the-ray-workflow-as-an-anyscale-job">
491491
<h2>5. Open the terminal and run the following command to submit the Ray workflow as an Anyscale Job.<a class="headerlink" href="#open-the-terminal-and-run-the-following-command-to-submit-the-ray-workflow-as-an-anyscale-job" title="Link to this heading">#</a></h2>
492-
<img src="./images/jobs3.png" alt="Alt text" width="500"/>
492+
<img src="https://raw.githubusercontent.com/ray-project/enablement-content/refs/heads/main/courses/anyscale_101/images/jobs3.png" alt="Alt text" width="500"/>
493493
<p><code class="docutils literal notranslate"><span class="pre">anyscale</span> <span class="pre">job</span> <span class="pre">submit</span> <span class="pre">--</span> <span class="pre">python</span> <span class="pre">hello_world.py</span>&#160; </code></p>
494494
</section>
495495
<section id="track-the-status-of-the-job-head-over-to-the-jobs-tab-and-find-the-submitted-anyscale-job-the-url-is-also-displayed-in-the-terminal">
496496
<h2>6. Track the status of the job, head over to the Jobs tab and find the submitted Anyscale Job. The url is also displayed in the terminal.<a class="headerlink" href="#track-the-status-of-the-job-head-over-to-the-jobs-tab-and-find-the-submitted-anyscale-job-the-url-is-also-displayed-in-the-terminal" title="Link to this heading">#</a></h2>
497-
<img src="./images/jobs4.png" alt="Alt text" width="500"/>
497+
<img src="https://raw.githubusercontent.com/ray-project/enablement-content/refs/heads/main/courses/anyscale_101/images/jobs4.png" alt="Alt text" width="500"/>
498498
</section>
499499
<section id="in-the-anyscale-jobs-console-we-can-check-out-the-status-of-the-submitted-job-from-the-logs-we-can-verify-that-our-job-was-successfully-executed-and-anyscale-will-now-handle-the-cleanup">
500500
<h2>7. In the Anyscale Jobs console, we can check out the status of the submitted job. From the logs, we can verify that our job was successfully executed and Anyscale will now handle the cleanup.<a class="headerlink" href="#in-the-anyscale-jobs-console-we-can-check-out-the-status-of-the-submitted-job-from-the-logs-we-can-verify-that-our-job-was-successfully-executed-and-anyscale-will-now-handle-the-cleanup" title="Link to this heading">#</a></h2>
501-
<img src="./images/jobs5.png" alt="Alt text" width="500"/>
501+
<img src="https://raw.githubusercontent.com/ray-project/enablement-content/refs/heads/main/courses/anyscale_101/images/jobs5.png" alt="Alt text" width="500"/>
502502
</section>
503503
</section>
504504

courses/anyscale_101/output/101_anyscale_intro_jobs_03.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ <h1>Part 2. Automation and Scheduling<a class="headerlink" href="#part-2-automat
459459
</ul>
460460
<section id="using-the-same-workspace-create-a-notebook-folder">
461461
<h2>1. Using the same workspace, create a notebook folder<a class="headerlink" href="#using-the-same-workspace-create-a-notebook-folder" title="Link to this heading">#</a></h2>
462-
<img src="./images/jobs6.png" alt="Alt text" width="500"/>
462+
<img src="https://raw.githubusercontent.com/ray-project/enablement-content/refs/heads/main/courses/anyscale_101/images/jobs6.png" alt="Alt text" width="500"/>
463463
</section>
464464
<section id="use-the-anyscale-cli-to-submit-the-anyscale-job-for-a-full-list-of-all-available-arguments-check-out-the-anyscale-job-cli-documentation">
465465
<h2>2. Use the Anyscale CLI to submit the Anyscale Job. For a full list of all available arguments, check out the <a class="reference external" href="https://docs.anyscale.com/reference/job-api/#job-cli">Anyscale Job CLI documentation</a>.<a class="headerlink" href="#use-the-anyscale-cli-to-submit-the-anyscale-job-for-a-full-list-of-all-available-arguments-check-out-the-anyscale-job-cli-documentation" title="Link to this heading">#</a></h2>

courses/anyscale_101/output/101_anyscale_intro_services_02.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -455,12 +455,12 @@ <h2> Contents </h2>
455455
<h1>Part 1: Starting your first Anyscale Service<a class="headerlink" href="#part-1-starting-your-first-anyscale-service" title="Link to this heading">#</a></h1>
456456
<section id="spin-up-a-anyscale-workspace-we-will-use-this-as-the-environment-to-develop-and-publish-the-anyscale-service-give-this-workspace-a-name-check-the-auto-select-worker-nodes-and-leave-everything-else-as-default">
457457
<h2>1. Spin up a <strong>Anyscale Workspace,</strong> we will use this as the environment to develop and publish the Anyscale Service. Give this workspace a name, check the <strong>Auto-Select Worker Nodes</strong> and leave everything else as default.<a class="headerlink" href="#spin-up-a-anyscale-workspace-we-will-use-this-as-the-environment-to-develop-and-publish-the-anyscale-service-give-this-workspace-a-name-check-the-auto-select-worker-nodes-and-leave-everything-else-as-default" title="Link to this heading">#</a></h2>
458-
<img src="./images/service1.png" alt="Alt text" width="500"/>
458+
<img src="https://raw.githubusercontent.com/ray-project/enablement-content/refs/heads/main/courses/anyscale_101/images/service1.png" alt="Alt text" width="500"/>
459459
</section>
460460
<section id="download-starter-template-clone-a-github-repository-containing-the-files-needed-to-deploy-a-anyscale-service-head-over-to-the-vscode-tab-in-anyscale-workspace-and-enter-the-following-command-into-the-terminal">
461461
<h2>2.Download starter template. Clone a github repository containing the files needed to deploy a Anyscale Service. Head over to the VSCode Tab (<strong>In Anyscale Workspace</strong>) and enter the following command into the terminal.<a class="headerlink" href="#download-starter-template-clone-a-github-repository-containing-the-files-needed-to-deploy-a-anyscale-service-head-over-to-the-vscode-tab-in-anyscale-workspace-and-enter-the-following-command-into-the-terminal" title="Link to this heading">#</a></h2>
462462
<p><code class="docutils literal notranslate"><span class="pre">git</span> <span class="pre">clone</span> <span class="pre">https://github.com/anyscale/examples.git</span></code></p>
463-
<img src="./images/service2.png" alt="Alt text" width="500"/>
463+
<img src="https://raw.githubusercontent.com/ray-project/enablement-content/refs/heads/main/courses/anyscale_101/images/service2.png" alt="Alt text" width="500"/>
464464
<p>Next use terminal to navigate to the downloaded services directory.</p>
465465
<p><code class="docutils literal notranslate"><span class="pre">cd</span> <span class="pre">examples/02_service_hello_world/</span></code></p>
466466
</section>

0 commit comments

Comments
 (0)