My runs log system metrics in terms of CPU, GPU, memory, etc. Now I would like to retrieve this data from the wandb API as a full history.
So far I could find the following from the code:
api = wandb.Api()
run = api.runs(f’{entity}/{project}/({id}')
run.systemMetrics
Hi @janousy thanks for writing in and taking the time to post how you’ve solved this issue. Under the hood stream will be currently either default or events (relevant code in our repo). Therefore, for any future changes it would be best to use it as in our example in Docs - copied below:
import wandb
api = wandb.Api()
run = api.run("<entity>/<project>/<run_id>")
system_metrics = run.history(stream="events")
system_metrics.to_csv("sys_metrics.csv")
I hope this helps! We will close this ticket on our end as this is resolved for you, but feel free to reopen the conversation if you had any other questions.