Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to pass environment variable from tfjob to pod #1273

Closed
ghost opened this issue May 8, 2021 · 2 comments
Closed

Not able to pass environment variable from tfjob to pod #1273

ghost opened this issue May 8, 2021 · 2 comments

Comments

@ghost
Copy link

ghost commented May 8, 2021

Here is how the tfjob looks like:

apiVersion: "kubeflow.org/v1"
kind: "TFJob"
metadata:
name: mlmodel-train-recipe-textcls
namespace: kubeflow
spec:
cleanPodPolicy: All
tfReplicaSpecs:
Worker:
replicas: 1
restartPolicy: Never
template:
spec:
containers:
- name: tensorflow
image: gcr.io/*****/mlmodel-train-recipe-textcls
command:
- "python"
- "services/bert_textcls/execute_job.py"
env:
- name: JOB_ID
value: "xyz"

Only for reference, I have kept a JOB_ID value as xyz but in the actual pipeline, I am using cloud builder and replacing the job_id on the fly. The tfjob worker gets created but when the value of os.getenv("JOB_ID") is always None.

Is it a bug in the latest tf-operator?

There is one in reference - https://www.kubeflow.org/docs/components/training/tftraining/

I am using kubeflow 1.3 and version 1.1.0 of tfoperator installed using kustomization scripts for kubeflow overlays - https://github.com/kubeflow/tf-operator/tree/v1.1.0/manifests

@gaocegege
Copy link
Member

I cannot reproduce it, could you please format the code to show if there is a problem with indentation.

@stale
Copy link

stale bot commented Aug 21, 2021

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.

@stale stale bot closed this as completed Mar 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant