Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Serve] [Docs] Clarify that the Serve config only supports remote URIs (
#34212) The Serve config only supports remote URIs within its `runtime_env` for safety purposes. However, this behavior is poorly documented and only guarded by a pydantic validator with an unclear error message. This change documents the remote URI requirements and clarifies the error message. Behavior when you run the following config with an invalid `runtime_env`: ```yaml import_path: fruit:graph runtime_env: { "working_dir": "src" } ``` 1. Without the change: ```console % serve run config.yaml ... pydantic.error_wrappers.ValidationError: 1 validation error for ServeApplicationSchema runtime_env Invalid protocol for runtime_env URI src. Supported protocols: ['GCS', 'CONDA', 'PIP', 'HTTPS', 'S3', 'GS', 'FILE']. Original error: '' is not a valid Protocol (type=value_error) ``` 2. With the change: ```console % serve run config.yaml ... pydantic.error_wrappers.ValidationError: 1 validation error for ServeApplicationSchema runtime_env runtime_envs in the Serve config support only remote URIs in working_dir and py_modules. Got error when parsing URI: Invalid protocol for runtime_env URI "src". Supported protocols: ['GCS', 'CONDA', 'PIP', 'HTTPS', 'S3', 'GS', 'FILE']. Original error: '' is not a valid Protocol (type=value_error) ```
- Loading branch information