Skip to content

fix: remove granite 3 vision from warmup pin - #1392

Closed
AngeloDanducci wants to merge 1 commit into
generative-computing:mainfrom
AngeloDanducci:ad-1388
Closed

AngeloDanducci wants to merge 1 commit into
generative-computing:mainfrom
AngeloDanducci:ad-1388

Conversation

@AngeloDanducci

@AngeloDanducci AngeloDanducci commented Jul 14, 2026 •

Copy link
Copy Markdown
Contributor

Pull Request

Issue

Originally was for #1388 but after further investigation this is not currently contributing to that.

Description

test/conftest.py — dropped granite3.2-vision from both the warmup-pin list and the evict list (each now ["granite4.1:3b"]), with breadcrumb comments explaining the removal and instructing that reactivation (per #1187) must pin the vision model sequentially (evict granite4 first), not in parallel. Verified the file still parses. Currently this is unused, and was never actually called via the quality CI check as --group-by-backend was never passed.

Where granite3.2-vision is referenced, and why none of it runs in CI

Currently pinned in CI: test/conftest.py warms & pins granite3.2-vision with keep_alive=-1 in the Ollama-group warmup (pytest_runtest_setup, ~L598) and evicts it in the matching teardown (~L624). This was the only thing keeping the model resident in CI and it's not run in the quality check.

Reference CI-collected? Reason it's not collected / not run in CI
test/conftest.py (warmup pin, ~L598 + evict ~L624) N/A (fixture) This is the pin. Warms/pins the model for the whole Ollama group even though nothing collected in CI uses it. Now removed.
test/backends/test_vision_ollama.py (live e2e) Collected Hard-skip: availability probe hits /api/tags, and granite-vision-4.1 is not in the Ollama library (all name variants 404). Reactivation gated on #1187.
test/backends/test_vision_openai.py Collected Uses granite3.2-vision only in the gh_run != 1 (local) branch; under gh_run == 1 (CI) it points at granite4.1:3b. So CI never touches the vision model.
docs/examples/image_text_models/vision_ollama_chat.py No Has # pytest: ollama, e2e, but the quality CI job runs pytest ... test — an explicit path that overrides testpaths = ["test","docs"], so docs/ is never collected in CI.
docs/examples/image_text_models/vision_litellm_backend.py No Same as above (docs/ not collected by the pytest ... test invocation).
docs/examples/m_serve/m_serve_example_multimodal_image.py No Same as above.
docs/examples/image_text_models/README.md No Docs prose; no # pytest: marker, so never collected anywhere.
docs/docs/how-to/use-images-and-vision.md No Docs prose; no # pytest: marker.
docs/versioned_docs/version-0.7.0/how-to/use-images-and-vision.md No Versioned docs snapshot; not collected.

Net: every CI-collected test that touches vision either self-skips (no Ollama vision model) or uses granite4.1:3b under CI. The doc examples that reference the vision model are not collected by CI at all.

I have added a comment to the issue for activating granite-vision-4.1 when available on ollama to avoid the dual model resource constraint we appear to be running into when re adding the vision tests in CI (that are currently skipped anyway awaiting granite-vision-4.1).

Testing

  • Tests added to the respective file if code was changed
  • New code has 100% coverage if code was added
  • Ensure existing tests and github automation passes (a maintainer will kick off the github automation when the rest of the PR is populated)

Attribution

  • AI coding assistants used

Adding a new component, requirement, sampling strategy, or tool?

If your PR adds or modifies one of the types below, check the matching box. A checklist of type-specific review items will be posted as a comment.

  • Component
  • Requirement
  • Sampling Strategy
  • Tool

NOTE: Please ensure you have an issue that has been acknowledged by a core contributor and routed you to open a pull request against this repository. Otherwise, please open an issue before continuing with this pull request.

@ajbozarth ajbozarth left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the change looks ok, but it seems like the AI decided to pontificate in the comments

@AngeloDanducci

AngeloDanducci commented Jul 14, 2026 •

Copy link
Copy Markdown
Contributor Author

I was extra verbose in asking to show the work on why the existing pin should be removed and what would be needed to avoid this in the future (main problem seems to stem from having two models warmed and pinned simultaneously - and I know vision is large).

Possible that this isn't sufficient and the parallel async calls end up causing the same resource problem anyway but in the interim this has potential to alleviate the issue I think.

@ajbozarth ajbozarth left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some feedback from Claude:

The diff is clean and correct as cleanup — both lists updated symmetrically, comments clear, and the audit table checks out (ollama vision e2e self-skips, openai vision uses granite4.1:3b under gh_run==1, docs examples aren't collected by pytest ... test).

One question on the framing / the bug label: I don't think the vision pin was ever resident in the quality job, so I'm not sure this fixes #1388.

  • The quality workflow only pulls granite4.1:3b (quality.yml:100-106) — granite3.2-vision is never pulled in CI (only run_tests_with_ollama_and_vllm.sh pulls it, and that script isn't wired into any GH Actions workflow).
  • The warmup does POST /api/generate, which does not auto-pull a missing model — it returns a ResponseError that the except swallows as a warning. So in CI the vision warmup was a silent no-op consuming zero resident memory.

If that's right, this is safe/correct cleanup but won't reduce memory pressure — the actual segfault fixes are the ones #1388 lists (treat ResponseError/HTTP 500 as server-death, OLLAMA_MAX_LOADED_MODELS=1, pin the installer). Worth grepping a recent CI log for Warmed up and pinned: granite3.2-vision vs Warmup failed for granite3.2-vision to confirm which happened. If it was always "Warmup failed," suggest reframing as "remove dead vision pin" and leaving #1388 open for the memory-pressure fixes.

@AngeloDanducci

AngeloDanducci commented Jul 14, 2026 •

Copy link
Copy Markdown
Contributor Author

Hmm double checked and I think the claude feedback is correct.

--group-by-backend, never gets called, I just verified conftest.py was used by the quality CI job.

Probably still worth adding the cleanup but this is a noop on #1388 now.

Removed fixes, updated top PR comment as well as the comment on the followup vision CI issue.

@ajbozarth

Copy link
Copy Markdown
Member

--group-by-backend, never gets called

yeah that is used by test/scripts/run_tests_with_ollama_and_vllm.sh in our nightlies only

@AngeloDanducci
AngeloDanducci deleted the ad-1388 branch July 14, 2026 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants