Skip to content

Commit

Permalink
fix formatting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
tfurmston committed Oct 4, 2023
1 parent 206a966 commit cfcfe02
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
7 changes: 3 additions & 4 deletions metaflow/plugins/argo/argo_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,14 +290,13 @@ def _construct_resource_requirements(self, resources):
"ephemeral-storage": "%sM" % str(resources["disk"]),
}
y = {
"%s.com/gpu".lower()
% resources["gpu_vendor"]: str(resources["gpu"])
"%s.com/gpu".lower() % resources["gpu_vendor"]: str(resources["gpu"])
for _ in [0]
if resources["gpu"] is not None
}
return {
'requests': x if KUBERNETES_RESOURCE_REQUESTS else {},
'limits': {**x, **y} if KUBERNETES_RESOURCE_REQUESTS else y,
"requests": x if KUBERNETES_RESOURCE_REQUESTS else {},
"limits": {**x, **y} if KUBERNETES_RESOURCE_REQUESTS else y,
}


Expand Down
8 changes: 4 additions & 4 deletions metaflow/plugins/kubernetes/kubernetes_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,16 +317,16 @@ def _construct_resource_requirements(self):
"ephemeral-storage": "%sM" % str(self._kwargs["disk"]),
}
y = {
"%s.com/gpu".lower()
% self._kwargs["gpu_vendor"]: str(self._kwargs["gpu"])
"%s.com/gpu".lower() % self._kwargs["gpu_vendor"]: str(self._kwargs["gpu"])
for _ in [0]
if self._kwargs["gpu"] is not None
}
return {
'requests': x if KUBERNETES_RESOURCE_REQUESTS else {},
'limits': {**x, **y} if KUBERNETES_RESOURCE_REQUESTS else y,
"requests": x if KUBERNETES_RESOURCE_REQUESTS else {},
"limits": {**x, **y} if KUBERNETES_RESOURCE_REQUESTS else y,
}


class RunningJob(object):

# State Machine implementation for the lifecycle behavior documented in
Expand Down

0 comments on commit cfcfe02

Please sign in to comment.