Skip to content

fix(evaluator): Add langchain-community dep - #178

Merged
anastasia-nesterenko merged 4 commits into
mainfrom
anesterenko/aircore-723-nvbug-ragas-metrics-fail-no-module-named
Jun 4, 2026
Merged

fix(evaluator): Add langchain-community dep#178
anastasia-nesterenko merged 4 commits into
mainfrom
anesterenko/aircore-723-nvbug-ragas-metrics-fail-no-module-named

Conversation

@anastasia-nesterenko

@anastasia-nesterenko anastasia-nesterenko commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes AIRCORE-723 by adding an explicit langchain-community>=0.3.27,<0.4 constraint for evaluator-related installs.

ragas==0.3.5 imports langchain_community.chat_models.vertexai, which is present in langchain-community==0.3.27 but removed in 0.4.x. PyPI installs were resolving langchain-community==0.4.2, causing RAGAS metrics to fail before scoring.

Changes

  • Add langchain-community>=0.3.27,<0.4 to services/evaluator.
  • Add the same constraint to the generated nemo-platform[evaluator-service] metadata.
  • Update uv.lock with only the minimal dependency metadata needed for the new constraint.

Validation

  • Verified the original import failure no longer reproduces:

    ragas 0.3.5
    langchain-community 0.3.27
    ragas load ok
    

Built the local nemo-platform wheel and confirmed PyPI metadata now includes:

Requires-Dist: langchain-community<0.4,>=0.3.27; extra == 'all'
Requires-Dist: langchain-community<0.4,>=0.3.27; extra == 'evaluator-service'
Requires-Dist: langchain-community<0.4,>=0.3.27; extra == 'services'

Ran:

uv lock --check
uv run --frozen pytest packages/nemo_evaluator_sdk/tests/metrics/ragas/test_git_patch.py -q

Summary by CodeRabbit

Chores

  • Added the langchain-community library (constrained to >=0.3.27, <0.4) to the evaluator service's runtime dependencies.
  • Included langchain-community (>=0.3.27, <0.4) in the platform's evaluator-service optional dependency set to align dependency constraints.

@coderabbitai

coderabbitai Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 136fbd08-9833-47ed-af9e-4c125b619926

📥 Commits

Reviewing files that changed from the base of the PR and between cc9d433 and 40fdf5a.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (2)
  • packages/nemo_platform/pyproject.toml
  • services/evaluator/pyproject.toml
🚧 Files skipped from review as they are similar to previous changes (2)
  • packages/nemo_platform/pyproject.toml
  • services/evaluator/pyproject.toml

📝 Walkthrough

Walkthrough

langchain-community>=0.3.27,<0.4 is added as a runtime dependency in the evaluator service and as an optional dependency in the nemo-platform package, aligning dependency declarations across both projects.

Changes

langchain-community dependency update

Layer / File(s) Summary
Add langchain-community dependency
packages/nemo_platform/pyproject.toml, services/evaluator/pyproject.toml
langchain-community>=0.3.27,<0.4 is added to evaluator service runtime dependencies and nemo-platform evaluator-service optional dependencies.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed Title accurately summarizes the main change: adding langchain-community dependency to the evaluator service to fix a module import failure.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch anesterenko/aircore-723-nvbug-ragas-metrics-fail-no-module-named

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor
Suite Lines Covered Line Rate Branch Rate
Unit Tests 18711/24749 75.6% 62.1%
Integration Tests 11989/23513 51.0% 26.1%

Signed-off-by: anastasia-nesterenko <anastasia@gretel.ai>
@anastasia-nesterenko
anastasia-nesterenko force-pushed the anesterenko/aircore-723-nvbug-ragas-metrics-fail-no-module-named branch from cc9d433 to d3ce7b8 Compare June 4, 2026 17:40
@anastasia-nesterenko
anastasia-nesterenko added this pull request to the merge queue Jun 4, 2026
Merged via the queue into main with commit 0b1cbcb Jun 4, 2026
32 checks passed
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.

2 participants