Repository navigation
revert: restore evaluators for 0.14 - #131
Merged
Merged
Conversation
Merged
…uator exists genkit-google-genai allows genkit<2 and imported genkit.evaluator at module load. A later genkit release removes that module, so `pip install -U genkit` would break `from genkit_google_genai import VertexAI` for every Google AI and Vertex AI user, with or without genkit-evaluators installed. Catch only ModuleNotFoundError(name='genkit.evaluator'), skip Vertex AI evaluator registration, and have _resolve_evaluator return None. Any other import error, including a missing name inside an existing genkit.evaluator, still propagates.
pavelgj
approved these changes
Nov 17, 2026
This was referenced Nov 18, 2026
This was referenced Nov 30, 2026
Merged
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.
Restores evaluators for
0.14, warns at runtime that they will be removed next release, capsgenkit-evaluatorsat<0.15, and makes the Vertex AI evaluator import ingenkit-google-genaioptional. Combined with the removal plan below, CI/CD pipelines that rebuild and redeploy Genkit apps keep working when evaluators are removed in0.15or1.0(the sole exception is pinninggenkit-google-genai==0.13.0with unpinnedgenkit).Changes
0.14. Reverts feat(py)!: remove evaluators from 1.0 #37 (b7330db86) and4397bd409sogenkit.evaluator,genkit-evaluators, and the Vertex AI evaluators ship in0.14, keeping every0.13 → 0.14upgrade path intact.define_evaluator,define_batch_evaluator,evaluate,register_genkit_evaluators, and direct evaluator action runs emit aFutureWarning(Genkit evaluators are deprecated in 0.14 and will be removed in the next release.) attributed to the caller's line. UsesFutureWarningbecause Python hides non-__main__DeprecationWarnings by default (PEP 565). Importinggenkit.evaluatoror initializingVertexAIstays silent so model and embedder users see nothing.genkit-evaluatorsat the next minor (<0.(Y+1)).bin/bump_versionandscripts/check_consistency.pywritegenkit>=0.14.0,<0.15(andgenkit[evaluators]pullsgenkit-evaluators>=0.14.0,<0.15) instead of<1, holding evaluator resolves on0.14whether removal happens in0.15or1.0.genkit-google-genaievaluator import optional.genkit-google-genaiallowsgenkit<2, and published0.14wheels can't be patched later. Skipping Vertex evaluator registration only onModuleNotFoundErrorwithe.name == 'genkit.evaluator'(while still raising any other import error) lets model and embedder users upgradegenkitpast0.14without cappinggenkit-google-genai.Follow-up removal plan
genkit-evaluators0.9.0–0.12.0are yanked on PyPI.0.9.0was the first release under thegenkit-evaluatorsname (before that it wasgenkit-plugin-evaluators).0.9.0–0.12.0all declared a bareRequires-Dist: genkitand already broke on0.13+because of private imports. Yank reason:Incompatible with genkit>=0.13.0; upgrade to genkit-evaluators>=0.13.0 or pin genkit-evaluators==<version>.0.13.0stays live until0.14.0ships, so fresh installs still have a version to resolve to.0.14.0(this PR + regenerated chore: release v0.14.0 #130), then immediately yankgenkit-evaluators0.13.0.0.14.0release notes warn: "genkit-evaluators 0.14 is the last line and requires genkit<0.15. Uninstall it before upgrading past 0.14."0.13.0caps atgenkit<1, which blocks1.0on its own but allows0.15— yanking0.13.0once0.14.0is live leaves0.14.0(<0.15) as the sole non-yanked release, souvand Poetry treat0.15and1.0identically instead of backtracking ontogenkit 0.15 + genkit-evaluators 0.13.0if1.0slips.0.15or1.0) with two safeguards:genkit.evaluatorstub: raisesModuleNotFoundError(..., name='genkit.evaluator')with fix instructions (see snippet below).genkit-google-genai0.14skips Vertex evaluators only on that exact error.evaluatorsextra: keepevaluators = ["genkit-evaluators>=0.14.0,<0.15"]inpackages/genkit/pyproject.tomlsogenkit[evaluators]resolves to0.14instead of installing post-0.14genkitwith no evaluator package. Exemptgenkit-evaluatorsin bothscripts/check_consistency.pyandbin/bump_versionsobump_version 0.15.0's0.xsed rule doesn't roll the frozen bound to>=0.15.0,<0.16.pip install -U genkit genkit-google-genai, note thatgenkit-evaluatorsholds resolves on0.14until uninstalled, and tell anyone pinninggenkit-google-genai<0.14to bump it.What happens to user environments
Tested against
pip26.3,uv0.9.18, and Poetry 2.5.1 in fresh venvs using a local PEP 503 mirror serving real0.9–0.13PyPI wheels,0.14from this branch, and a post-removal release (1.0.0, with the stub and frozen extra) built frommain:Apps without evaluators
genkit==0.9.0–0.13.0, orgenkit-google-genai>=0.14.0: unaffected bygenkit-evaluatorsyanks (genkititself is never yanked), and unpinned/>=0.14.0apps upgrade cleanly to0.15/1.0.genkit-google-genai==0.13.0+ unpinnedgenkit: the one deploy that fails at startup after removal (0.13.0is already published, allowsgenkit<2, and unconditionally importsgenkit.evaluator). The stub turns the crash into an actionable message; bump the genai pin to>=0.14.0:Apps with evaluators
pip install -r,uv pip install -r, loosepyproject.tomlfloors,genkit[evaluators]): resolve to0.14.0regardless of package order, and the app keeps working. Dropgenkit-evaluatorswhen ready to upgrade past0.14.==pins on both packages (genkit==0.9.0+genkit-evaluators==0.9.0, etc.): unchanged (==bypasses PEP 592 yanks, and yanked wheels remain on PyPI).uv.lock,poetry.lock):uv sync --frozen/--lockedandpoetry installinstall locked versions as-is (even if yanked later). Full lock upgrades (uv lock --upgrade,poetry update) hold on0.14.0, and explicit upgrades (uv add genkit==1.0.0/0.15.0) fail fast at solve time. (One0.15edge case: a single-package--upgrade-package genkitbump on a stale lock still holdinggenkit-evaluators==0.13.0passes the solver because PEP 592 yanks don't evict locked entries and0.13.0allowsgenkit<1; CI catches it on import via the stub.)pip install genkit genkit-evaluators,uv add ...): resolves to0.14.0, runs, and printsFutureWarning: Genkit evaluators are deprecated in 0.14 and will be removed in the next release.at their call site.0.14, then addinggenkit-evaluators:uv addandpoetry addfail before installing;pip install genkit-evaluatorsdowngradesgenkitto0.14.0and reports the conflict withgenkit-google-genai.pip install -U genkitin an existing venv or notebook:pipwarns that installedgenkit-evaluators 0.14.0requiresgenkit<0.15but installs the newgenkitanyway; running the app surfaces the stub message.0.14(genkit==0.9.0–0.13.0+ unpinnedgenkit-evaluators, orgenkit[evaluators]==0.10.0–0.12.0):0.9.0–0.12.0are now yanked, and0.13.0will be yanked after0.14.0ships, so these setups have to pin the matching version explicitly:genkit-evaluators==<version>.==bypasses PEP 592 yanks.genkit0.10–0.12declared an unpinnedgenkit-evaluatorsin its[evaluators]extra.genkit0.9.0had no[evaluators]extra.Merge order
bin/bump_version 0.14.0. chore: release v0.14.0 #130 (chore: release v0.14.0) was generated before evaluators were restored, so it currently omitspackages/genkit-evaluatorsand theevaluatorsextra.publish_python.ymlusesskip-existing: trueand would silently skipgenkit-evaluatorsat0.13.0if chore: release v0.14.0 #130 merged as-is.