Skip to content

Commit 3987ba6

Browse files
committed
Change default user argument defined to prevent USER is not set in the environment
1 parent d14f70d commit 3987ba6

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

benchmarks/maxtext_xpk_runner.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -586,12 +586,13 @@ def generate_xpk_workload_cmd(
586586
cluster_config: XpkClusterConfig,
587587
wl_config: WorkloadConfig,
588588
workload_name=None,
589-
user=os.environ["USER"],
589+
user=None,
590590
temp_key=None,
591591
exp_name=None,
592592
):
593593
"""Generates a command to run a maxtext model on XPK."""
594594

595+
user = user or os.environ.get("USER", "user")
595596
is_pathways_enabled = wl_config.pathways_config is not None
596597
is_pathways_headless_enabled = wl_config.pathways_config and wl_config.pathways_config.headless
597598

@@ -719,7 +720,7 @@ def run_xpk_workload(
719720
def xpk_benchmark_runner(
720721
cluster_config: XpkClusterConfig,
721722
workload_configs: list[WorkloadConfig],
722-
user=os.environ["USER"],
723+
user=None,
723724
disruption_manager: DisruptionManager = DisruptionManager(),
724725
exp_name: str = None,
725726
):
@@ -738,6 +739,7 @@ def xpk_benchmark_runner(
738739
Returns:
739740
The DisruptionManager instance, potentially updated with new workloads.
740741
"""
742+
user = user or os.environ.get("USER", "user")
741743
xpk_workload_names = []
742744
xpk_workload_cmds = []
743745
for wl_config in workload_configs:

0 commit comments

Comments
 (0)