Skip to content
Snippets Groups Projects
Commit 19675ca5 authored by Manon Blanco's avatar Manon Blanco Committed by Yoann Schneider
Browse files

Update model_usage to an enum

parent 826d964b
No related branches found
No related tags found
1 merge request!471Update model_usage to an enum
Pipeline #148461 passed
...@@ -80,7 +80,16 @@ include: ...@@ -80,7 +80,16 @@ include:
: This worker does not support GPUs. It may run on a host that has a GPU, but it will ignore it. : This worker does not support GPUs. It may run on a host that has a GPU, but it will ignore it.
`model_usage` `model_usage`
: Boolean. Whether or not this worker requires a model version to run. Defaults to `false`. : Whether or not this worker requires a model version to run. Defaults to `disabled`. May take one of the following values:
`required`
: This worker requires a model version, and will only be run on processes with a model.
`supported`
: This worker supports a model version, but may run on any processes, including those without model.
`disabled`
: This worker does not support model version. It may run on a process that has a model, but it will ignore it.
`docker` `docker`
: Regroups Docker-related configuration attributes: : Regroups Docker-related configuration attributes:
......
...@@ -139,7 +139,7 @@ def _mock_worker_run_api(responses): ...@@ -139,7 +139,7 @@ def _mock_worker_run_api(responses):
"docker_image_name": None, "docker_image_name": None,
"state": "created", "state": "created",
"gpu_usage": "disabled", "gpu_usage": "disabled",
"model_usage": False, "model_usage": "disabled",
"worker": { "worker": {
"id": "deadbeef-1234-5678-1234-worker", "id": "deadbeef-1234-5678-1234-worker",
"name": "Fake worker", "name": "Fake worker",
...@@ -206,7 +206,7 @@ def _mock_worker_run_no_revision_api(responses): ...@@ -206,7 +206,7 @@ def _mock_worker_run_no_revision_api(responses):
"docker_image_name": None, "docker_image_name": None,
"state": "created", "state": "created",
"gpu_usage": "disabled", "gpu_usage": "disabled",
"model_usage": False, "model_usage": "disabled",
"worker": { "worker": {
"id": "deadbeef-1234-5678-1234-worker", "id": "deadbeef-1234-5678-1234-worker",
"name": "Fake worker", "name": "Fake worker",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment