-
Notifications
You must be signed in to change notification settings - Fork 9
fixing logic in timeseries controller to align summaries #111
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
Conversation
WalkthroughThe changes in this pull request involve significant enhancements to the Changes
Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🔇 Additional comments (1)hub/test/controllers/TimeSeriesControllerSpec.scala (1)
The change to use Let's verify the test coverage for edge cases: ✅ Verification successfulLet me gather more information about the test coverage, particularly focusing on the TimeSeriesController tests. Let me check the test file directly to understand the test coverage better. The test coverage for percentile data generation is comprehensive and correctly implemented. The changes to use
🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Description: Check if there are tests covering edge cases for percentile data
# Look for test cases handling empty breaks or timestamps
rg -A 5 "breaks.*empty|timestamps.*empty" --type scala
# Look for test cases handling null values
rg -A 5 "setPercentiles.*null|percentileList.*null" --type scala
# Look for test cases with different break sizes
rg -A 5 "breaks\([^2]|breaks\([1-9][^0]" --type scala
Length of output: 3009 Script: #!/bin/bash
# Look for test cases in TimeSeriesControllerSpec that might handle edge cases
rg -A 10 "\"generateSummarySeries\"" hub/test/controllers/TimeSeriesControllerSpec.scala
# Check the implementation of DriftStore.breaks to understand the validation
cat online/src/main/scala/ai/chronon/online/stats/DriftStore.scala
# Look for any error handling tests around percentile data
rg -A 5 "should.*fail|should.*throw|should.*error.*percentile" --type scala hub/test/
Length of output: 8767 Script: #!/bin/bash
# Get the content of TimeSeriesControllerSpec to analyze test coverage
cat hub/test/controllers/TimeSeriesControllerSpec.scala
# Look for any test cases with DriftStore.breaks in the entire codebase
rg -A 5 "DriftStore\.breaks" --type scala
Length of output: 16739 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 4
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (3)
hub/app/controllers/TimeSeriesController.scala(2 hunks)online/src/main/scala/ai/chronon/online/stats/DriftStore.scala(0 hunks)spark/src/test/scala/ai/chronon/spark/test/stats/drift/DriftTest.scala(4 hunks)
💤 Files with no reviewable changes (1)
- online/src/main/scala/ai/chronon/online/stats/DriftStore.scala
ken-zlai
left a comment
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.
Works great for me in my testing. Most categorical data has the same current and baseline values, but I've found a few where they differ. It doesn't seem to correlate as closely to drift as the numerical data in the charts, but its something we can refine in the future
piyush-zlai
left a comment
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.
Thanks for catching and fixing!
## Summary The summary logic assigns labels incorrectly. This PR fixes the issue I had to copy some code into the drift test to get the whole logic running end-to-end. Ideally move the elements of drift test into `TimeseriesControllerSpec`. But we should do that in a later PR ## Checklist - [x] Added Unit Tests - [ ] Covered by existing CI - [ ] Integration tested - [ ] Documentation update <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes - **New Features** - Introduced a new method for generating percentage breaks in the DriftStore. - **Improvements** - Enhanced error handling for time series data retrieval and deserialization. - Refactored logic for fetching and processing summary series to improve efficiency and clarity. - **Bug Fixes** - Updated percentile data generation logic in tests to align with timestamp counts. - **Tests** - Improved asynchronous handling in the DriftTest class for summary series retrieval. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Summary The summary logic assigns labels incorrectly. This PR fixes the issue I had to copy some code into the drift test to get the whole logic running end-to-end. Ideally move the elements of drift test into `TimeseriesControllerSpec`. But we should do that in a later PR ## Checklist - [x] Added Unit Tests - [ ] Covered by existing CI - [ ] Integration tested - [ ] Documentation update <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes - **New Features** - Introduced a new method for generating percentage breaks in the DriftStore. - **Improvements** - Enhanced error handling for time series data retrieval and deserialization. - Refactored logic for fetching and processing summary series to improve efficiency and clarity. - **Bug Fixes** - Updated percentile data generation logic in tests to align with timestamp counts. - **Tests** - Improved asynchronous handling in the DriftTest class for summary series retrieval. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Summary The summary logic assigns labels incorrectly. This PR fixes the issue I had to copy some code into the drift test to get the whole logic running end-to-end. Ideally move the elements of drift test into `TimeseriesControllerSpec`. But we should do that in a later PR ## Checklist - [x] Added Unit Tests - [ ] Covered by existing CI - [ ] Integration tested - [ ] Documentation update <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes - **New Features** - Introduced a new method for generating percentage breaks in the DriftStore. - **Improvements** - Enhanced error handling for time series data retrieval and deserialization. - Refactored logic for fetching and processing summary series to improve efficiency and clarity. - **Bug Fixes** - Updated percentile data generation logic in tests to align with timestamp counts. - **Tests** - Improved asynchronous handling in the DriftTest class for summary series retrieval. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Summary The summary logic assigns labels incorrectly. This PR fixes the issue I had to copy some code into the drift test to get the whole logic running end-to-end. Ideally move the elements of drift test into `TimeseriesControllerSpec`. But we should do that in a later PR ## Cheour clientslist - [x] Added Unit Tests - [ ] Covered by existing CI - [ ] Integration tested - [ ] Documentation update <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes - **New Features** - Introduced a new method for generating percentage breaks in the DriftStore. - **Improvements** - Enhanced error handling for time series data retrieval and deserialization. - Refactored logic for fetching and processing summary series to improve efficiency and clarity. - **Bug Fixes** - Updated percentile data generation logic in tests to align with timestamp counts. - **Tests** - Improved asynchronous handling in the DriftTest class for summary series retrieval. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Summary
The summary logic assigns labels incorrectly. This PR fixes the issue
I had to copy some code into the drift test to get the whole logic running end-to-end. Ideally move the elements of drift test into
TimeseriesControllerSpec. But we should do that in a later PRChecklist
Summary by CodeRabbit
Release Notes
New Features
Improvements
Bug Fixes
Tests