Skip to content

Commit 64c7e30

Browse files
wangkuiyichanglan
authored andcommitted
Make a call to logging.info for each line of the config debug string
GitOrigin-RevId: 90263d8
1 parent 895c22a commit 64c7e30

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

axlearn/common/launch_trainer.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,7 @@
6464
flags.DEFINE_integer(
6565
"trainer_log_every_n_steps",
6666
None,
67-
"Logging frequency for the loss value during training. "
68-
"If None, defaults to every 100 steps.",
67+
"Logging frequency for the loss value during training. If None, defaults to every 100 steps.",
6968
)
7069
flags.DEFINE_enum(
7170
"device_monitor",
@@ -150,7 +149,9 @@ def get_trainer_config(
150149
def run_trainer(trainer_config: SpmdTrainer.Config) -> Any:
151150
measurement.record_event(measurement.Event.START_JOB)
152151
trainer_config_debug_string = trainer_config.debug_string()
153-
logging.info("Trainer config:\n%s", trainer_config_debug_string)
152+
logging.info("Trainer config:")
153+
for line in trainer_config_debug_string.split("\n"):
154+
logging.info("%s", line)
154155
if jax.process_index() == 0:
155156
trainer_config_file = os.path.join(trainer_config.dir, "trainer_config")
156157
with fs.open(trainer_config_file, "w") as f:

0 commit comments

Comments
 (0)