-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[OPIK-2723] [SDK] Added opik import/export commands #3630
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces comprehensive CLI commands for downloading and uploading data between Opik workspaces/projects. The feature enables users to migrate data between different Opik installations or workspaces.
Key changes:
- Added
opik download
andopik upload
commands with support for traces, datasets, experiments, and prompts - Implemented modular CLI architecture by splitting the monolithic
cli.py
into separate command modules - Added comprehensive test coverage for CLI functionality
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
sdks/python/src/opik/cli/main.py |
New main CLI entry point that registers all commands |
sdks/python/src/opik/cli/download.py |
Implements download command with filtering and data type selection |
sdks/python/src/opik/cli/upload.py |
Implements upload command with dry-run mode and ID remapping |
sdks/python/src/opik/cli/configure.py |
Extracted configure command from monolithic CLI |
sdks/python/src/opik/cli/proxy.py |
Extracted proxy command from monolithic CLI |
sdks/python/src/opik/cli/healthcheck.py |
Extracted healthcheck command from monolithic CLI |
sdks/python/src/opik/cli/__init__.py |
CLI package initialization |
sdks/python/src/opik/cli.py |
Refactored to import from new CLI module structure |
sdks/python/tests/unit/test_cli.py |
Comprehensive test suite for download and upload commands |
sdks/python/README.md |
Added detailed documentation for CLI commands |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
SDK E2E Tests Results84 tests 79 ✅ 2m 26s ⏱️ For more details on these failures, see this check. Results for commit 2c3462d. ♻️ This comment has been updated with latest results. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition to the other comments, for every import-export pair I'd suggest adding an e2e test:
- prepare some data
- upload it
- export it
- import it
- assert the content is as expected
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 12 out of 12 changed files in this pull request and generated 5 comments.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Done! |
SDK Unit Tests Results856 tests 855 ✅ 33s ⏱️ For more details on these failures, see this check. Results for commit 64a157d. ♻️ This comment has been updated with latest results. |
📋 PR Linter Failed❌ Incomplete Issues Section. You must reference at least one GitHub issue ( |
Details
This PR adds:
opik export workspace | workspace/project
opik import workspace | workspace/project
These commands have many options; see README-IMPORT-EXPORT.
This PR also breaks up the CLI commands into their own files for easy maintenance.
Change checklist
Issues
Fulfills a need for moving items from one workspace (or Opik installation) to another, and making backups.
Resolves: OPIK-2723
Testing
Basic tests added.
Documentation
See the README-IMPORT-EXPORT.