-
[OPIK-2286] [P SDK] Implement support for a more granular support for choosing dataset items in the experiment (#3199)
发布于
2025-09-10 11:39:59 +00:00 - [OPIK-2286] Add dataset sampling support to the evaluation framework
- Introduced
BaseDatasetSamplerandRandomDatasetSamplerfor modular dataset sampling. - Updated evaluation methods to accept an optional dataset sampler for selective sampling logic.
- Enhanced unit tests with scenarios for random sampling.
- Added
samplersmodule and integrated it into the evaluation engine.
- [OPIK-2382] Add random dataset sampling integration tests and assertions in evaluation logic
- Added
test_evaluate_prompt__with_random_sampling__happy_flowto validate selective sampling logic with a 3-sample limit.
- [OPIK-2286] Add dataset sampler support to
task_evaluator.evaluate()
- Extended
task_evaluator.evaluate()to support an optionaldataset_samplerargument. - Updated logic and docstrings to reflect the inclusion of dataset sampling.
-
[OPIK-2286] Fixed grammatic error
-
[OPIK-2286] Split
BaseDatasetSamplerandRandomDatasetSamplerinto separate modules
- Moved
RandomDatasetSamplerto a newrandom_dataset_sampler.pyfile. - Updated imports and
__all__in thesamplerspackage to reflect changes.
-
[OPIK-2286] Add docstring for
BaseDatasetSampler.sample()method -
[OPIK-2286] Fixed imports
-
[OPIK-2286] Removed sampler reference from
opik_optimizeruntil OPIK with samplers will be released and become available to import for other projects. -
[OPIK-2286] Add documentation for dataset samplers
- Added usage examples and implementation details for custom dataset samplers in the documentation.
- [OPIK-2286] Enhanced dataset sampler documentation with filtering example
- Added a detailed code example showcasing dataset sampling using filtering criteria with regex.
- Updated the description of custom dataset sampler usage.
下载附件