-
[OPIK-1454] [BE/FE] Add support for filters for online scoring (#3308)
发布于
2025-10-02 18:56:19 +00:00 - [OPIK-1454] [BE/FE] Add support for filters for online scoring
Details
This PR adds filter support for online scoring automation rules, allowing users to filter traces before applying automation rules.
Key Changes
Backend:
- Added
filtersfield to AutomationRuleEvaluator DTOs - Created
TraceFilterEvaluationServicefor trace filtering - Updated
OnlineScoringSamplerto apply filters before sampling - Added database migration for filters column
Frontend:
- Added expandable "Filtering" section in automation rule dialog
- Integrated with existing filter infrastructure
- Implemented pixel-perfect UI matching Figma design
Change checklist
- User facing
- Documentation update
Issues
- OPIK-1454
Testing
Backend:
- Filter evaluation for all trace fields and operators
- Integration with OnlineScoringSampler
- Database operations and migrations
Frontend:
- Filter UI interactions (add/remove/edit)
- Form validation and state management
- Integration with existing filter components
Documentation
API Changes:
- Added
filtersfield to automation rule endpoints - Accepts array of TraceFilter objects
Implementation:
- Filters applied before sampling in online scoring pipeline
- Uses existing trace filter infrastructure
- Stores filters as JSON in database
-
OPIK-1454 pr comments for AutomationModelEvaluatorMapper
-
OPIK-1454 pr comments for TraceFilterEvaluationService
-
OPIK-1454 fixed compilation issue
-
remove
has_textunused import -
remove unused
has_text -
run ruff formatter
-
no setting sampling rate in e2e tests
-
refactor FE to a few components
-
- add functionality to restore the filter type
-
adding threads support
-
fixing bugs
-
fixing tests
-
fixing lint
-
typecheck fix
-
fixing tests
-
fixing filter validation
-
fix test
Co-authored-by: Ido Berkovich ido@comet.com
Co-authored-by: Andrei Căutișanu andreicautisanu@Andreis-MacBook-Pro.local
Co-authored-by: andrii.dudar fanat.web@gmail.com
Co-authored-by: Nimrod Lahav 3535799+Nimrod007@users.noreply.github.com
Co-authored-by: Andrei Cautisanu 30831438+AndreiCautisanu@users.noreply.github.com下载附件