Skip to content

Commit b58a461

Browse files
author
Dean Wampler
committed
Refinements
1 parent a19ec18 commit b58a461

File tree

4 files changed

+38
-14
lines changed

4 files changed

+38
-14
lines changed

Overview.ipynb

+3-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@
3030
"* The [#tutorial channel](https://ray-distributed.slack.com/archives/C011ML23W5B) on the [Ray Slack](https://ray-distributed.slack.com)\n",
3131
"* [Email](mailto:[email protected])\n",
3232
"\n",
33-
"Troubleshooting tips are offered in known areas where you might encounter issues. All are summarized in the [_Troubleshooting, Tips, and Tricks notebook_](reference/Troubleshooting-Tips-Tricks.ipynb). For the details of the Ray API and the ML libraries, see the [Ray Docs](https://docs.ray.io/en/latest/)."
33+
"Troubleshooting tips are offered in known areas where you might encounter issues. All are summarized in the [_Troubleshooting, Tips, and Tricks notebook_](reference/Troubleshooting-Tips-Tricks.ipynb). For the details of the Ray API and the ML libraries, see the [Ray Docs](https://docs.ray.io/en/latest/).\n",
34+
"\n",
35+
"If you are new to Jupyter Lab and Jupyter Notebooks, see _Help > JupyterLab Reference_. The _Help_ menu also has references for Python and various libraries."
3436
]
3537
},
3638
{

README.md

+12-4
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ If you need to install Anaconda, follow the instructions [here](https://www.anac
4242

4343
Run the following commands in the root directory of this project. First, use `conda` to install the other dependencies, including Ray. Then activate the newly-created environment, named `anyscale-academy`. Finally, run a provided script to install a graphing library extension in Jupyter Lab and perform other tasks.
4444

45-
```
45+
```shell
4646
conda env create -f environment.yml
4747
conda activate anyscale-academy
4848
tools/fix-jupyter.sh
@@ -70,16 +70,24 @@ If you don't use Anaconda, you'll have to install these prerequisites first:
7070

7171
Now run the following commands in the root directory of this project to complete the setup. First, run a `pip` command to install the rest of the libraries required for these tutorials, including Ray. Then, run a provided script to install a graphing library extension in Jupyter Lab and perform other tasks.
7272

73-
```
73+
```shell
7474
pip install -r requirements.txt
7575
tools/fix-jupyter.sh
7676
```
7777

78+
## Final Notes for Local Installation
79+
80+
The lessons will start a local Ray "cluster" (one node) on your machine. When you are finished with the tutorials, run the following command to shut down Ray:
81+
82+
```shell
83+
ray stop
84+
```
85+
7886
## Launching the Tutorials
7987

8088
The previous steps installed [Jupyter Lab](https://jupyterlab.readthedocs.io/en/stable/), the notebook-based environment we'll use for all the lessons. To start run the following command in the project root directory:
8189

82-
```
90+
```shell
8391
jupyter lab
8492
```
8593

@@ -106,7 +114,7 @@ See also the [_Troubleshooting, Tips, and Tricks notebook_](reference/Troublesho
106114
107115
### Tutorial Descriptions
108116

109-
The [Overview notebook](Overview.ipynb) provides detailed, up-to-date descriptions for each tutorial and the lessons it contains.
117+
See the [Overview notebook](Overview.ipynb) for detailed, up-to-date descriptions for each tutorial and the lessons it contains.
110118

111119
## Notes
112120

ray-crash-course/solutions/Ray-Crash-Course-Solutions.ipynb

+3-1
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,9 @@
649649
{
650650
"cell_type": "code",
651651
"execution_count": null,
652-
"metadata": {},
652+
"metadata": {
653+
"scrolled": true
654+
},
653655
"outputs": [],
654656
"source": [
655657
"%time word_counts = count_words(['../*.ipynb'], top_n=100) # The notebooks are now in the parent directory."

reference/Troubleshooting-Tips-Tricks.ipynb

+20-8
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,19 @@
6262
"cell_type": "markdown",
6363
"metadata": {},
6464
"source": [
65-
"## General Task and Actor Tips\n",
65+
"## Tips and Tricks\n",
66+
"\n",
67+
"### Jupyter Tips\n",
68+
"\n",
69+
"* **Learning Jupyter Lab:** Open _Help > JupyerLab Reference_ for a user guide and detailed information about Jupyter Lab. The _Help_ menu has other references, too.\n",
70+
"* **Excessive Output:** If the output of a cell is very long, right click on it and select _Enable Scrolling for Outputs_."
71+
]
72+
},
73+
{
74+
"cell_type": "markdown",
75+
"metadata": {},
76+
"source": [
77+
"### General Task and Actor Tips\n",
6678
"\n",
6779
"* To create a task from a function or an actor from a class, annotate it with `@ray.remote`.\n",
6880
"* Invoke tasks with `foo.remote(...)`\n",
@@ -78,7 +90,7 @@
7890
"cell_type": "markdown",
7991
"metadata": {},
8092
"source": [
81-
"### Using Existing Functions and Classes\n",
93+
"#### Using Existing Functions and Classes\n",
8294
"\n",
8395
"An existing function can be used as a task by defining a new task function that calls the original function. For example:\n",
8496
"\n",
@@ -125,9 +137,9 @@
125137
"cell_type": "markdown",
126138
"metadata": {},
127139
"source": [
128-
"## Using the Ray Dashboard\n",
140+
"### Using the Ray Dashboard\n",
129141
"\n",
130-
"### Opening the Dashboard\n",
142+
"#### Opening the Dashboard\n",
131143
"\n",
132144
"As it executes, `ray.init` prints the dashboard URL.\n",
133145
"\n",
@@ -140,7 +152,7 @@
140152
"cell_type": "markdown",
141153
"metadata": {},
142154
"source": [
143-
"### Profiling Actors\n",
155+
"#### Profiling Actors\n",
144156
"\n",
145157
"The _Logical View_ offers a powerful and convenient way to profile actor performance using [flame graphs](http://www.brendangregg.com/flamegraphs.html). Details are in the [Dashboard docs](https://ray.readthedocs.io/en/latest/ray-dashboard.html#ray-dashboard).\n",
146158
"\n",
@@ -183,7 +195,7 @@
183195
"cell_type": "markdown",
184196
"metadata": {},
185197
"source": [
186-
"## Profiling Code with ray.timeline()\n",
198+
"### Profiling Code with ray.timeline()\n",
187199
"\n",
188200
"The other built-in way to profile performance uses `ray.timeline(file)` ([documentation](https://ray.readthedocs.io/en/latest/package-ref.html#ray.timeline)). It requires a Chrome web browser to view the data. This is the only way to profile tasks.\n",
189201
"\n",
@@ -203,7 +215,7 @@
203215
"cell_type": "markdown",
204216
"metadata": {},
205217
"source": [
206-
"## Using Libraries\n",
218+
"### Using Libraries\n",
207219
"\n",
208220
"If tasks or actors call (or subclass) library code in your project and that code isn't in a _subdirectory_ of the driver script, make sure that the process starting Ray has the correct `PYTHONPATH` set to the library location. For example,\n",
209221
"\n",
@@ -216,7 +228,7 @@
216228
"cell_type": "markdown",
217229
"metadata": {},
218230
"source": [
219-
"## Cleaning Up\n",
231+
"### Cleaning Up\n",
220232
"\n",
221233
"When your driver script exists, it will implicitly call `ray.shutdown()`. This can be useful to do explicitly if you want to restart Ray, for example, in a notebook environment. For example:\n",
222234
"\n",

0 commit comments

Comments
 (0)