Log evaluation to finished run

Hi,
let’s say my training finished and at a later point I want to run an evaluation and log the results to the same wandb run online, how do I initialize wandb based on the local files that were saved during the run?

wandb/
├── debug-internal.log -> run-20230627_161716-62wkrleg/logs/debug-internal.log
├── debug.log -> run-20230627_161716-62wkrleg/logs/debug.log
├── latest-run -> run-20230627_161716-62wkrleg
└── run-20230627_161716-62wkrleg
    ├── files
    │   ├── conda-environment.yaml
    │   ├── config.yaml
    │   ├── output.log
    │   ├── requirements.txt
    │   ├── wandb-metadata.json
    │   └── wandb-summary.json
    ├── logs
    │   ├── debug-internal.log
    │   └── debug.log
    ├── run-62wkrleg.wandb
    └── tmp
        └── code

Hope someone can help

Hi @hermannl thanks for writing in! You can resume to the training run using the run-id (for instance in your case this seems to be 62wkrleg) as follows:
run = wandb.init(entity='your-team-or-username', project='your-project', id='62wkrleg, resume='must')

and then log the evaluation metrics. Would this work for you? Please note when resuming you can’t log metrics in earlier steps than the last one.

1 Like

Great, that solved my problem, thank you!

Glad to hear that @hermannl thanks for confirming! Feel free to reach out to us again here if you had any other questions/issues. Have a great day!

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.