-
Notifications
You must be signed in to change notification settings - Fork 416
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[OPIK-763] Updating Online Scoring into a distributed service using redis. #1083
Merged
ldaugusto
merged 12 commits into
main
from
daniel/OPIK-763-onlinescoring-redis-producer
Jan 21, 2025
Merged
[OPIK-763] Updating Online Scoring into a distributed service using redis. #1083
ldaugusto
merged 12 commits into
main
from
daniel/OPIK-763-onlinescoring-redis-producer
Jan 21, 2025
Conversation
This file contains 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
thiagohora
reviewed
Jan 20, 2025
apps/opik-backend/src/main/java/com/comet/opik/api/AutomationRuleEvaluatorType.java
Outdated
Show resolved
Hide resolved
...kend/src/main/java/com/comet/opik/api/resources/v1/events/OnlineScoringLlmAsJudgeScorer.java
Outdated
Show resolved
Hide resolved
...kend/src/main/java/com/comet/opik/api/resources/v1/events/OnlineScoringLlmAsJudgeScorer.java
Outdated
Show resolved
Hide resolved
.../opik-backend/src/main/java/com/comet/opik/api/resources/v1/events/OnlineScoringSampler.java
Outdated
Show resolved
Hide resolved
apps/opik-backend/src/main/java/com/comet/opik/infrastructure/OnlineScoringConfig.java
Outdated
Show resolved
Hide resolved
...ik-backend/src/test/java/com/comet/opik/api/resources/v1/events/OnlineScoringEngineTest.java
Outdated
Show resolved
Hide resolved
…1/events/OnlineScoringSampler.java Co-authored-by: Thiago dos Santos Hora <thiagoh@comet.com>
thiagohora
approved these changes
Jan 21, 2025
thiagohora
previously approved these changes
Jan 21, 2025
thiagohora
approved these changes
Jan 21, 2025
# for free
to join this conversation on GitHub.
Already have an account?
# 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.
Details
Splitting OnlineScoringEventListener from a local service listening to EventBus local events in two: the first part still uses the local even to fetch for stored rules and run sampling, but it doesn't score them anymore, it enqueues a request on Redis; the second service now keeps listening for this stream, to finally score them.
This way we get resiliance from Redis queues (no data loss in case of a crash, like in memory events) and multiple OPIK instances can share a big traces load, processing them in parallel.
OPIK-765 was solved with a single line around Flux, so no need for a dedicated PR.
This PR also fixes OPIK-800 which was converting any boolean response into a '0' value.
Issues
OPIK-763
OPIK-764
OPIK-765
OPIK-800
Resolves #
Testing
Documentation