Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions doc/source/serve/advanced-guides/dev-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,20 @@ After you're done testing, you can shut down Ray Serve by interrupting the `serv

Note that rerunning `serve run` will redeploy all deployments. To prevent redeploying those deployments whose code hasn't changed, you can use `serve deploy`; see the [Production Guide](serve-in-production) for details.

### Local Testing Mode

Ray Serve now supports a local testing mode that allows you to test your application logic in-process without deploying to a Ray cluster. This can be useful for unit testing and debugging.

To enable local testing mode, you can set the `_local_testing_mode` flag to `True` when calling `serve.run`:

```python
serve.run(app, _local_testing_mode=True)
```

Alternatively, you can set the environment variable `RAY_SERVE_FORCE_LOCAL_TESTING_MODE=1` to force local testing mode for all `serve.run` invocations.

In local testing mode, deployments run in the local process, which enables faster development iterations and the use of debugging tools like PDB. However, some features like converting deployment responses to Ray object references are not supported in this mode.

## Testing on a remote cluster

To test on a remote cluster, you'll use `serve run` again, but this time you'll pass in an `--address` argument to specify the address of the Ray cluster to connect to. For remote clusters, this address has the form `ray://<head-node-ip-address>:10001`; see [Ray Client](ray-client-ref) for more information.
Expand Down