Skip to main content
App version: 3.4.15

Log from different processes

You can log metadata to the same run from multiple separate processes at once.

Use the custom run ID to access the same run in each process:

Process A
run = Run(
run_id="seagull-123",
)

for step in epoch:
# some training loop
run.log_metrics(
data={"train/loss": 0.14},
step=step,
)
Process B
run = Run(
run_id="seagull-123",
)

for step in epoch:
# some validation loop
run.log_metrics(
data={"val/loss": 0.16},
step=step,
)

In the above example, the two processes are logging metrics separately, to different attribute paths: train/loss and val/loss, respectively.

You can log the same metric across processes, as long as steps aren't logged out of order within the same attribute. For details, see Log metrics: Setting step values.

Calling add_tags() extends the existing tagset with the provided tags.

caution

If you call log_configs() on an existing attribute, the new value overwrites the previous one. For details, see Edit run configs.