Add unregister_benchmark method to RagasEvaluatorBase for dynamic benchmark management#58
Merged
dmaniloff merged 2 commits intotrustyai-explainability:mainfrom Feb 26, 2026
Conversation
…chmark management
Contributor
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdds support for dynamically unregistering benchmarks from RagasEvaluatorBase by introducing an async unregister_benchmark method that safely removes a benchmark from the internal registry and logs the operation. Sequence diagram for unregister_benchmark benchmark removal flowsequenceDiagram
participant Caller
participant RagasEvaluatorBase
participant BenchmarksDict as benchmarks
participant Logger as logger
Caller->>RagasEvaluatorBase: unregister_benchmark(benchmark_id)
activate RagasEvaluatorBase
RagasEvaluatorBase->>BenchmarksDict: pop(benchmark_id, None)
BenchmarksDict-->>RagasEvaluatorBase: Benchmark or None
RagasEvaluatorBase->>Logger: info(Unregistered benchmark: benchmark_id)
deactivate RagasEvaluatorBase
RagasEvaluatorBase-->>Caller: return
Class diagram for updated RagasEvaluatorBase benchmark managementclassDiagram
class RagasEvaluatorBase {
Dict~str,Benchmark~ benchmarks
+async register_benchmark(task_def Benchmark) None
+async unregister_benchmark(benchmark_id str) None
}
class Benchmark {
str identifier
}
RagasEvaluatorBase "1" o-- "*" Benchmark : manages
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
… a benchmark is not found, improving feedback during benchmark management.
m-misiura
approved these changes
Feb 25, 2026
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 by Sourcery
New Features: