-
[OPIK-4127] [SDK] Add filter_string support to dataset methods and evaluation (#5003)
发布于
2026-02-03 10:08:05 +00:00 - [OPIK-4127] [SDK] Add DatasetView for filtered dataset operations
Introduces DatasetView class providing read-only access to filtered datasets. DatasetView inherits from Dataset but prevents remote modifications, allowing users to perform local operations or convert views to full datasets.
Key changes:
-
Add DatasetView class with filter-based dataset access
-
Enhance OpikQueryLanguage with improved filter parsing and validation
-
Update OpikClient.get_dataset() to return DatasetView when filter_string provided
-
Add comprehensive unit and e2e tests for DatasetView functionality
-
Update documentation with DatasetView usage examples
-
Add documentation
-
using get_items instead
-
enhance docstrings
-
get_items in view test
-
Add dataset_items_count property to DatasetView and update tests
-
Refactor dataset view tests to use a new verification function. This change consolidates the verification logic for DatasetView properties and immutability into a single function, improving test readability and maintainability.
-
fix typo
-
Implement a private method to raise read-only exceptions in DatasetView.
-
Enhance dataset filtering capabilities by introducing the
filter_stringparameter forget_items()andevaluate_prompt(). This allows users to evaluate specific subsets of dataset items based on defined criteria. Additionally, remove theDatasetViewclass to streamline the dataset API, ensuring all dataset interactions are handled through theDatasetclass. Update documentation and tests accordingly to reflect these changes. -
test naming
-
formatting
-
improve naming
-
fix docs
下载附件