Fix ipython pin breaking Google Colab; update deprecated guardian_check API#93
Draft
planetf1 wants to merge 5 commits into
Draft
Conversation
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>
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.
Problems fixed
1.
ipython>=8.10.0breaks Google Colab (pyproject.toml)Colab pins
ipython==7.34.0. The>=8.10.0constraint upgraded it to 9.x, breaking thegoogle-colabpackage and destabilising the runtime. Fixed: relaxed toipython>=7.0— Colab's version satisfies the floor; fresh local environments still get ipython installed for theIPython.displayimports ingranite_switch.tutorials.2. Deprecated
target_roleinguardian_checkcalls (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: replacedtarget_role="user"→scoring_schema="user_prompt"in bothguardian_checkcalls.3.
torchcodeccrash on some Colab runtime images (rag_101.ipynb,rag_flow.ipynb)vllm upgrades PyTorch to 2.10.0, making Colab's pre-installed
torchcodecincompatible.sentence-transformerstriggers the import, crashing the chroma embedding cell. Fixed: added%pip uninstall -q -y torchcodecto 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/opentelemetryresolver warnings (vllm transitive deps vs Colab'sgradio/google-adk) so users are not alarmed.Testing
hello_mellea.ipynbrag_101.ipynbrag_flow.ipynbhello_adapter.ipynbgranite_switch_with_hf.ipynbcompose_granite_switch.ipynbalora_vs_lora_race.ipynbgranite_speech_demo.ipynb* Not affected by this PR's changes — retesting as an opportunity to revalidate all Colab notebooks.