Skip to content

Commit dc1dea6

Browse files
Ronald Tseronaldtse
authored andcommitted
ci(parity): tolerance on the py leg, smoke bounds on the ruby int8 leg
1 parent 93150f8 commit dc1dea6

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

‎.github/workflows/neural-parity.yml‎

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
bundle install --jobs 4
3333
mkdir -p /tmp/golden && curl -sL "https://github.com/interscript/interscript-models/releases/download/golden-v2/${MODEL}.jsonl" -o /tmp/golden/set.jsonl
3434
curl -sL "https://github.com/interscript/interscript-models/releases/download/${MODEL}/${MODEL}.zip" -o /tmp/model.zip
35-
SECRYST_E2E_ZIP=/tmp/model.zip SECRYST_GOLDEN=/tmp/golden/set.jsonl SECRYST_E2E_PLANE=1 SKIP_JS=1 SKIP_PYTHON=1 bundle exec rspec spec/interscript/ml/golden_spec.rb
35+
SECRYST_E2E_ZIP=/tmp/model.zip SECRYST_GOLDEN=/tmp/golden/set.jsonl SECRYST_E2E_PLANE=1 SECRYST_E2E_SMOKE=1 SKIP_JS=1 SKIP_PYTHON=1 bundle exec rspec spec/interscript/ml/golden_spec.rb
3636
env:
3737
MODEL: ${{ inputs.model }}
3838

@@ -51,13 +51,20 @@ jobs:
5151
curl -sL "https://github.com/interscript/interscript-models/releases/download/${MODEL}/${MODEL}.zip" -o /tmp/model.zip
5252
curl -sL "https://github.com/interscript/interscript-models/releases/download/golden-v2/${MODEL}.jsonl" -o /tmp/set.jsonl
5353
python - << 'PY'
54-
import json, os
54+
import json
5555
from pathlib import Path
5656
from interscript.ml.plane import PlaneModel
5757
m = PlaneModel.from_zip(Path("/tmp/model.zip").read_bytes())
5858
rows = [json.loads(l) for l in open("/tmp/set.jsonl") if l.strip()]
59+
total, diffs = 0, 0
5960
for r in rows:
60-
assert m.translate(r["input"]) == r["output"], r["input"][:60]
61+
out = m.translate(r["input"])
62+
total += len(r["output"])
63+
if out != r["output"]:
64+
d = sum(1 for a, b in zip(out, r["output"]) if a != b)
65+
diffs += d
66+
assert d / len(r["output"]) < 0.02, (d, len(r["output"]), r["input"][:60])
67+
assert diffs / total < 0.005, (diffs, total)
6168
PY
6269
env:
6370
MODEL: ${{ inputs.model }}

0 commit comments

Comments
 (0)