Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor execution resources to a reference #114

Merged
merged 1 commit into from
Sep 14, 2023
Merged
Show file tree
Hide file tree
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
25 changes: 3 additions & 22 deletions valohai_yaml/schema/endpoint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,30 +49,11 @@ properties:
additionalProperties: false
properties:
cpu:
type: object
description: CPU resource requirements and limits in vCPU counts e.g. 0.1 is 10% of one CPU.
additionalProperties: false
properties:
min:
type: number
max:
type: number
"$ref": "./workflow-resource-cpu.json"
memory:
type: object
description: Memory requirements and limits in MB e.g. 100 is 100 MB.
additionalProperties: false
properties:
min:
type: number
max:
type: number
"$ref": "./workflow-resource-memory.json"
devices:
type: object
description: "Devices required e.g. 'nvidia.com/gpu: 1' for one NVIDIA GPU."
patternProperties:
"^.+$":
type: number
minimum: 1
"$ref": "./workflow-resource-devices.json"
oneOf:
- required:
- server-command
Expand Down
8 changes: 8 additions & 0 deletions valohai_yaml/schema/workflow-resource-cpu.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
type: object
description: CPU resource requirements and limits in vCPU counts e.g. 0.1 is 10% of one CPU.
additionalProperties: false
properties:
min:
type: number
max:
type: number
6 changes: 6 additions & 0 deletions valohai_yaml/schema/workflow-resource-devices.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
type: object
description: "Devices required e.g. 'nvidia.com/gpu: 1' for one NVIDIA GPU."
patternProperties:
"^.+$":
type: number
minimum: 1
8 changes: 8 additions & 0 deletions valohai_yaml/schema/workflow-resource-memory.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
type: object
description: Memory requirements and limits in MB e.g. 100 is 100 MB.
additionalProperties: false
properties:
min:
type: number
max:
type: number
Loading