pipelines
pipelines copied to clipboard
Pass env vars to create_custom_training_job_from_component
Feature Area
/area components
What feature would you like to see?
I would like to add an env_var
argument to the custom_job.utils.create_custom_training_job_from_component function, so that I can pass environment variables to my application container.
What is the use case or pain point?
When building pipeline components with this function, there is no way to pass environment variables to my container. It is weird that this function supports all other parts of the container spec, except "env". I wonder if this was just an oversight.
Is there a workaround currently?
I had to vendor and modify the code of create_custom_training_job_from_component. It's a super simple change, just add env_vars
as argument and add this inside the function:
if env_vars:
worker_pool_spec["container_spec"]["env"] = env_vars
Love this idea? Give it a 👍.
/assign @connor-mccarthy
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically closed because it has not had recent activity. Please comment "/reopen" to reopen it.
@jmmanso did you find a workaround for this?
@pthieu it actually got fixed at the source, thanks for following up