Commit e3b8870
Switch broken CBM example in README to MIS (#1064)
* Fix CBM example in README; align CBM wire format with schema
The README's `pred create CBM ... | pred solve` example was broken on two
fronts: the bound flag is `--bound-k` (not `--bound`), and the schema-driven
factory rejected the generated JSON because `ConsecutiveBlockMinimization`'s
deserialization required `num_rows`/`num_cols` fields that aren't part of
its declared schema (only `matrix` and `bound` are).
Drop the derived dimensions from the wire format entirely via
`serde(into = ConsecutiveBlockMinimizationDef)` so serialize and deserialize
both use the minimal `{matrix, bound}` form that matches `ProblemSchemaEntry`.
Replace the now-irrelevant inconsistent-dimensions test with one that pins
the minimal wire format and one that exercises ragged-matrix rejection.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* Switch README example to MIS; revert CBM source changes
The previous commit on this branch fixed a CBM serde inconsistency to make
the original `pred create CBM ... --bound-k 2` example run end-to-end. Use
MaximumIndependentSet instead — it works against `main` as-is, and a small
4-vertex path-graph example is more recognizable to readers than CBM's
2x3 boolean matrix. This reverts the CBM model + test changes so this PR
is purely a README fix; the CBM serde alignment can land separately.
Verified: `pred create MIS --graph 0-1,1-2,2-3 --weights 1,1,1,1 |
pred solve - --solver brute-force` returns Max(2) with witness [0,1,0,1].
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>1 parent cbfad84 commit e3b8870
1 file changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
| 35 | + | |
| 36 | + | |
37 | 37 | | |
38 | | - | |
39 | | - | |
| 38 | + | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
0 commit comments