Spaces:
Sleeping
Sleeping
File size: 476 Bytes
d1c9a3c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
import wandb
import json
import os
if os.path.exists("results.json"):
with open('results.json', 'r') as file:
results = json.load(file)
else:
results = {}
api = wandb.Api()
run = api.run('kf_ps/convergence/r6wp7fa8')
df = run.history()
for i in df.index:
results["distributed/optimized-gpt2-250m"]["baseline"][(str(df.loc[i, "step"]))] = [df.loc[i, "train_loss"]]
with open("results.json", "w") as outfile:
json.dump(results, outfile, indent = 4)
|