Adds a Ukrainian argument structure gallery example and supporting core fixes#10
Closed
pkuchmiichuk wants to merge 21 commits into
Closed
Adds a Ukrainian argument structure gallery example and supporting core fixes#10pkuchmiichuk wants to merge 21 commits into
pkuchmiichuk wants to merge 21 commits into
Conversation
…ainian VESUM adapter subclass.
Collaborator
|
Can you pull the core changes into a separate PR from the gallery addition and target the core changes at |
Collaborator
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a Ukrainian argument structure example to the gallery, plus the five
bead/core changes that building it required.Gallery (
gallery/ukr/argument_structure/)An end-to-end 2AFC acceptability pipeline for Ukrainian verb argument structure, following the structure of
gallery/eng/andgallery/kor/(koreanbranch): aMakefile, a localconfig.yaml, and numbered pipeline stages covering lexicon generation, template generation, template filling, 2AFC pair construction, list partitioning, and jsPsych/JATOS deployment.Ukrainian specifics worth noting:
UniMorphAdaptersubclass inutils/vesum_adapter.py.resources/verb_frequencies.csv).build_frequencies.pyregenerates it, but is meant to be run rarely so that the pipeline does not depend on wordfreq at run time.Core changes to
bead/ListConstraintsubclasses now defaultconstraint_typeto their own discriminator value, so constraints no longer have to restate it at construction.bead/lists/constraints.pyListPartitionerwarns once per expression when a constraint property expression cannot be evaluated, and once per type when a constraint type is not enforced during assignment. Previously a misconfigured constraint scored zero every iteration and was silently ignored.bead/lists/partitioner.pydtype="auto"), and the requested dtype is passed fromLanguageModelScorerthrough to the adapter. Loading a half-precision checkpoint as float32 doubled its memory.bead/items/adapters/huggingface.py,bead/items/scoring.pyUniMorphAdaptergained an overridable_load_datasethook so a subclass can read a non-standard file layout.bead/resources/adapters/unimorph.pyAll four core changes are backward compatible. The new parameters are keyword arguments with defaults preserving existing behavior, and the constraint defaults only add a value where one previously had to be supplied.
Type of Change
Checklist
uv run ruff check .anduv run ruff format .uv run pyrightwith no errorsuv run pytest tests/)Testing
Six test files cover the core changes:
tests/lists/test_constraints.pyconstraint_type, and the discriminator still round-trips.tests/lists/test_partitioner.pytests/lists/test_partitioner_batch.pytests/items/adapters/test_huggingface.pydtypetofrom_pretrainedand defaults to"auto".tests/items/test_scoring.pyLanguageModelScorerpasses itsdtypethrough to the adapter.tests/resources/adapters/test_unimorph.py_load_datasetis used in place of the module-level loader.Note on gallery test coverage:
gallery/is excluded from ruff, pyright, andtestpaths, so the Ukrainian pipeline scripts are not covered by CI, matching howgallery/eng/andgallery/kor/(koreanbranch) are currently treated.