Skip to content

[LEADS-489] Ragas metric crash when agent disabled/using cache#279

Merged
asamal4 merged 1 commit into
lightspeed-core:mainfrom
xmican10:LEADS-489-ragas-crash-w-api-disabled
Jul 6, 2026
Merged

[LEADS-489] Ragas metric crash when agent disabled/using cache#279
asamal4 merged 1 commit into
lightspeed-core:mainfrom
xmican10:LEADS-489-ragas-crash-w-api-disabled

Conversation

@xmican10

@xmican10 xmican10 commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Description

instructor 1.15.x has a race condition in ModeRegistry.get_handlers().

  • when agents are enabled, each thread makes an HTTP API call first before reaching metric evaluation, which naturally staggers their timing so one thread warms the registry before the others arrive
  • with agents disabled, all threads race straight to ragas metrics with no such staggering

Type of change

  • Refactor
  • New feature
  • Bug fix
  • CVE fix
  • Optimization
  • Documentation Update
  • Configuration Update
  • Bump-up service version
  • Bump-up dependent library
  • Bump-up library or tool used for development (does not change the final image)
  • CI configuration change
  • Unit tests improvement

Tools used to create PR

Identify any AI code assistants used in this PR (for transparency and review context)

  • Assisted-by: (e.g., Claude, CodeRabbit, Ollama, etc., N/A if not used)
  • Generated by: (e.g., tool name and version; N/A if not used)

Related Tickets & Documents

  • Related Issue #
  • Closes #

Checklist before requesting a review

  • I have performed a self-review of my code.
  • PR has passed all pre-merge test jobs.
  • If it is a core feature, I have added thorough tests.

Testing

  • Please provide detailed steps to perform tests related to this code change.
  • How were the fix/results from this change verified? Please provide relevant screenshots or results.

Summary by CodeRabbit

  • Chores
    • Updated and regenerated dependency pins across environment and export files to keep packages current.
    • Added a targeted dependency constraint to address a known upstream issue by temporarily using a safer version range.
    • Refreshed multiple versions (including OpenAI, OpenTelemetry, protobuf, and other utilities) and updated provenance/comment formatting in the generated requirements files.

@xmican10
xmican10 requested review from asamal4 and bsatapat-jpg and removed request for bsatapat-jpg July 3, 2026 11:42
@coderabbitai

coderabbitai Bot commented Jul 3, 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: Pro

Run ID: 56143a8f-318b-4bb8-a92f-38eeb0e0efdf

📥 Commits

Reviewing files that changed from the base of the PR and between 7747a5a and faffeb9.

⛔ Files ignored due to path filters (2)
  • uv-gpu.lock is excluded by !**/*.lock
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (5)
  • pyproject.toml
  • requirements-all-extras.txt
  • requirements-local-embeddings.txt
  • requirements-nlp-metrics.txt
  • requirements.txt
✅ Files skipped from review due to trivial changes (2)
  • requirements-all-extras.txt
  • requirements-local-embeddings.txt
🚧 Files skipped from review as they are similar to previous changes (1)
  • pyproject.toml

Walkthrough

This PR adds an instructor<1.15.0 constraint to pyproject.toml and regenerates four requirements lockfiles with updated dependency pins and provenance comments.

Changes

Dependency version updates

Layer / File(s) Summary
Add instructor version constraint
pyproject.toml
Adds instructor<1.15.0 to project dependencies.
Update instructor and jiter pins
requirements.txt, requirements-all-extras.txt, requirements-local-embeddings.txt, requirements-nlp-metrics.txt
Updates instructor and jiter pins across the regenerated lockfiles.
Regenerate the remaining dependency pins
requirements*.txt
Updates the other pinned dependencies and rewraps or adjusts several # via ... provenance comment blocks.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: bsatapat-jpg

🚥 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 The title clearly matches the bug fix: it describes the Ragas metric crash tied to agents being disabled or cache use.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@xmican10
xmican10 force-pushed the LEADS-489-ragas-crash-w-api-disabled branch from 7747a5a to 693ec53 Compare July 3, 2026 11:47

@asamal4 asamal4 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Please add a note..

Comment thread pyproject.toml Outdated
@xmican10
xmican10 force-pushed the LEADS-489-ragas-crash-w-api-disabled branch from 693ec53 to faffeb9 Compare July 3, 2026 12:46

@bsatapat-jpg bsatapat-jpg left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@asamal4
asamal4 merged commit 87492de into lightspeed-core:main Jul 6, 2026
17 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.

3 participants