Skip to content

fix(dataset): Add versions to dataset metadata #3732

Merged
nina-kollman merged 9 commits intomainfrom
nk/add_dataset_version
Feb 26, 2026
Merged

fix(dataset): Add versions to dataset metadata #3732
nina-kollman merged 9 commits intomainfrom
nk/add_dataset_version

Conversation

@nina-kollman
Copy link
Copy Markdown
Contributor

@nina-kollman nina-kollman commented Feb 26, 2026

  • I have added tests that cover my changes.
  • If adding a new instrumentation or changing an existing one, I've added screenshots from some observability platform showing the change.
  • PR name follows conventional commits format: feat(instrumentation): ... or fix(instrumentation): ....
  • (If applicable) I have updated the documentation accordingly.

Important

Add versioning to dataset metadata and update example script to demonstrate version retrieval.

  • Behavior:
    • Adds versions field to DatasetMetadata in model.py to store dataset version history.
    • Updates dataset_example.py to print dataset versions using client.datasets.get_all().
  • Models:
    • Introduces DatasetVersion class in model.py with fields version, published_by, and published_at.
  • Misc:
    • Changes Traceloop.init() call in dataset_example.py to use endpoint_is_traceloop=True.

This description was created by Ellipsis for abb97ad. You can customize this summary. It will automatically update as commits are pushed.

Summary by CodeRabbit

  • New Features

    • Datasets now include version tracking with publisher and publication timestamp.
    • Dataset name is optional and dataset entries can include a list of versions.
  • Chores

    • Minor non-functional comment added to the sample app; no runtime or behavioral changes.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Feb 26, 2026

CLA assistant check
All committers have signed the CLA.

Copy link
Copy Markdown
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed everything up to abb97ad in 12 seconds. Click for details.
  • Reviewed 50 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.

Workflow ID: wflow_082CasF48srknYek

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Feb 26, 2026

📝 Walkthrough

Walkthrough

Added a new DatasetVersion model with publication metadata, made DatasetMetadata.name optional, and added an optional versions list to DatasetMetadata; a sample app file received a single commented line addition only.

Changes

Cohort / File(s) Summary
Dataset model updates
packages/traceloop-sdk/traceloop/sdk/datasets/model.py
Added DatasetVersion model (version: str, published_by: Optional[str] = None, published_at: datetime). Changed DatasetMetadata.name from str to Optional[str] = None. Added optional versions: Optional[List[DatasetVersion]] = None.
Sample app comment change
packages/sample-app/sample_app/dataset_example.py
Added a non-executable commented line (# main()) after the existing if __name__ == "__main__": main() call; no runtime behavior change.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐇 I nibble at schemas, fresh and bright,

A version here, a name made light.
A tiny comment left to play—
New metadata hops out to day.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding a versions field to dataset metadata, which is the primary modification in the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch nk/add_dataset_version

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

@nina-kollman nina-kollman force-pushed the nk/add_dataset_version branch from e6b94ca to 01350f1 Compare February 26, 2026 14:56
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/sample-app/sample_app/dataset_example.py`:
- Around line 510-512: Remove the commented-out dead code by deleting the stray
"# main()" in the if __name__ == "__main__": block and ensure the script either
implements the promised behavior (use client.datasets.get_all() to print dataset
versions—update the main() function to call client.datasets.get_all() and print
each dataset/version) or update the PR description to remove that claim; modify
the main() function (and any dataset-related helper functions) to perform the
dataset-version printing if you choose to add the feature, otherwise just remove
the commented line and correct the PR text.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between e6b94ca and 3cad1f1.

📒 Files selected for processing (2)
  • packages/sample-app/sample_app/dataset_example.py
  • packages/traceloop-sdk/traceloop/sdk/datasets/model.py

@nina-kollman nina-kollman merged commit ab40640 into main Feb 26, 2026
12 of 13 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.

4 participants