How to display a table column of a particular epoch of some logged metric?

In the runs table of my project, I can display a table column for all final training losses (loss at epoch 500). Is there any way for me to create a column displaying the training loss at epoch 100 for all models? I would like to do this for runs that have already completed running, I cannot re-run these results.

Thanks!

Hi @linusbao Good day and thank you for reaching out to us! Happy to help you on this.

Unfortunately, we currently do not have a built in feature where we can add a column on the runs table and point it to a specific step. You might want to consider logging a specific metric that records the training loss at step 100, this option should create the column for you once you log the data.

For your existing or completed runs, you can try using our API to get this information. You can try something like this and should give you the data you are looking for. Let me know if this helps!

import wandb

api = wandb.Api()

# Replace 'your_project' and 'your_entity' with your project and entity names

api = wandb.Api()

run = api.run("entity/project/run")

history = run.scan_history(keys=["loss"])

# Assuming 'loss' is logged at each epoch and you want the 100th epoch

epoch_100_loss = next((x["loss"] for i, x in enumerate(history) if i == 99), None)

if epoch_100_loss is not None:

    print(f"Run {run.name} had a loss of {epoch_100_loss} at epoch 100")

Thanks,
Paulo

Hi @linusbao , since we have not heard back from you we are going to close this request. If you would like to re-open the conversation, please let us know!