Skip to content

Commit 17a5534

Browse files
committed
Updates
1 parent 925be90 commit 17a5534

File tree

2 files changed

+43
-41
lines changed

2 files changed

+43
-41
lines changed

docs/user_guides/projects/jobs/ray_job.md

+17-18
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,15 @@ the various configuration parameters each job type comes with. Hopsworks support
1717
e.g backfilling a Feature Group by running your feature engineering pipeline nightly. Scheduling can be done both through the UI and the python API,
1818
checkout [our Scheduling guide](schedule_job.md).
1919

20+
!!!warning "Enable Ray"
21+
22+
Support for Ray needs to be explicitly enabled by adding the following option in the `values.yaml` file for the deployment:
23+
24+
```yaml
25+
global:
26+
ray:
27+
enabled: true
28+
```
2029

2130
## UI
2231

@@ -62,15 +71,14 @@ Next step is to select the program to run. You can either select `From project`,
6271
Resource allocation for the Driver and Workers can be configured.
6372

6473
!!! notice "Using the resources in the Ray script"
65-
The resources you will configure are for the cluster that will be created when you start a Ray job. You can still
66-
provide extra configuration later in your script to use the resources in the created cluster using `ScalingConfig` i.e.,
67-
`ScalingConfig(num_workers=4, trainer_resources={"CPU": 1}, use_gpu=True)`.
74+
The resource configurations describe the cluster that will be provisioned when launching the Ray job. User can still
75+
provide extra configurations in the job script using `ScalingConfig`, i.e. `ScalingConfig(num_workers=4, trainer_resources={"CPU": 1}, use_gpu=True)`.
6876

69-
* `Driver memory`: Number of MBs to allocate for Driver
77+
* `Driver memory`: Memory in MBs to allocate for Driver
7078

7179
* `Driver virtual cores`: Number of cores to allocate for the Driver
7280

73-
* `Worker memory`: Number of MBs to allocate for each worker
81+
* `Worker memory`: Memory in MBs to allocate for each worker
7482

7583
* `Worker cores`: Number of cores to allocate for each worker
7684

@@ -89,10 +97,7 @@ for Ray Job">
8997

9098
Runtime environment and Additional files required for the Ray job can also be provided.
9199

92-
* `Runtime Environment (Optional)`: A runtime environment describes the dependencies required for the Ray job
93-
including files, packages, environment variables, and more. This is useful when you need to install specific
94-
packages and set environment variables for this particular Ray job. It should be provided as a YAML file. You can
95-
select the file from the project or upload a new one.
100+
* `Runtime Environment (Optional)`: A [runtime environment](https://docs.ray.io/en/latest/ray-core/handling-dependencies.html#runtime-environments) describes the dependencies required for the Ray job including files, packages, environment variables, and more. This is useful when you need to install specific packages and set environment variables for this particular Ray job. It should be provided as a YAML file. You can select the file from the project or upload a new one.
96101

97102
* `Additional files`: List of other files required for the Ray job. These files will be placed in `/srv/hops/ray/job`.
98103

@@ -108,7 +113,6 @@ environment and additional files">
108113

109114
Now click the `Run` button to start the execution of the job, and then click on `Executions` to see the list of all executions.
110115

111-
112116
<p align="center">
113117
<figure>
114118
<img src="../../../../assets/images/guides/jobs/start_ray_job.png" alt="Start job execution">
@@ -117,9 +121,8 @@ Now click the `Run` button to start the execution of the job, and then click on
117121
</p>
118122

119123
## Ray Dashboard
120-
When the Ray job is running, you can access the Ray dashboard to monitor the job. To open the Ray Dashboard click on
121-
the `Ray Dashboard` link under the execution and a new tab will be opened. The Ray dashboard is accessible from the
122-
`Executions` page. The Ray dashboard is only available when the job execution is running. In the Ray Dashboard,
124+
When the Ray job is running, you can access the Ray dashboard to monitor the job. The Ray dashboard is accessible from the
125+
`Executions` page. Please note that the Ray dashboard is only available when the job execution is running. In the Ray Dashboard,
123126
you can monitor the resources used by the job, the number of workers, logs, and the tasks that are running.
124127
<p align="center">
125128
<figure>
@@ -204,8 +207,4 @@ print(f_err.read())
204207

205208
[Jobs](https://docs.hopsworks.ai/hopsworks-api/{{{ hopsworks_version }}}/generated/api/jobs/)
206209

207-
[Executions](https://docs.hopsworks.ai/hopsworks-api/{{{ hopsworks_version }}}/generated/api/executions/)
208-
209-
## Conclusion
210-
211-
In this guide you learned how to create and run a Ray job.
210+
[Executions](https://docs.hopsworks.ai/hopsworks-api/{{{ hopsworks_version }}}/generated/api/executions/)

docs/user_guides/projects/jupyter/ray_notebook.md

+26-23
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
---
2+
description: Documentation on how to run Ray applications on Jupyter on Hopsworks.
3+
---
14
# How To Run A Ray Notebook
25

36
### Introduction
@@ -7,6 +10,15 @@ Jupyter is provided as a service in Hopsworks, providing the same user experienc
710
* Supports JupyterLab and the classic Jupyter front-end
811
* Configured with Python3, PySpark and Ray kernels
912

13+
!!!warning "Enable Ray"
14+
15+
Support for Ray needs to be explicitly enabled by adding the following option in the `values.yaml` file for the deployment:
16+
17+
```yaml
18+
global:
19+
ray:
20+
enabled: true
21+
```
1022

1123
## Step 1: Jupyter dashboard
1224

@@ -30,17 +42,15 @@ Jupyter. Click `edit configuration` to get to the configuration page and select
3042

3143
Resource allocation for the Driver and Workers can be configured.
3244

33-
!!! important
34-
The resources you will configure are for the cluster that will be created when you start a Ray session inside the
35-
Jupyter notebook. You can still provide extra configuration later in your code specify the resources you would
36-
like to use in the created cluster for a particular task (i.e., model training) using `ScalingConfig` i.e.,
37-
`ScalingConfig(num_workers=4, trainer_resources={"CPU": 1}, use_gpu=True)`.
45+
!!! notice "Using the resources in the Ray script"
46+
The resource configurations describe the cluster that will be provisioned when launching the Ray job. User can still
47+
provide extra configurations in the job script using `ScalingConfig`, i.e. `ScalingConfig(num_workers=4, trainer_resources={"CPU": 1}, use_gpu=True)`.
3848

39-
* `Driver memory`: Number of MBs to allocate for Driver
49+
* `Driver memory`: Memory in MBs to allocate for Driver
4050

4151
* `Driver virtual cores`: Number of cores to allocate for the Driver
4252

43-
* `Worker memory`: Number of MBs to allocate for each worker
53+
* `Worker memory`: Memory in MBs to allocate for each worker
4454

4555
* `Worker cores`: Number of cores to allocate for each worker
4656

@@ -56,12 +66,10 @@ the Ray kernels">
5666
</figure>
5767
</p>
5868

59-
### Runtime environment and Additional files required for the Ray job can also be provided.
69+
Runtime environment and Additional files required for the Ray job can also be provided.
70+
71+
* `Runtime Environment (Optional)`: A [runtime environment](https://docs.ray.io/en/latest/ray-core/handling-dependencies.html#runtime-environments) describes the dependencies required for the Ray job including files, packages, environment variables, and more. This is useful when you need to install specific packages and set environment variables for this particular Ray job. It should be provided as a YAML file. You can select the file from the project or upload a new one.
6072

61-
* `Runtime Environment (Optional)`: A runtime environment describes the dependencies required for the Ray session
62-
including files, packages, environment variables, and more. This is useful when you need to install specific
63-
packages and set environment variables for this particular Ray session. It should be provided as a YAML file. You can
64-
select the file from the project or upload a new one.
6573

6674
* `Additional files`: List of other files required for the Ray job. These files will be placed in `/srv/hops/ray/job`.
6775

@@ -120,20 +128,15 @@ Once the Jupyter instance is started, you can create a new notebook by clicking
120128

121129
## Step 6: Access Ray Dashboard
122130

123-
When you start a Ray session in Jupyter, a new application will appear in the Jupyter page. A notebook name from
124-
which the session was started is displayed. You can access the Ray UI by clicking on the `Ray Dashboard` and a new
125-
tab will be opened. The Ray dashboard is only available the notebook or the kernel it was started from is running.
126-
You can kill the Ray session to free up resources by shutting down the kernel in Jupyter. In the Ray Dashboard, you can monitor
127-
the resources used by code you are running, the number of workers, logs, and the tasks that are running.
131+
When you start a Ray session in Jupyter, a new application will appear in the Jupyter page.
132+
The notebook name from which the session was started is displayed. You can access the Ray UI by clicking on the `Ray Dashboard` and a new
133+
tab will be opened. The Ray dashboard is only available while the Ray kernel is running.
134+
You can kill the Ray session to free up resources by shutting down the kernel in Jupyter.
135+
In the Ray Dashboard, you can monitor the resources used by code you are running, the number of workers, logs, and the tasks that are running.
128136

129137
<p align="center">
130138
<figure>
131139
<img src="../../../../assets/images/guides/jupyter/ray_jupyter_notebook_session.png" alt="Access Ray Dashboard">
132140
<figcaption>Access Ray Dashboard for Jupyter Ray session</figcaption>
133141
</figure>
134-
</p>
135-
136-
## Conclusion
137-
138-
In this guide you learned how to configure and run a Ray application in Jupyter. You can now follow this [guide](..
139-
/python/python_install.md) to install a library that can be used in a notebook.
142+
</p>

0 commit comments

Comments
 (0)