Skip to content

Commit

Permalink
Merge pull request #36 from avast/outliers_parameter
Browse files Browse the repository at this point in the history
add parameter for outlier detection algorithm
  • Loading branch information
jachymsol authored Jun 16, 2022
2 parents f6f26da + 8a7942d commit 8b7784f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/epstats/server/req.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,8 @@ class Experiment(BaseModel):
title="Filtering conditions", description="""List of filtering conditions to apply on exposure and goals."""
)

outlier_detection_algorithm: Optional[str] = Field(title="Outlier detection algorithm")

@validator("id")
def id_must_be_not_empty(cls, value):
if not value:
Expand Down Expand Up @@ -337,6 +339,7 @@ def to_experiment(self, statsd: StatsClient):
variants=self.variants,
statsd=statsd,
filters=[f.to_filter() for f in self.filters] if self.filters else [],
outlier_detection_algorithm=self.outlier_detection_algorithm,
)

class Config:
Expand Down
2 changes: 2 additions & 0 deletions src/epstats/toolkit/experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ def __init__(
variants: List[str] = None,
statsd: StatsClient = StatsClient(),
filters: List[Filter] = None,
outlier_detection_algorithm: str = None,
):
self._logger = logging.getLogger(f"{__name__}.{self.__class__.__name__}")
self.id = id
Expand Down Expand Up @@ -166,6 +167,7 @@ def __init__(
self._update_dimension_to_value()
self.statsd = statsd
self.filters = filters if filters is not None else []
self.outlier_detection_algorithm = outlier_detection_algorithm

def _update_dimension_to_value(self):
"""
Expand Down

0 comments on commit 8b7784f

Please sign in to comment.