jevbench-de / tools /check_encoding.py
johannhartmann's picture
Release JevBench-DE v1.0.0: 227 German source-linked evaluation tasks (part 2)
ef243c4 verified
Raw History Blame Contribute Delete
909 Bytes
"""Audit the pinned actual Unsloth parser/encoder, without training or truncating data."""
from pathlib import Path
import runpy
import sys
import shutil
ROOT=Path(__file__).resolve().parents[1];WORKSPACE=ROOT.parents[1]
sys.path.insert(0,str(WORKSPACE/'scripts'))
import quality_common
def benchmark_rows(splits=None,data=None):
for row in quality_common.rows(ROOT/'data/benchmark.parquet'):yield 'public_evaluation',row
quality_common.active_rows=benchmark_rows
prefix='jevbench_de_'
sys.argv=['check_training_path.py','--data',str(ROOT),'--report-prefix',prefix]
runpy.run_path(str(WORKSPACE/'scripts/check_training_path.py'),run_name='__main__')
for name in ['training_path.json','training_render_samples.json']:
shutil.copyfile(quality_common.REPORT/(prefix+name),ROOT/'audit'/name)
shutil.copyfile(quality_common.OUT/(prefix+'training_token_lengths.parquet'),ROOT/'audit/token_lengths.parquet')