Skip to content

Commit

Permalink
fix name error in serve run ... example (ray-project#29038)
Browse files Browse the repository at this point in the history
The documentation has wrong examples for serve run that fail because it should be the name of the variable and not the class.
  • Loading branch information
artemisart authored Oct 4, 2022
1 parent c56d864 commit 419dd8d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions doc/source/serve/dev-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Recall our example above:
Now run the following command in your terminal:

```bash
serve run local_dev:HelloDeployment
serve run local_dev:graph
# 2022-08-11 11:31:47,692 INFO scripts.py:294 -- Deploying from import path: "local_dev:graph".
# 2022-08-11 11:31:50,372 INFO worker.py:1481 -- Started a local Ray instance. View the dashboard at http://127.0.0.1:8265.
# (ServeController pid=9865) INFO 2022-08-11 11:31:54,039 controller 9865 http_state.py:129 - Starting HTTP proxy with name 'SERVE_CONTROLLER_ACTOR:SERVE_PROXY_ACTOR-dff7dc5b97b4a11facaed746f02448224aa0c1fb651988ba7197e949' on node 'dff7dc5b97b4a11facaed746f02448224aa0c1fb651988ba7197e949' listening on '127.0.0.1:8000'
Expand Down Expand Up @@ -88,7 +88,7 @@ When making the transition from your local machine to a remote cluster, you'll n
Let's see a simple example that just packages the code. Run the following command on your local machine, with your remote cluster head node IP address substituted for `<head-node-ip-address>` in the command:

```bash
serve run --address=ray://<head-node-ip-address>:10001 --working_dir="./project/src" local_dev:HelloDeployment
serve run --address=ray://<head-node-ip-address>:10001 --working_dir="./project/src" local_dev:graph
```

This will connect to the remote cluster via Ray Client, upload the `working_dir` directory, and run your serve application. Here, the local directory specified by `working_dir` must contain `local_dev.py` so that it can be uploaded to the cluster and imported by Ray Serve.
Expand All @@ -103,7 +103,7 @@ curl -X PUT http://<head-node-ip-address>:8000/?name=Ray
For more complex dependencies, including files outside the working directory, environment variables, and Python packages, you can use {ref}`Runtime Environments<runtime-environments>`. Here is an example using the --runtime-env-json argument:

```bash
serve run --address=ray://<head-node-ip-address>:10001 --runtime-env-json='{"env_vars": {"MY_ENV_VAR": "my-value"}, "working_dir": "./project/src", "pip": ["requests", "chess"]}' local_dev:HelloDeployment
serve run --address=ray://<head-node-ip-address>:10001 --runtime-env-json='{"env_vars": {"MY_ENV_VAR": "my-value"}, "working_dir": "./project/src", "pip": ["requests", "chess"]}' local_dev:graph
```

You can also specify the `runtime_env` via a YAML file; see [serve run](serve_cli.html#serve-run) for details.
Expand Down

0 comments on commit 419dd8d

Please sign in to comment.