Fabio Grätz
12/06/2023, 3:07 PM@task
def foo() -> str:
return "foo"
@workflow
def wf():
foo().with_overrides(
container_image="{{.image.default.fqn}}:" + "9410d0f0ed4a25577ab35a79bd3eb1119d8627d59c7a8fb947d42ca9fb46a61c"
)
I can in fact specify any version "{{.image.default.fqn}}:" + "non-existent"
and the task in the UI still shows the “default image”.
I saw that there was very recent work fixing container image overrides for map tasks. Could this be broken also for normal tasks? Or am I using it the wrong way?Fabio Grätz
12/06/2023, 3:11 PMSamhita Alla
Samhita Alla
Kevin Su
12/06/2023, 10:49 PMFabio Grätz
12/07/2023, 10:44 AMpyflyte run
(which we mostly don’t use) but does not work if we use pyflyte register
and then run from the UI.Fabio Grätz
12/07/2023, 10:45 AMSamhita Alla
Slackbot
12/07/2023, 11:01 AMSamhita Alla
Fabio Grätz
12/07/2023, 11:12 AMFabio Grätz
12/07/2023, 11:14 AMFabio Grätz
12/07/2023, 7:08 PMKevin Su
12/07/2023, 7:37 PMfoo
1. register foo with default image
2. compile the workflow, and register the tasks in the workflow
3. foo already exists, so flytekit won’t register it again
we should compile the workflow first
1. compile the workflow, and register foo with new image in the workflowFabio Grätz
12/07/2023, 8:15 PMpyflyte register
doesn’t work with overrides because of the order in which things are happening?Kevin Su
12/07/2023, 10:15 PM@workflow
def wf():
foo().with_overrides(container_image="image1")
foo().with_overrides(container_image="image2")
these two tasks in your workflow will use same image, because flytekit only register one task entity.Kevin Su
12/07/2023, 10:17 PMKevin Su
12/07/2023, 10:18 PM@task(container_image="{{.image.default.fqn}}:" + "9410d0f0ed4a25577ab35a79bd3eb1119d8627d59c7a8fb947d42ca9fb46a61c")
def foo() -> str:
return "foo"
@workflow
def wf():
foo()
Fabio Grätz
12/07/2023, 11:25 PMwith_overrides
to run a task with each of them but it sounds like this wouldn’t work because the overriding happens locally before registering. Do you think it would work if we loop over the images, start a dynamic for each and then override the image in there? 🤔Fabio Grätz
12/07/2023, 11:25 PMFabio Grätz
12/07/2023, 11:26 PMKevin Su
12/07/2023, 11:33 PMKevin Su
12/07/2023, 11:33 PMFabio Grätz
12/08/2023, 3:00 PMwith_overrides(container_image=…)
together with dynamic @Kevin Su. With this workaround, the team that asked me about this is unblocked and can do their experiments … 🙂Fabio Grätz
12/08/2023, 3:03 PM