Adds constraint-type defaults, partitioner warnings, and model dtype passthrough#11
Open
pkuchmiichuk wants to merge 5 commits into
Open
Adds constraint-type defaults, partitioner warnings, and model dtype passthrough#11pkuchmiichuk wants to merge 5 commits into
pkuchmiichuk wants to merge 5 commits into
Conversation
This was referenced Jul 23, 2026
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
ListConstraintsubclasses now defaultconstraint_typeto their own discriminator value, so constraints no longer have to restate it at construction (UniquenessConstraint(property_expression=...)instead of also passingconstraint_type="uniqueness").bead/lists/constraints.pyListPartitionernow warns 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 on every iteration and was silently ignored.bead/lists/partitioner.pydtype="auto"), rather than being forced to float32. Loading a half-precision checkpoint as float32 doubled its memory.bead/items/adapters/huggingface.pyLanguageModelScorerthrough to the adapter.bead/items/scoring.pyAll four are backward compatible. The new
dtypeparameters are keyword arguments defaulting to"auto", 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
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.