Skip to content

Commit

Permalink
set PYTHONUNBUFFERED to 1 (#1860)
Browse files Browse the repository at this point in the history
  • Loading branch information
kuizhiqing authored Jul 12, 2023
1 parent 2f18ab7 commit 8d8ddba
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/controller.v1/paddlepaddle/envvar.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func setPodEnv(obj interface{}, podTemplateSpec *corev1.PodTemplateSpec, rtype,
// Ref https://stackoverflow.com/questions/59812009/what-is-the-use-of-pythonunbuffered-in-docker-file.
podTemplateSpec.Spec.Containers[i].Env = append(podTemplateSpec.Spec.Containers[i].Env, corev1.EnvVar{
Name: "PYTHONUNBUFFERED",
Value: "0",
Value: "1",
})

podTemplateSpec.Spec.Containers[i].Env = append(podTemplateSpec.Spec.Containers[i].Env, corev1.EnvVar{
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller.v1/pytorch/envvar.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func setPodEnv(obj interface{}, podTemplateSpec *corev1.PodTemplateSpec, rtype,
podTemplateSpec.Spec.Containers[i].Env = append(
podTemplateSpec.Spec.Containers[i].Env, corev1.EnvVar{
Name: "PYTHONUNBUFFERED",
Value: "0",
Value: "1",
})

totalReplicas := getTotalReplicas(pytorchjob)
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller.v1/xgboost/xgboost.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func SetPodEnv(job interface{}, podTemplate *corev1.PodTemplateSpec, rtype, inde
})
podTemplate.Spec.Containers[i].Env = append(podTemplate.Spec.Containers[i].Env, corev1.EnvVar{
Name: "PYTHONUNBUFFERED",
Value: "0",
Value: "1",
})
// This variables are used if it is a LightGBM job
if totalReplicas > 1 {
Expand Down

0 comments on commit 8d8ddba

Please sign in to comment.