Hi! May I know how to inject the value of <FLYTE_I...
# ask-the-community
g
Hi! May I know how to inject the value of FLYTE_INTERNAL_IMAGE? 1. Are we injecting this when pyflyte --image? 2. Or we have to manually set this in the container as env vars?
y
i’m not actually sure that env var is used anymore.
we definitely used to inject them.
could you elaborate a bit on the issue you’re seeing?
g
I see. We are looking for a way to get the image_uri from workflows. I know tasks can use different images, but in our case we use one image across the whole workflow.
y
you want to get the image from inside a task?
that should already be possible.
g
Yeah, could you send me the doc?
We are hoping to get this from flyte remote if that is possible
y
huh?
i’m confused.
you’re asking to get the image of a task, from like the command line?
or from inside the task, while the task is running?
g
This: get the image of a task, from like the command line?
y
oh
that’s very different.
that should be possible by just hitting the api.
just call fetch_task.
it’s inside the object that’s returned.
c
if you want to get the image used for a task pod on the command line you can use
kubectl get pods {podname} -o yaml
and look for the
image
field
g
I see. I tried to run while the task is not running, is that possible?
nvm I got it!
Thanks!
y
yeah you’re just hitting the control plane and reading the definition of the task from the database.
g
Thanks a lot Yee! You are very helpful
Btw @Yee, do we ever consider to support labels when pyflyte register? We have a need to store some metadata when registering the workflow and use them when workflow runs.
y
could you elaborate a bit more? what’s the functionality you’re looking for?
flyte does have execution labels.
but these are set at execution time iirc.
g
Sure. Let's not say this is labels. What we hope is: we want to save some metadata (k=v pairs) while we registering the workflow, like artifacts name, repository name etc. which we will need when executing the workflow. (for example to deploy the model, we need to pass the artifact names downstream)
We previously preserve those value in the image as env vars, but due to company restriction, we cannot do it anymore.
I see there is --env, does it act as a one time parameters or I can use that when workflow runs?
y
what are artifacts name?
it is certainly possible to set environment variables at execution time.
g
artifacts name
It is some custom data we want to use in the workflow.
it is certainly possible to set environment variables at execution time.
We hope to set env vars in registration, and use them in execution time
y
you can always set env vars at registration time, at least you can set them in the task definition.
g
hm... we cannot do this because we are the platform-provider (ML infra at Stripe). Workflow code is implemented by our users (Stripe DS)..
That's why I would hope to add
--lables
option in
pyflyte register
, as we will register the workflow to Flyte for our users.
y
this will take some digging.
what do you mean? you can’t add an env field to the task decorator?
could you cut a ticket for this please?
i think it will be helpful to get all the tags/labels in one place.
there’s a bunch scattered all around the idl, they all serve different purposes.
g
what do you mean? you can’t add an env field to the task decorator?
I cannot. We are Stripe ML infra and we set up Flyte to let Stripe Data scientist to develop workflows.
could you cut a ticket for this please?
Sure
y
thanks. could you add more details as well as to the ux you'd like to see.
g