Created
July 3, 2022 03:57
-
-
Save hamelsmu/f1989fb35fd5c1f2935dcefe41cbfe64 to your computer and use it in GitHub Desktop.
Get Validation Predictions For Lesson 3 wandb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import wandb | |
import pandas as pd | |
from fastcore.all import Path | |
def val_pred_table(run_id, entity='wandb_course', proj='lemon-project'): | |
"Get prediction table on the validation set for the lemon project." | |
api = wandb.Api() | |
path = api.artifact(f'{entity}/{proj}/run-{run_id}-predictions_table:v0').download() | |
preds = (Path(path)/'predictions_table.table.json').read_json() | |
return pd.DataFrame([{'pred':p, 'label':t} for _,p,_,t in preds['data']]) | |
if __name__ == '__main__': | |
preds = val_pred_table('zxum4ef0') | |
preds.to_excel(Path('Validtation_Predictions.xlsx')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Spreadhseet simulation https://www.dropbox.com/s/apox0e22e8lk9wu/Validtation_Predictions_Simulation.xlsx?dl=0