https://flyte.org logo
#ask-the-community
Title
# ask-the-community
a

Alykhan Tejani

12/19/2023, 9:19 AM
our use case is that we cant just define our service in the task because we have dependencies that aren't compatible with flytekit so we have to build our training service separately
a

Alykhan Tejani

12/19/2023, 9:58 AM
yes I have seen this, they use:
Copy code
TfJob(worker=Worker(replicas=1), ps=PS(replicas=1), chief=Chief(replicas=1)),
This means flyte will run the code in the task in the image. However our code has conflicts with flytekit so we need to build a separate image for it
s

Samhita Alla

12/19/2023, 10:09 AM
i think you need to add flytekit to the images you supply to chief and worker as well.
a

Alykhan Tejani

12/19/2023, 10:10 AM
I did that but the TFJob spec that gets built has a command that tries to run pyflyte-execute and points to the serialized python function for the task
which I dont know how to inject into the image
alternatively is there an example anywhere that uses the
image
attribute of `Chief`/`Ps` ?
s

Samhita Alla

12/19/2023, 10:15 AM
i don't think so. @L godlike / @Kevin Su / @Yubo Wang any idea how to implement this?
l

L godlike

12/19/2023, 10:29 AM
I will take a look, maybe in 1 week
a

Alykhan Tejani

12/19/2023, 1:04 PM
it seems that when you provide an image to TfJob Chief/worker it doesn't actually package the task module into the image
y

Yubo Wang

12/19/2023, 6:50 PM
Hi @Alykhan Tejani did you examine the destination directory in your running pod’s container? Are you sure the task modules are not in there?
a

Alykhan Tejani

01/02/2024, 8:32 AM
yeah I couldnt find them there
@L godlike did you have a chance to look at this?
l

L godlike

01/02/2024, 8:34 AM
still working on other issues, probably will take a look at friday. You can take a look at this file. https://github.com/flyteorg/flytekit/blob/master/plugins/flytekit-kf-tensorflow/flytekitplugins/kftensorflow/task.py
I don't think we currently support specifying image to TFJob Chief/Worker
If it is doable, you can create PR to support this feature.