Skip to content

Commit 5a8231e

Browse files
samos123changlan
authored andcommitted
Set PYTHONUNBUFFERED=1 for pathways Jax client
GitOrigin-RevId: 11a8fe0
1 parent f194898 commit 5a8231e

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

axlearn/cloud/gcp/pathways_utils.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,8 @@ def _build_pathways_head_container(self) -> dict:
293293
self._update_env_list(env_list, "JAX_PLATFORMS", "proxy")
294294
self._update_env_list(env_list, "ENABLE_PATHWAYS_PERSISTENCE", "1")
295295
self._update_env_list(env_list, "TPU_SKIP_MDS_QUERY", "true")
296+
# Prevents missing logs when there is crash.
297+
self._update_env_list(env_list, "PYTHONUNBUFFERED", "1")
296298
# This is required to be able to run a Jax client when using
297299
# IFRT_PROXY_USE_INSECURE_GRPC_CREDENTIALS=true.
298300
# In Jax 0.6.2 and beyond this flag can be renamed to
@@ -953,6 +955,10 @@ def _build_head_container(self) -> dict:
953955
"name": "TEST_UNDECLARED_OUTPUTS_DIR",
954956
"value": "true",
955957
},
958+
{
959+
"name": "PYTHONUNBUFFERED",
960+
"value": "1",
961+
},
956962
],
957963
imagePullPolicy="Always",
958964
resources=resources,

0 commit comments

Comments
 (0)