v3_scale: recomptes réf M7 old (seen/fresh_code/fresh_en/fresh_fr)
Browse files
v3_scale/recount/recount_m7old_fresh_2307.json
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"cm_old_local_v1__old_local_v1__fresh_en.npz": {
|
| 3 |
+
"keys": {
|
| 4 |
+
"fused_hit": "((8000,), 'bool')",
|
| 5 |
+
"snn_hit": "((8000,), 'bool')",
|
| 6 |
+
"hier_hit": "((8000,), 'bool')",
|
| 7 |
+
"am_hit": "((8000,), 'bool')",
|
| 8 |
+
"invocab": "((8000,), 'bool')"
|
| 9 |
+
},
|
| 10 |
+
"means": {
|
| 11 |
+
"fused_hit": 0.0325,
|
| 12 |
+
"snn_hit": 0.03275,
|
| 13 |
+
"hier_hit": 0.031375,
|
| 14 |
+
"am_hit": 0.00275,
|
| 15 |
+
"invocab": 0.71425
|
| 16 |
+
}
|
| 17 |
+
},
|
| 18 |
+
"cm_old_local_v1__old_local_v1__fresh_fr.npz": {
|
| 19 |
+
"keys": {
|
| 20 |
+
"fused_hit": "((8000,), 'bool')",
|
| 21 |
+
"snn_hit": "((8000,), 'bool')",
|
| 22 |
+
"hier_hit": "((8000,), 'bool')",
|
| 23 |
+
"am_hit": "((8000,), 'bool')",
|
| 24 |
+
"invocab": "((8000,), 'bool')"
|
| 25 |
+
},
|
| 26 |
+
"means": {
|
| 27 |
+
"fused_hit": 0.00075,
|
| 28 |
+
"snn_hit": 0.000875,
|
| 29 |
+
"hier_hit": 0.00075,
|
| 30 |
+
"am_hit": 0.0,
|
| 31 |
+
"invocab": 0.397375
|
| 32 |
+
}
|
| 33 |
+
},
|
| 34 |
+
"declared": [
|
| 35 |
+
{
|
| 36 |
+
"window": "seen",
|
| 37 |
+
"config": null,
|
| 38 |
+
"snn_acc": 0.216,
|
| 39 |
+
"hier_acc": 0.193875,
|
| 40 |
+
"am_acc": 0.979625,
|
| 41 |
+
"fused_acc": 0.980625,
|
| 42 |
+
"n_positions": 8000
|
| 43 |
+
},
|
| 44 |
+
{
|
| 45 |
+
"window": "seen",
|
| 46 |
+
"config": "snn_alone",
|
| 47 |
+
"snn_acc": 0.216,
|
| 48 |
+
"hier_acc": 0.193875,
|
| 49 |
+
"am_acc": 0.979625,
|
| 50 |
+
"fused_acc": 0.980625,
|
| 51 |
+
"n_positions": 8000
|
| 52 |
+
},
|
| 53 |
+
{
|
| 54 |
+
"window": "freshcode",
|
| 55 |
+
"config": null,
|
| 56 |
+
"snn_acc": 0.272875,
|
| 57 |
+
"hier_acc": 0.26775,
|
| 58 |
+
"am_acc": 0.497125,
|
| 59 |
+
"fused_acc": 0.558125,
|
| 60 |
+
"n_positions": 8000
|
| 61 |
+
},
|
| 62 |
+
{
|
| 63 |
+
"window": "freshcode",
|
| 64 |
+
"config": "snn_alone",
|
| 65 |
+
"snn_acc": 0.272875,
|
| 66 |
+
"hier_acc": 0.26775,
|
| 67 |
+
"am_acc": 0.497125,
|
| 68 |
+
"fused_acc": 0.558125,
|
| 69 |
+
"n_positions": 8000
|
| 70 |
+
},
|
| 71 |
+
{
|
| 72 |
+
"window": "fresh_en",
|
| 73 |
+
"config": null,
|
| 74 |
+
"snn_acc": 0.03275,
|
| 75 |
+
"hier_acc": 0.031375,
|
| 76 |
+
"am_acc": 0.00275,
|
| 77 |
+
"fused_acc": 0.0325,
|
| 78 |
+
"n_positions": 8000
|
| 79 |
+
},
|
| 80 |
+
{
|
| 81 |
+
"window": "fresh_en",
|
| 82 |
+
"config": "snn_alone",
|
| 83 |
+
"snn_acc": 0.03275,
|
| 84 |
+
"hier_acc": 0.031375,
|
| 85 |
+
"am_acc": 0.00275,
|
| 86 |
+
"fused_acc": 0.0325,
|
| 87 |
+
"n_positions": 8000
|
| 88 |
+
},
|
| 89 |
+
{
|
| 90 |
+
"window": "fresh_fr",
|
| 91 |
+
"config": null,
|
| 92 |
+
"snn_acc": 0.000875,
|
| 93 |
+
"hier_acc": 0.00075,
|
| 94 |
+
"am_acc": 0.0,
|
| 95 |
+
"fused_acc": 0.00075,
|
| 96 |
+
"n_positions": 8000
|
| 97 |
+
},
|
| 98 |
+
{
|
| 99 |
+
"window": "fresh_fr",
|
| 100 |
+
"config": "snn_alone",
|
| 101 |
+
"snn_acc": 0.000875,
|
| 102 |
+
"hier_acc": 0.00075,
|
| 103 |
+
"am_acc": 0.0,
|
| 104 |
+
"fused_acc": 0.00075,
|
| 105 |
+
"n_positions": 8000
|
| 106 |
+
}
|
| 107 |
+
]
|
| 108 |
+
}
|
v3_scale/recount/recount_m7old_fresh_2307.py
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import numpy as np, json, glob
|
| 2 |
+
rows=[json.loads(l) for l in open('/workspace/spira_shared/checker/m8/results_m8.jsonl') if l.strip()]
|
| 3 |
+
out={}
|
| 4 |
+
for f in sorted(glob.glob('/workspace/spira_shared/checker/m8/hits/cm_old_local_v1__*fresh_*.npz')):
|
| 5 |
+
z=np.load(f); d={k:(z[k].shape,str(z[k].dtype)) for k in z.files}
|
| 6 |
+
r={}
|
| 7 |
+
for k in z.files:
|
| 8 |
+
a=z[k]
|
| 9 |
+
if a.dtype==bool or (a.ndim==1 and a.size==8000 and set(np.unique(a)).issubset({0,1})):
|
| 10 |
+
r[k]=float(a.mean())
|
| 11 |
+
out[f.split('/')[-1]]={'keys':{k:str(v) for k,v in d.items()},'means':r}
|
| 12 |
+
for r in rows:
|
| 13 |
+
if r.get('tag')=='cm_old_local_v1':
|
| 14 |
+
out.setdefault('declared',[]).append({k:r.get(k) for k in ['window','config','snn_acc','hier_acc','am_acc','fused_acc','n_positions']})
|
| 15 |
+
print(json.dumps(out,indent=1))
|
v3_scale/recount/recount_m7old_ref_2300.py
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import numpy as np, json, glob
|
| 2 |
+
rows=[json.loads(l) for l in open('/workspace/spira_shared/checker/m8/results_m8.jsonl') if l.strip()]
|
| 3 |
+
out={}
|
| 4 |
+
for f in sorted(glob.glob('/workspace/spira_shared/checker/m8/hits/cm_old_local_v1__*.npz')):
|
| 5 |
+
z=np.load(f); d={k:(z[k].shape,str(z[k].dtype)) for k in z.files}
|
| 6 |
+
r={}
|
| 7 |
+
for k in z.files:
|
| 8 |
+
a=z[k]
|
| 9 |
+
if a.dtype==bool or (a.ndim==1 and a.size==8000 and set(np.unique(a)).issubset({0,1})):
|
| 10 |
+
r[k]=float(a.mean())
|
| 11 |
+
out[f.split('/')[-1]]={'keys':{k:str(v) for k,v in d.items()},'means':r}
|
| 12 |
+
for r in rows:
|
| 13 |
+
if r.get('tag')=='cm_old_local_v1':
|
| 14 |
+
out.setdefault('declared',[]).append({k:r.get(k) for k in ['window','config','snn_acc','hier_acc','am_acc','fused_acc','n_positions']})
|
| 15 |
+
print(json.dumps(out,indent=1))
|