Skip to content

Commit

Permalink
Override requests and limits in kwargs with values from task_config (f…
Browse files Browse the repository at this point in the history
…lyteorg#419)

As done in kftensorflow in flyteorg#408

Signed-off-by: Sören Brunk <[email protected]>
  • Loading branch information
sbrunk authored Mar 14, 2021
1 parent 7600429 commit 805c5c2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions plugins/kfpytorch/flytekitplugins/kfpytorch/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@ def __init__(self, task_config: PyTorch, task_function: Callable, **kwargs):
task_config,
task_function,
task_type=self._PYTORCH_TASK_TYPE,
requests=task_config.per_replica_requests,
limits=task_config.per_replica_limits,
**kwargs
**{**kwargs, "requests": task_config.per_replica_requests, "limits": task_config.per_replica_limits}
)

def get_custom(self, settings: SerializationSettings) -> Dict[str, Any]:
Expand Down

0 comments on commit 805c5c2

Please sign in to comment.