Skip to content

Commit

Permalink
removing extra gpu check as discussed with johnu
Browse files Browse the repository at this point in the history
  • Loading branch information
deepanker13 committed Jan 10, 2024
1 parent b2dbcd0 commit 4dd21c7
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions sdk/python/kubeflow/training/api/training_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,8 @@ def train(

if isinstance(resources_per_worker, dict):
if "gpu" in resources_per_worker:
if (
resources_per_worker["gpu"] is not None
and (num_procs_per_worker > resources_per_worker["gpu"])
) or (
resources_per_worker["gpu"] is None and num_procs_per_worker != 0
if resources_per_worker["gpu"] is not None and (
num_procs_per_worker > resources_per_worker["gpu"]
):
raise ValueError(
"Insufficient gpu resources allocated to the container."
Expand Down

0 comments on commit 4dd21c7

Please sign in to comment.