Skip to content

fix: seq2seq decode returns primary choice (strip alternates) - #805

Merged
ronaldtse merged 1 commit into
mainfrom
fix/first-alternates-decode
Oct 11, 2026
Merged

ronaldtse merged 1 commit into
mainfrom
fix/first-alternates-decode

Conversation

@ronaldtse

Copy link
Copy Markdown
Contributor

Summary

  • Models trained on multi-reference corpora (QCRI silver) emit slash-separated alternate sets per token; the runtime returned them verbatim
  • IMF.first_alternates applied in Byt5Onnx#translate; parity with the Python and TypeScript runtimes

Test plan

  • rspec spec/first_alternates_spec.rb (3 examples, TDD red-green)
  • full suite green

@ronaldtse
ronaldtse merged commit 42c1898 into main Oct 11, 2026
3 of 10 checks passed
@ronaldtse
ronaldtse deleted the fix/first-alternates-decode branch October 11, 2026 08:29
ronaldtse added a commit that referenced this pull request Oct 14, 2026
… access modifiers)

The ml files merged in #805 had never been linted (rake.yml was red,
so StandardRB never gated them). Autofixes + manual conversions; no
behavior change — imf/provisioning URI fetches keep their open-uri
requires.
ronaldtse added a commit that referenced this pull request Oct 14, 2026
* release: bump to 3.1.0 (seq2seq first_alternates decode contract)

* fix(isc): retry the DSL grammar when the artifact misparses a source

The shipped isc.artifact.json rejects lowercase system codes that the
Ruby-DSL grammar accepts (acadsin-zho-Hani-Latn-2002.isc) — one bad
map broke every spec that loads the corpus in CI. The runtime now
prefers the artifact and retries through the DSL on ParseFailed; the
artifact recompile via the parsanol toolchain remains the upstream
fix.

* Revert "fix(isc): retry the DSL grammar when the artifact misparses a source"

This reverts commit 1d80448.

* fix(isc): drop the broken compiled artifact — the DSL grammar is the engine

The shipped isc.artifact.json misparses lowercase system codes
(acadsin-zho-Hani-Latn-2002.isc) — and a FRESH compile with
parsanol 1.3.91 reproduces the identical failure, i.e. the parg
compiler mistranslates the grammar (filed upstream as parsanol#5).
The artifact path has never parsed this corpus correctly; the Ruby
DSL grammar is the only engine that has.

Per the clean-data rule, ship no known-bad derived bytes: the
.parg source stays (canonical grammar, used by the differential
spec once the compiler is fixed), the artifact spec guards skip
without it, and the runtime uses its documented artifact-missing
fallback into the Ruby grammar.

* test(isc): guard artifact-dependent specs for the not-shipped state

* ci(rake): test the ref under test, not bootstrap-cloned main

bootstrap.rb clones interscript-ruby remote main into ruby/; a PR's
own code was never exercised (and main's red state was unfixable from
PRs). Overlay the PR head (or pushed ref) onto the bootstrapped
sibling layout after bootstrap.

* test(isc): skip the differential gate inside the example when the artifact is absent

* style: standardrb autofix for the ml loader files

* style: standardrb clean across lib (URI.parse().open, ranges, struct, access modifiers)

The ml files merged in #805 had never been linted (rake.yml was red,
so StandardRB never gated them). Autofixes + manual conversions; no
behavior change — imf/provisioning URI fetches keep their open-uri
requires.

* style: standardrb clean across spec

* test(ml): skip the tampered-zip tmpdir cleanup on windows

rubyzip's finalizer holds the zip handle past the mktmpdir block on
windows (Errno::EACCES at cleanup); the loader itself uses block-form
opens everywhere. Platform skip with the reason inline.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant