Buckets:
| import hashlib,re,unicodedata | |
| def canonical_prompt(text): return re.sub(r'\s+',' ',unicodedata.normalize('NFKC',text)).strip() | |
| def prompt_id(prompt): return hashlib.sha256(canonical_prompt(prompt).encode()).hexdigest()[:24] | |
| def response_id(prompt,response): return hashlib.sha256((prompt_id(prompt)+'\0'+response).encode()).hexdigest()[:24] | |
| def assign_split(pid,official_test): | |
| if pid in official_test: return 'test' | |
| return 'dev' if int(hashlib.sha256(('dev-20260915-'+pid).encode()).hexdigest()[:8],16)%10==0 else 'train' | |
| def assert_disjoint(frame): | |
| assert frame.groupby('prompt_id')['split'].nunique().max()==1 | |
| assert frame.groupby('prompt')['split'].nunique().max()==1 | |
Xet Storage Details
- Size:
- 690 Bytes
- Xet hash:
- 9d65a329317eabfb74643bfd9cf3195c2913a0d3965e49c440601a09d8ab0256
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.