You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Several config fields in src/inference_endpoint/config/schema.py set the same help text twice — once as cyclopts.Parameter(help=...) and once as Field(description=...). This is redundant:
cyclopts (4.10.0) reads Field(description=...)natively for --help. When both are set, help= wins; delete help= and cyclopts falls back to description → identical CLI output.
scripts/regenerate_templates.py (_collect_comments._help) already reads description first, help only as fallback.
So Field(description=...) can be the single source of truth for both the CLI --help text and the YAML template comments.
Proposal
Make Field(description=...) canonical and drop the redundant help=. Keep cyclopts.Parameter(...) only where it carries CLI-only metadata (alias, negative, name, show, required) — those have no Pydantic equivalent. No decorator/machinery needed: cyclopts already does the injection, so this is less machinery, not more.
(Avoid the bare attribute-docstring form — pydantic doesn't put it in FieldInfo.description, so the template generator would lose the comment.)
Scope (as of HEAD 6d28c00)
16 fields set both help + description → 10 identical (safe to collapse), 6 silently divergent; plus 17 help-only and 50 description-only (already single-source).
Follow-up from PR #406 review: #406 (comment)
Background
Several config fields in
src/inference_endpoint/config/schema.pyset the same help text twice — once ascyclopts.Parameter(help=...)and once asField(description=...). This is redundant:Field(description=...)natively for--help. When both are set,help=wins; deletehelp=and cyclopts falls back todescription→ identical CLI output.scripts/regenerate_templates.py(_collect_comments._help) already readsdescriptionfirst,helponly as fallback.So
Field(description=...)can be the single source of truth for both the CLI--helptext and the YAML template comments.Proposal
Make
Field(description=...)canonical and drop the redundanthelp=. Keepcyclopts.Parameter(...)only where it carries CLI-only metadata (alias,negative,name,show,required) — those have no Pydantic equivalent. No decorator/machinery needed: cyclopts already does the injection, so this is less machinery, not more.(Avoid the bare attribute-docstring form — pydantic doesn't put it in
FieldInfo.description, so the template generator would lose the comment.)Scope (as of HEAD
6d28c00)16 fields set both
help+description→ 10 identical (safe to collapse), 6 silently divergent; plus 17 help-only and 50 description-only (already single-source).Identical — just drop
help=ModelParams.seedWarmupConfig.{enabled, n_requests, drain, warmup_random_seed}—saltalready collapsed in fix: Salt failure is a hard error #406DrainConfig.{warmup_timeout_s, performance_timeout_s, accuracy_timeout_s}ProfilingConfig.engine--helpand the YAML comment already say different thingsSingle-sourcing prevents exactly this drift; decide per field which text is correct before collapsing.
help=(CLI)Field(description=)(YAML/schema)EndpointConfig.endpointsEarlyStoppingConfig.enabledSettings.service_ready_timeout_sProfilingConfig.urlsDrainConfig.metrics_drain_timeout_sDrainConfig.metrics_tokenizer_workersAlready done
PR #406 collapsed only
WarmupConfig.salt(that PR edited its help text in both places, so it was in scope). This issue tracks the remaining 15 fields.