Skip to content

Commit

Permalink
use omni endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
japrescott committed Jan 22, 2024
1 parent 17e1038 commit d12c59f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions lightly/api/api_workflow_compute_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
DockerRunScheduledState,
DockerRunState,
DockerWorkerConfigV3,
DockerWorkerConfigV3CreateRequest,
DockerWorkerConfigOmniVXCreateRequest,
DockerWorkerConfigV3Docker,
DockerWorkerConfigV3Lightly,
DockerWorkerRegistryEntryData,
Expand Down Expand Up @@ -243,11 +243,13 @@ def create_compute_worker_config(
lightly=lightly,
selection=selection,
)
request = DockerWorkerConfigV3CreateRequest(
config=config, creator=self._creator
)
request = DockerWorkerConfigOmniVXCreateRequest.from_dict({
"version": "V3",
"config": config.to_dict(by_alias=True),
"creator": self._creator,
})
try:
response = self._compute_worker_api.create_docker_worker_config_v3(request)
response = self._compute_worker_api.create_docker_worker_config_vx(request)
return response.id
except ApiException as e:
if e.body is None:
Expand Down

0 comments on commit d12c59f

Please sign in to comment.