Spaces:
Build error
Build error
Download benchmark.py from distributed/model_convergence: direct link, hf CLI and curl.
- Browser
- Download file 476 Bytes
-
https://huggingface.co/spaces/distributed/model_convergence/resolve/main/benchmark.py
- Command line
-
hf download hf://spaces/distributed/model_convergence/benchmark.py
-
curl -L -o benchmark.py https://huggingface.co/spaces/distributed/model_convergence/resolve/main/benchmark.py
476 Bytes
| 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) | |