-
Notifications
You must be signed in to change notification settings - Fork 28
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
Support training for latency based anomalies specifically for perf-anomaly #409
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,15 +43,27 @@ | |
datasource: str | ||
dimensions: list[str] = field(default_factory=list) | ||
aggregations: dict = field(default_factory=dict) | ||
post_aggregations: dict = field(default_factory=dict) | ||
group_by: list[str] = field(default_factory=list) | ||
pivot: Pivot = field(default_factory=lambda: Pivot()) | ||
granularity: str = "minute" | ||
|
||
def __post_init__(self): | ||
from pydruid.utils.aggregators import doublesum | ||
from pydruid.utils import postaggregator, aggregators | ||
from numalogic.connectors.druid import postaggregator as _post_agg | ||
from numalogic.connectors.druid import aggregators as _agg | ||
|
||
if not self.aggregations: | ||
self.aggregations = {"count": doublesum("count")} | ||
self.aggregations = { | ||
"agg_out": _agg.quantiles_doubles_sketch("valuesDoublesSketch", "agg0", 64) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What does this value 64 imply? Does it need to be configurable for different latency anomaly use cases? |
||
} | ||
if not self.post_aggregations: | ||
self.post_aggregations = { | ||
"p90": _post_agg.QuantilesDoublesSketchToQuantile( | ||
output_name="agg_out", field=postaggregator.Field("agg_out"), fraction=0.90 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As a library feature, percentile is better to be configurable. |
||
) | ||
} | ||
|
||
|
||
@dataclass | ||
|
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.
The
-slim-bookworm
here replaced with-bookworm
. However, the same-slim-bookworm
at line 31 remains unchanged. Why is the difference?