v3_scale: code banc v4/gen/v3, rapports validés, corpus_v3 (sha256 vérifié), README
519e2ef verified Download v3_scale/code/recount/recheck_v4code_1733.py from thefinalboss/SPIRA: direct link, hf CLI and curl.
- Browser
- Download file 622 Bytes
-
https://huggingface.co/thefinalboss/SPIRA/resolve/main/v3_scale/code/recount/recheck_v4code_1733.py
- Command line
-
hf download hf://thefinalboss/SPIRA/v3_scale/code/recount/recheck_v4code_1733.py
-
curl -L -o recheck_v4code_1733.py https://huggingface.co/thefinalboss/SPIRA/resolve/main/v3_scale/code/recount/recheck_v4code_1733.py
622 Bytes
| import numpy as np, json | |
| B='/workspace/spira_shared/checker/' | |
| out={} | |
| for r in [json.loads(l) for l in open(B+'scale/results_v4.jsonl')]: | |
| w=r['window']; d=np.load(B+'scale/hits_v4/%s__%s.npz'%(r['tag'],w)); iv=d['invocab']; ni=int(iv.sum()) | |
| f=int((d['fused_hit']&iv).sum()); s=int((d['snn_hit']&iv).sum()) | |
| out[r['tag']+'/'+w]=dict(n=len(iv),invocab=ni,fused=f,snn=s,fused_pct=round(100*f/ni,3),snn_pct=round(100*s/ni,3),cov=ni/len(iv), | |
| reported=[r['fused_invocab_pct'],r['snn_invocab_pct'],r['vocab_coverage']]) | |
| json.dump(out,open('recheck_v4code_1733.json','w'),indent=1) | |
| print(json.dumps(out,indent=1)) | |