fix: sofai graph coloring example — broken model and incorrect problem #806#807
Merged
planetf1 merged 1 commit intogenerative-computing:mainfrom Apr 10, 2026
Conversation
Contributor
|
The PR description has been updated. Please fill out the template for your PR to be reviewed. |
generative-computing#806) - Replace phi:2.7b (crashes with GGUF sampler assertion) with granite4:micro - Replace qwen3-4b-thinking with granite4:latest (already used elsewhere) - Fix graph/description mismatch: graph dict was a path but description claimed a triangle, making the problem unsolvable with 2 colors - Use odd 5-cycle (A-B-C-D-E-A) with 3 colors — non-trivial enough that granite4:micro consistently fails, properly exercising the SOFAI retry loop and S1→S2 escalation Closes generative-computing#806
2db711b to
1cc4b8c
Compare
Contributor
Author
|
Original example was written by @keerthi166 and then documented by @akihikokuroda - any thoughts on the modification of the test welcome :-) |
jakelorocco
approved these changes
Apr 10, 2026
Contributor
jakelorocco
left a comment
There was a problem hiding this comment.
seems like a reasonable improvement to me
Merged
via the queue into
generative-computing:main
with commit Apr 10, 2026
8860f64
8 checks passed
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.
Fix sofai_graph_coloring example — broken model and incorrect problem (#806)
Type of PR
Description
The
sofai_graph_coloring.pyexample had three problems:Model crash:
phi:2.7btriggers an assertion failure inllama-sampling.cppwith current Ollama versions (incompatible GGUF quant). Replaced with
granite4:micro(S1) and
granite4:latest(S2), both already used by other tests.Inconsistent problem definition: The
graphdict defined a path (A—B—C) butgraph_descriptiondescribed a triangle (A—B—C—A). With only 2 colors, the promptedtriangle is unsolvable — the LLM correctly introduces a third color, which the
validator rejects.
SOFAI loop never exercised: Even with a consistent graph, K₃ + 3 colors is
trivially solved first try, so the retry loop and S1→S2 escalation were never
demonstrated.
Fix: Use an odd 5-cycle (A—B—C—D—E—A) with 3 colors. This is non-trivial enough
that
granite4:microconsistently fails (wraps JSON in markdown, gets adjacency wrong),properly exercising the SOFAI retry loop and S1→S2 escalation. Deterministic with
seed=42, temperature=0.1. Verified passing 3 times standalone.Also removed
phi:2.7bandpielee/qwen3-4b-thinking-2507_q8:latestfrom model listsin CONTRIBUTING.md and sofai README — these were only used by this example.
Testing