Comments (6)
Hi @liuyixin-louis! Thank you for writing in!
Could you please send me the workspace of the runs you are trying to pull up using the API? What field are you searching by? Could you also send the toy script of you using the api?
from wandb.
Hi, thanks for your reply; yes, I can share it; I masked some fields for privacy, but the structure is the same. So for me i find it can pull the right results after waiting for a while, ~10 min i remembered. The code mainly try to get the mean of some runs that have the same certain config.
dataset_name="XXX"
runs = api.runs("XXX", {"State": "finished",'config.dataset_name':dataset_name, "config.exp_name": "XXX"})
prompt2scoredict_dict = {}
import os
import numpy as np
import pickle as pkl
def all_reduce_metrics(runs, value =False):
for run in runs:
if 'restult_artifact_name' not in run.summary:
continue
art_name= run.summary['restult_artifact_name']
artifact = api.artifact(f'XXX'+art_name+":latest")
if not os.path.exists(artifact.file()):
artifact.download()
# file = None
with open(artifact.file(), 'rb') as f:
file = pkl.load(f)
prompt2scoredict_dict[run.config['instance_name']] = file['propmt2score']
reducer = {}
for instance in prompt2scoredict_dict:
for prompt in prompt2scoredict_dict[instance]:
for metric in prompt2scoredict_dict[instance][prompt]:
if metric not in reducer:
reducer[metric] = []
reducer[metric]+=prompt2scoredict_dict[instance][prompt][metric]
print(f'all reduce over {len(prompt2scoredict_dict)} instances')
if value:
return {k: np.mean(v) for k,v in reducer.items()}
return reducer
metrics = [
'M1',
'M2'
]
def reduce_over_one_variable(runs, control = 'note', metric_subset=None):
runs_note_unique_list = list(set([run.config[control] for run in runs]))
res_over_control = {k:{} for k in runs_note_unique_list}
runs_over_control = {k:[] for k in runs_note_unique_list}
for run in runs:
runs_over_control[run.config[control]].append(run)
for k in runs_note_unique_list:
print(k)
res_over_control[k] = all_reduce_metrics(runs_over_control[k], value = True)
if metric_subset is not None:
return {
k: {metric: res_over_control[k][metric] for metric in metric_subset} for k in res_over_control
}
reduce_over_one_variable(runs, control='note', metric_subset=metrics)
from wandb.
Thank you so much for sending it over @liuyixin-louis! That is very much appreciated and I will take a look.
How many runs per project do you currently have? Would you be able to share the workspace with me? It is strange that it takes a while to update. Are you running sweeps or regular wandb runs?
Also what version of wandb are you using?
from wandb.
@ArtsiomWB Thank you for your response. My current run number for this project is 3647. and yes i can share the workspace (code and wandb log), can you give me your wandb account or email? I was not using any sweeps feature i think it's just regular wandb runs. My wandb version is 0.16.6.
from wandb.
Related Issues (20)
- [Q] someone please suggest me why i am facing this warning HOT 2
- [Q] Is it possible to get the datapoints used to create the GPU power usage graph HOT 2
- [Q] I can't create academic organization HOT 10
- AttributeError: module 'wandb.proto.wandb_internal_pb2' has no attribute 'Result' HOT 8
- [CLI]: Replace deprecated appdirs with platformdirs HOT 2
- [Feature]: Allow logging artifact without creating new versions HOT 4
- [App]: wandb.plot.histogram results in incorrect histogram HOT 2
- [CLI]: GPUs Hanging when distributed training caused by `wandb.watch` HOT 3
- [App]: No Selected Runs have Saved Code HOT 3
- [CLI]: Wandb agent fails with no log HOT 2
- [Feature]: Selection slider for parallel coordinates HOT 6
- Got ChkStopThr and IntMsgThr after the training finished HOT 6
- [App]: hardware logging in multi-node setting HOT 6
- [Q] Why does Wandb revert to a single dot at the end of training? HOT 5
- [Q] How to import runs from MLflow HOT 4
- [Q] Changing Team Type from Work to Academic HOT 9
- [App]: run.config does not scrape anything
- [App]: Unable to see any graph HOT 3
- [Q] Logging Pytorch Images with wandb.Table() HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wandb.