Repository navigation
serving-endpoints: add --json examples to help - #7666
Open
anshul0713 wants to merge 3 commits into
Open
anshul0713 wants to merge 3 commits into
anshul0713 wants to merge 3 commits into
Conversation
The generated help for create, update-config, put-ai-gateway, patch-telemetry-config and query only lists --json, and most of each request body has no flags. In agent trials, users of these commands guessed the body shape from errors or read the SDK source. Add one example body per command, each checked against the API, plus the AI Gateway field-removal behavior seen there. Co-authored-by: Isaac <no-reply@databricks.com> Signed-off-by: Anshul Gupta <anshul.gupta@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com> Signed-off-by: Anshul Gupta <anshul.gupta@databricks.com>
Collaborator
✅ Integration test reportCommit: 2809158
Top 11 slowest tests (at least 2 minutes):
|
The tensor-only inputs example failed for models with a column signature, which reject a bare 2-D array. Checked against an MLflow scoring server. Co-authored-by: Isaac <no-reply@databricks.com> Signed-off-by: Anshul Gupta <anshul.gupta@databricks.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
--helpfor fiveserving-endpointscommands now ends with an example--jsonrequest body:create: serve a Unity Catalog model version on CPU.update-config: two versions with an 80/20 traffic split. It also notes that routes refer to served entity names.put-ai-gateway: usage tracking, an inference table, a per-user rate limit and a PII input guardrail. It also says which settings an omitted field clears.patch-telemetry-config: logs, traces and metrics exported to Unity Catalog tables.query:dataframe_records,dataframe_split,inputsand chatmessages, with a pointer toget-open-apifor an endpoint's own schema.Why
The generated help only lists
--json, and most of these request bodies have no flags. In agent trials covering these commands, 4 of 8 trial reports flagged missing body shapes:served_entitiesat the wrong level and only learned theconfigwrapper fromunknown fieldwarnings.How the examples were checked
Each example was run against a CPU endpoint on a staging workspace, with only the names substituted: create, update-config (the traffic split was accepted), patch-telemetry-config (the config shows up in
get), all three custom-model query formats, and put-ai-gateway.That run also showed the AI Gateway behavior the help now describes:
rate_limitsfrom a later request removed them.inference_table_configkept it, until it was sent with"enabled": false.AI Guardrails is not currently supported for this endpoint type).The guardrail body itself is the one an agent applied to an external-model endpoint in a trial.
Backward compatibility
Help text only. There are no changes to requests, output, flags or exit codes.
Tests
--jsonbody is valid JSON../task lintpasses.This pull request and its description were written by Isaac.