fix: ragas evaluator - column mapping, embeddings param, venv setup - #3
Open
Kos-M wants to merge 3 commits into
Open
fix: ragas evaluator - column mapping, embeddings param, venv setup#3Kos-M wants to merge 3 commits into
Kos-M wants to merge 3 commits into
Conversation
…tion warnings Root cause: litellm 1.88.1 has a bug where the SupportedPromptIntegrations enum is missing ARIZE_PHOENIX but arize/__init__.py tries to access it, causing AttributeError on any import chain touching litellm (e.g., agent.py -> strands -> litellm). Fixes: - Pin litellm==1.85.5 (confirmed working version without the bug) - Update ragas metric imports from ragas.metrics to ragas.metrics.collections to remove deprecation warnings (ragas 0.4.3 API)
litellm==1.85.5 requires: - fastuuid>=0.14.0 (was pinned to 0.13.5) - openai>=2.20.0 (was pinned to 2.2.0) Updated both to minimum compatible versions to resolve ResolutionImpossible errors.
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.
Summary
Fixed the RAGAS evaluator in the acg_protocol project. The root cause was a litellm version incompatibility — version 1.88.1 has a bug where
SupportedPromptIntegrationsenum is missingARIZE_PHOENIXbut the arize module tries to access it, causingAttributeErroron any import chain touching litellm (agent.py → strands → litellm).Also fixed deprecated ragas metric imports.
Changes
Setup
Bug Fixes
requirements.txt:litellm==1.85.5(working version without the ARIZE_PHOENIX enum bug)src/ragas_evaluator.py:ragas.metricstoragas.metrics.collections(ragas 0.4.x API)embeddings=ragas_embeddingstoevaluate()callsrc/evaluation_data.py(previous commit):question→user_input,contexts→retrieved_contexts,answer→responseVerification
user_input,retrieved_contexts,response,referenceall match API requirements