wallaroo.assays_v2.assay_v2_builder


This module features the AssayV2Builder that helps with the creation of an AssayV2 object.

class AssayV2Builder:

This class helps with the creation of an AssayV2 object.

Attributes: - client: The Wallaroo Client object. - targeting: The Targeting object that specifies the data origin and io paths. - scheduling: The Scheduling object that specifies the scheduling of the assay. - summarizer: The Summarizer object that specifies the summarizer for the assay. - bin_mode: The bin mode of the assay. - window: The RollingWindow object that specifies the window width. - name: The name of the assay. - bin_weights: The bin weights of the assay.

AssayV2Builder( client: wallaroo.client.Client, pipeline_id: int, pipeline_name: str, workspace_id: int)

Build the AssayV2 object.

Returns

The AssayV2 object.

def set_name(self, name: str) -> wallaroo.assays_v2.assay_v2_builder.AssayV2Builder:

Set the name of the assay.

Parameters
  • name: The name of the assay.
Returns

The AssayV2Builder object.

def set_pipeline( self, pipeline_name: str, workspace_id: int) -> wallaroo.assays_v2.assay_v2_builder.AssayV2Builder:

Set the pipeline and workspace for the assay.

Parameters
  • pipeline_name: The name of the pipeline.
  • workspace_id: The workspace id.
Returns

The AssayV2Builder object.

def set_model( self, model_name: str) -> wallaroo.assays_v2.assay_v2_builder.AssayV2Builder:

Set the model name for the assay.

Parameters
  • model_name: The name of the model.
def add_monitoring( self, field: str, indices: List[int], warning: Optional[float] = None, alert: Optional[float] = None) -> wallaroo.assays_v2.assay_v2_builder.AssayV2Builder:

Append an iopath to the assay.

Parameters
  • field: The field of the iopath.
  • indices: The indices of the iopath.
  • warning: The warning threshold.
  • alert: The alert threshold.
Returns

The AssayV2Builder object.

def set_monitoring( self, field: str, indices: List[int], warning: Optional[float] = None, alert: Optional[float] = None) -> wallaroo.assays_v2.assay_v2_builder.AssayV2Builder:

Append an iopath to the assay.

Parameters
  • field: The field of the iopath.
  • indices: The indices of the iopath.
  • warning: The warning threshold.
  • alert: The alert threshold.
Returns

The AssayV2Builder object.

def set_baseline( self, start: datetime.datetime, end: datetime.datetime) -> wallaroo.assays_v2.assay_v2_builder.AssayV2Builder:

Set the baseline for the assay.

Parameters
  • start: The start time of the baseline.
  • end: The end time of the baseline.
Returns

The AssayV2Builder object.

def set_window_width( self, width: Union[datetime.timedelta, int]) -> wallaroo.assays_v2.assay_v2_builder.AssayV2Builder:

Set the window width for the assay.

Parameters
  • width: The width of the window.
Returns

The AssayV2Builder object.

def set_first_run( self, first_run: datetime.datetime) -> wallaroo.assays_v2.assay_v2_builder.AssayV2Builder:

Set the first run for the assay.

Parameters
  • first_run: The first run time.
Returns

The AssayV2Builder object.

Set the daily run frequency for the assay.

Parameters
  • quantity: The quantity of the run frequency.
Returns

The AssayV2Builder object.

Set the hourly run frequency for the assay.

Parameters
  • quantity: The quantity of the run frequency.
Returns

The AssayV2Builder object.

Set the weekly run frequency for the assay.

Returns

The AssayV2Builder object.

def minutely(self, quantity=1) -> wallaroo.assays_v2.assay_v2_builder.AssayV2Builder:

Set the minutely run frequency for the assay.

Parameters
  • quantity: The quantity of the run frequency.
Returns

The AssayV2Builder object.

def days_of_data(self, quantity=1) -> wallaroo.assays_v2.assay_v2_builder.AssayV2Builder:

Set the days of data for the assay.

Parameters
  • quantity: The quantity of the days of data.
Returns

The AssayV2Builder object.

def minutes_of_data(self, quantity=1) -> wallaroo.assays_v2.assay_v2_builder.AssayV2Builder:

Set the minutes of data for the assay.

Parameters
  • quantity: The quantity of the minutes of data.
Returns

The AssayV2Builder object.

def hours_of_data(self, quantity=1) -> wallaroo.assays_v2.assay_v2_builder.AssayV2Builder:

Set the hours of data for the assay.

Parameters
  • quantity: The quantity of the hours of data.
Returns

The AssayV2Builder object.

def weeks_of_data(self, quantity=1) -> wallaroo.assays_v2.assay_v2_builder.AssayV2Builder:

Set the weeks of data for the assay.

Parameters
  • quantity: The quantity of the weeks of data.
Returns

The AssayV2Builder object.

def cumulative_aggregation(self) -> wallaroo.assays_v2.assay_v2_builder.AssayV2Builder:

Set a cumulative aggregation for the assay. It keeps a cumulative count of the values/percentages that fall in each bin.

Returns

The AssayV2Builder object.

def density_aggregation(self) -> wallaroo.assays_v2.assay_v2_builder.AssayV2Builder:

Set a density aggregation for the assay. It counts the number/percentage of values that fall in each bin.

Returns

The AssayV2Builder object.

Set an edge aggregation for the assay. It looks at the calculated bin edges instead of how the data is binned.

Returns

The AssayV2Builder object.

Set the max difference metric for the assay. It measures the maximum difference between the baseline and current distributions (as estimated using the bins)

Returns

The AssayV2Builder object.

Set the psi metric for the assay. It is an entropy-based measure of the difference between distributions.

Returns

The AssayV2Builder object.

Set the sum difference metric for the assay. It sums up the difference of occurrences in each bin between the baseline and current distributions.

Returns

The AssayV2Builder object.

Set no bins for the assay.

Returns

The AssayV2Builder object.

def equal_bins(self, num: int) -> wallaroo.assays_v2.assay_v2_builder.AssayV2Builder:

Set equal bins for the assay. It defines the bins using equally spaced data value ranges, like a histogram.

Parameters
  • num: The number of bins.
Returns

The AssayV2Builder object.

def quantile_bins(self, num: int) -> wallaroo.assays_v2.assay_v2_builder.AssayV2Builder:

Set quantile bins for the assay. It defines the bins using percentile ranges (each bin holds the same percentage of the baseline data).

Parameters
  • num: The number of bins.
Returns

The AssayV2Builder object.

def set_bin_weights( self, weights: List[float]) -> wallaroo.assays_v2.assay_v2_builder.AssayV2Builder:

Set the bin weights for the assay.

Parameters
  • weights: The bin weights.
Returns

The AssayV2Builder object.

def set_aggregation( self, aggregation=typing.Union[str, wallaroo.wallaroo_ml_ops_api_client.models.aggregation.Aggregation, wallaroo.assay_config.Aggregation]) -> wallaroo.assays_v2.assay_v2_builder.AssayV2Builder:

Set the aggregation for the assay.

Parameters
  • aggregation: The aggregation.
Returns

The AssayV2Builder object.

def set_metric( self, metric=typing.Union[str, wallaroo.wallaroo_ml_ops_api_client.models.metric.Metric, wallaroo.assay_config.Metric]) -> wallaroo.assays_v2.assay_v2_builder.AssayV2Builder:

Set the metric for the assay.

Parameters
  • metric: The metric.
Returns

The AssayV2Builder object.

def set_locations( self, locations=typing.List[str]) -> wallaroo.assays_v2.assay_v2_builder.AssayV2Builder:

Set the data origin locations for the assay.

Parameters
  • locations: The locations.
Returns

The AssayV2Builder object.

def add_locations( self, location: str) -> wallaroo.assays_v2.assay_v2_builder.AssayV2Builder:

Append a location to the data origin for the assay.

Parameters
  • location: The location.
Returns

The AssayV2Builder object.

def preview( self, start: datetime.datetime, end: datetime.datetime, include_failures=False) -> wallaroo.assays_v2.preview_result.PreviewResultList:

Preview the assay. This is used for interactive runs that are not saved to the database.

Parameters
  • start: The start time.
  • end: The end time.
  • include_failures: Whether to include failures.
Returns

The AssayV2Builder object.