Skip to content

Commit

Permalink
Fix configuration schema definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
Egor-S committed Feb 8, 2024
1 parent 1d5964d commit ccfb07f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/dstack/_internal/core/models/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,8 @@ class Config:
def schema_extra(schema: Dict[str, Any]):
schema.clear()
# replace strict schema with a more permissive one
for field, value in ResourcesSpecSchema.schema().items():
ref_template = "#/definitions/ResourcesSpec/definitions/{model}"
for field, value in ResourcesSpecSchema.schema(ref_template=ref_template).items():
schema[field] = value

cpu: Range[int] = DEFAULT_CPU_COUNT
Expand Down

0 comments on commit ccfb07f

Please sign in to comment.