Skip to content

xlm.tasks.sudoku_multi_solution

Preprocessing for brozonoyer/sudoku-extreme-multi-solution.

The modeling config (default) stores one puzzle and the full solution set. Blanks are .; grids are 81 characters. Load it as brozonoyer/sudoku-extreme-multi-solution/train (no config segment). Do not point a training manager at the provenance or sweep configs: provenance records which clue was deleted, and sweep is an upstream summary.

solutions is an unordered set stored lexicographically. Preprocess tokenizes every solution into solution_token_ids and does not choose one. There is no on-the-fly selector: a custom collator decides which member is the training target. solutions[0] is only the sorted member, not a canonical target.

single_deletion_filter_fn keeps the covariate-matched backbone (N in {2, 3, 4, 6, 8, 16}). N=1 is redundant_control and is not matched to that backbone. base_rating is a parent covariate and does not describe the derived puzzle.

sudoku_multi_solution_preprocess_fn(example, tokenizer)

Tokenize the puzzle and every solution.

Blanks become the mask id. The returned example has prompt_token_ids, solution_token_ids, and determined_token_ids. It does not set input_token_ids.

sudoku_multi_solution_single_deletion_filter_fn(example)

Keep puzzles made by deleting one clue from a unique parent.

This is the covariate-matched subset for comparisons across N. It excludes redundant_control, composed_n2, and deletion_search.

sudoku_multi_solution_n1_filter_fn(example)

Keep N=1 puzzles.

These are redundant_control items and are not covariate-matched to the single-deletion backbone.

sudoku_multi_solution_n2_filter_fn(example)

Keep puzzles with num_solutions == 2.

sudoku_multi_solution_n3_filter_fn(example)

Keep puzzles with num_solutions == 3.

sudoku_multi_solution_n4_filter_fn(example)

Keep puzzles with num_solutions == 4.

sudoku_multi_solution_n6_filter_fn(example)

Keep puzzles with num_solutions == 6.

sudoku_multi_solution_n8_filter_fn(example)

Keep puzzles with num_solutions == 8.

sudoku_multi_solution_n16_filter_fn(example)

Keep puzzles with num_solutions == 16.