Skip to content

Fix ipython pin breaking Google Colab; update deprecated guardian_check API#93

Draft
planetf1 wants to merge 5 commits into
generative-computing:mainfrom
planetf1:bugfix/tutorials-ipython-colab-conflict
Draft

Fix ipython pin breaking Google Colab; update deprecated guardian_check API#93
planetf1 wants to merge 5 commits into
generative-computing:mainfrom
planetf1:bugfix/tutorials-ipython-colab-conflict

Conversation

@planetf1

@planetf1 planetf1 commented Jun 11, 2026

Copy link
Copy Markdown

Still in progress — validating on Colab and locally. Not ready for merge.

Problems fixed

1. ipython>=8.10.0 breaks Google Colab (pyproject.toml)

Colab pins ipython==7.34.0. The >=8.10.0 constraint upgraded it to 9.x, breaking the google-colab package and destabilising the runtime. Fixed: relaxed to ipython>=7.0 — Colab's version satisfies the floor; fresh local environments still get ipython installed for the IPython.display imports in granite_switch.tutorials.

2. Deprecated target_role in guardian_check calls (hello_mellea.ipynb)

Deprecated in mellea PR #1037 (merged 2026-05-18, landed in mellea==0.6.0 — the version pinned by this project). Fixed: replaced target_role="user"scoring_schema="user_prompt" in both guardian_check calls.

3. torchcodec crash on some Colab runtime images (rag_101.ipynb, rag_flow.ipynb)

vllm upgrades PyTorch to 2.10.0, making Colab's pre-installed torchcodec incompatible. sentence-transformers triggers the import, crashing the chroma embedding cell. Fixed: added %pip uninstall -q -y torchcodec to the install cell in affected notebooks (no-op where torchcodec is absent).

4. Colab resolver warning note (hello_mellea.ipynb)

Added a markdown note explaining the expected starlette/opentelemetry resolver warnings (vllm transitive deps vs Colab's gradio/google-adk) so users are not alarmed.

Testing

Notebook Colab Local Notes
hello_mellea.ipynb ipython + guardian_check fix
rag_101.ipynb torchcodec fix
rag_flow.ipynb torchcodec fix
hello_adapter.ipynb * revalidation only
granite_switch_with_hf.ipynb * revalidation only
compose_granite_switch.ipynb * revalidation only
alora_vs_lora_race.ipynb * revalidation only
granite_speech_demo.ipynb * revalidation only

* Not affected by this PR's changes — retesting as an opportunity to revalidate all Colab notebooks.

planetf1 added 5 commits June 11, 2026 14:50
ipython>=8.10.0 upgraded Colab's tightly-pinned ipython==7.34.0 to 9.x,
breaking the google-colab package and destabilising the runtime. Changed
to ipython>=7.0 — Colab's 7.34.0 satisfies the floor so pip leaves it
untouched, while a fresh local environment still gets ipython installed.

Affects notebooks using [tutorials]: hello_mellea, rag_101, rag_flow.

Signed-off-by: Nigel Jones <jonesn@uk.ibm.com>
mellea PR #1037 (merged 2026-05-18, landed in mellea==0.6.0) deprecated
target_role in favour of scoring_schema. The two guardian_check calls in
the Guardian section were passing target_role="user"; update both to
scoring_schema="user_prompt" (the direct equivalent per mellea's
_TARGET_ROLE_TO_SCHEMA mapping).

Also clears saved cell outputs — notebooks should be committed clean.

Signed-off-by: Nigel Jones <jonesn@uk.ibm.com>
Signed-off-by: Nigel Jones <jonesn@uk.ibm.com>
… conflict

Signed-off-by: Nigel Jones <jonesn@uk.ibm.com>
…h conflict

Signed-off-by: Nigel Jones <jonesn@uk.ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant