feat(datasets): Add OpikEvaluationDataset to experimental datasets#1364
Open
feat(datasets): Add OpikEvaluationDataset to experimental datasets#1364
OpikEvaluationDataset to experimental datasets#1364Conversation
Signed-off-by: Laura Couto <laurarccouto@gmail.com>
OpikEvaluationDataset to experimental datasets
Signed-off-by: Laura Couto <laurarccouto@gmail.com>
Signed-off-by: Laura Couto <laurarccouto@gmail.com>
Draft
9 tasks
Signed-off-by: Laura Couto <laurarccouto@gmail.com>
Signed-off-by: Laura Couto <laurarccouto@gmail.com>
Signed-off-by: Laura Couto <laurarccouto@gmail.com>
Signed-off-by: Laura Couto <laurarccouto@gmail.com>
…plugins into opik-evaluation-dataset
kedro-datasets/kedro_datasets_experimental/opik/opik_evaluation_dataset.py
Outdated
Show resolved
Hide resolved
…n_dataset.py Co-authored-by: Ravi Kumar Pilla <ravi_kumar_pilla@mckinsey.com> Signed-off-by: L. R. Couto <57910428+lrcouto@users.noreply.github.com>
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.
Description
Introduces a production-ready
OpikEvaluationDatasetto the experimental datasets inkedro-plugins, closing issue #1322. This implementation is the Opik counterpart toLangfuseEvaluationDataset(#1347) and follows the same design principles and API surface.Key Features
Implementation changes:
api_keyrequired), sync policy, and filepath extension at initializationlocal(default, local file as source of truth — upserts all items to remote on everyload()) andremote(Opik as source of truth, no local file interaction)idfields are also deduplicated locally duringsave()mergeidfields that cannot be tracked across syncsOpik-specific behaviour:
idfield.metadatais accepted as a constructor param so the API is the same as inLangfuseEvaluationDataset, but Opik'screate_dataset()does not accept a metadata argument. The value is stored locally and returned by_describe()but is not propagated to the remote dataset.load()to a historical snapshot (unlike Langfuse's ISO 8601versionparam).Design philosophy:
Lifecycle operations (delete dataset, delete items, clear) are delegated to the native Opik SDK rather than exposed through
OpikEvaluationDataset. This matches whatLangfuseEvaluationDatasetdoes and keeps the dataset class focused on the local/remote sync. Item deletion requires Opik's internal UUIDs, which are not tracked in the local file, making a thin wrapper of limited value.Testing & Documentation
kedro_datasets_experimental/tests/opik(mirroringLangfuseEvaluationDatasettest structure)opik/README.mdextended with anOpikEvaluationDatasetsection and a Langfuse to Opik migration guide covering catalog changes, credential key differences, experiment runner API differences, scorer/task signature differences, and known limitations.Development notes
How to test
opik-evaluationbranch of kedro-academyconf/local/credentials.yml:Then we can run the pipeline and check the result on the opik dashboard:
Expected in the Opik dashboard:
evaluations/intent_agent_evaluationappears under DatasetsRun the pipeline a second time without changing the local file. Content hash deduplication means no new items are created in Opik, the item count stays the same.
Expected: dataset item count unchanged; a new experiment run is recorded.
Then, add a new item to
data/intent_detection/evaluation/intent_evaluation.jsonand rerun. The new item should appear in the remote dataset after load.A note on versioning:
In the Langfuse evaluation pipeline, experiment names are derived from a stable integer version number pinned in the catalog (
load_args.version). This makes experiment runs reproducible and traceable to a specific prompt version.The Opik equivalent is not yet available.
OpikPromptDatasetcurrently loads the latest prompt commit by default and exposes its commit hash at runtime, so the kedro-academy pipeline derives the experiment name from that hash (e.g.intent_eval_a3f2c1b0_model_gpt-4o). This works in practice but has the drawback of now having verson pinning on the catalog. There is no way to declaratively pinOpikPromptDatasetto a specific prompt version the way Langfuse does withload_args.version: 1. Swapping prompt versions requires editing the local file and re-syncing, rather than a catalog change.This works to test versioning directly using the Opik SDK, but to get something equivalent to what's being done with
LangfuseEvaluationDatasetwe'd have to implement version pinning forOpikPromptDataset. There's an issue open on it already (#1348).Developer Certificate of Origin
We need all contributions to comply with the Developer Certificate of Origin (DCO). All commits must be signed off by including a
Signed-off-byline in the commit message. See our wiki for guidance.If your PR is blocked due to unsigned commits, then you must follow the instructions under "Rebase the branch" on the GitHub Checks page for your PR. This will retroactively add the sign-off to all unsigned commits and allow the DCO check to pass.
Checklist
jsonschema/kedro-catalog-X.XX.jsonif necessaryRELEASE.mdfile