Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Adding support for per-task PodTemplate configuration #308

Merged
merged 27 commits into from
Feb 6, 2023

Conversation

hamersaw
Copy link
Contributor

@hamersaw hamersaw commented Jan 11, 2023

TL;DR

This PR adds support for configuring task executions using a per-task defined PodTemplate and / or PodTemplate name. The differences are client vs. server side application respectively.

Type

  • Bug Fix
  • Feature
  • Plugin

Are all requirements met?

  • Code completed
  • Smoke tested
  • Unit tests added
  • Code documentation added
  • Any pending items have an associated Issue

Complete description

Currently supported task types:

  • container
  • dask
  • mpi
  • pod
  • python
  • pytorch
  • ray
  • shell
  • spark
  • tensorflow

Tracking Issue

flyteorg/flyte#3123

Follow-up issue

NA

Signed-off-by: Daniel Rammer <[email protected]>
Signed-off-by: Daniel Rammer <[email protected]>
Signed-off-by: Daniel Rammer <[email protected]>
Signed-off-by: Daniel Rammer <[email protected]>
@codecov
Copy link

codecov bot commented Jan 11, 2023

Codecov Report

Merging #308 (f246012) into master (471a262) will increase coverage by 1.21%.
The diff coverage is 66.22%.

❗ Current head f246012 differs from pull request most recent head 02854c4. Consider uploading reports for the commit 02854c4 to get more accurate results

@@            Coverage Diff             @@
##           master     #308      +/-   ##
==========================================
+ Coverage   63.03%   64.25%   +1.21%     
==========================================
  Files         148      146       -2     
  Lines       12153     9841    -2312     
==========================================
- Hits         7661     6323    -1338     
+ Misses       3912     2939     -973     
+ Partials      580      579       -1     
Flag Coverage Δ
unittests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...tasks/pluginmachinery/flytek8s/container_helper.go 88.43% <52.38%> (-1.28%) ⬇️
go/tasks/pluginmachinery/flytek8s/pod_helper.go 72.54% <54.62%> (-11.52%) ⬇️
go/tasks/plugins/k8s/pod/plugin.go 81.73% <76.00%> (-1.15%) ⬇️
...sks/pluginmachinery/flytek8s/pod_template_store.go 100.00% <100.00%> (ø)
go/tasks/plugins/array/k8s/subtask.go 30.35% <100.00%> (-0.14%) ⬇️
go/tasks/plugins/k8s/kfoperators/mpi/mpi.go 75.00% <100.00%> (+3.79%) ⬆️
...o/tasks/plugins/k8s/kfoperators/pytorch/pytorch.go 73.07% <100.00%> (+4.50%) ⬆️
...s/plugins/k8s/kfoperators/tensorflow/tensorflow.go 75.58% <100.00%> (+3.78%) ⬆️
go/tasks/plugins/k8s/ray/ray.go 79.66% <100.00%> (+0.55%) ⬆️
go/tasks/plugins/array/inputs.go 83.33% <0.00%> (-4.91%) ⬇️
... and 129 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Signed-off-by: Daniel Rammer <[email protected]>
Signed-off-by: Daniel Rammer <[email protected]>
Signed-off-by: Daniel Rammer <[email protected]>
@hamersaw hamersaw marked this pull request as ready for review January 13, 2023 21:00
Copy link
Contributor

@ByronHsu ByronHsu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: the name of this function is forgotten to change. Can you also fix this?

Signed-off-by: Daniel Rammer <[email protected]>
Signed-off-by: Daniel Rammer <[email protected]>
Signed-off-by: Daniel Rammer <[email protected]>
Signed-off-by: Daniel Rammer <[email protected]>
Signed-off-by: Daniel Rammer <[email protected]>
Signed-off-by: Daniel Rammer <[email protected]>
Signed-off-by: Daniel Rammer <[email protected]>
@hamersaw hamersaw requested a review from EngHabu February 3, 2023 17:09
@hamersaw hamersaw merged commit c4abd4f into master Feb 6, 2023
@hamersaw hamersaw deleted the feature/task-pod-template branch February 6, 2023 16:57
@fg91
Copy link
Member

fg91 commented Feb 7, 2023

Thanks a lot @hamersaw 🙏 🙂

@ByronHsu
Copy link
Contributor

ByronHsu commented Feb 7, 2023

Thank you so much @hamersaw

@flixr
Copy link
Contributor

flixr commented Feb 9, 2023

very nice, thanks @hamersaw 😄

eapolinario pushed a commit that referenced this pull request Sep 6, 2023
* implemented

Signed-off-by: Daniel Rammer <[email protected]>

* unit tests working

Signed-off-by: Daniel Rammer <[email protected]>

* updated flyteidl

Signed-off-by: Daniel Rammer <[email protected]>

* fixed lint issues

Signed-off-by: Daniel Rammer <[email protected]>

* updated documentation

Signed-off-by: Daniel Rammer <[email protected]>

* removing unnecessarily commented lines

Signed-off-by: Daniel Rammer <[email protected]>

* updated unit tests

Signed-off-by: Daniel Rammer <[email protected]>

* fixed lint issues

Signed-off-by: Daniel Rammer <[email protected]>

* updated docs

Signed-off-by: Daniel Rammer <[email protected]>

* if user provides PodTemplate name and it doesn't exist we should fail

Signed-off-by: Daniel Rammer <[email protected]>

* updated for new flyteidl definition

Signed-off-by: Daniel Rammer <[email protected]>

* updated flyteidl

Signed-off-by: Daniel Rammer <[email protected]>

* working with either container or pod passed in task template

Signed-off-by: Daniel Rammer <[email protected]>

* cleaned up definitions

Signed-off-by: Daniel Rammer <[email protected]>

* fixing up unit tests

Signed-off-by: Daniel Rammer <[email protected]>

* fixed unit tests

Signed-off-by: Daniel Rammer <[email protected]>

* fixed lint issues

Signed-off-by: Daniel Rammer <[email protected]>

* removed dead code

Signed-off-by: Daniel Rammer <[email protected]>

* removing more dead code

Signed-off-by: Daniel Rammer <[email protected]>

* remove more dead code

Signed-off-by: Daniel Rammer <[email protected]>

* correctly applying resources for container and pod tasks

Signed-off-by: Daniel Rammer <[email protected]>

* updated flyteidl version

Signed-off-by: Daniel Rammer <[email protected]>

* moved sidecar parsing to pod plugin

Signed-off-by: Daniel Rammer <[email protected]>

* fixed unit tests

Signed-off-by: Daniel Rammer <[email protected]>

* updating semantics to address review comments

Signed-off-by: Daniel Rammer <[email protected]>

---------

Signed-off-by: Daniel Rammer <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants