Augmentation (Core)#

alts.core.oracle.augmentation
class Augmentation(*args: Any, **kwargs: Any)[source]#

Bases: DataSource

Augmentation(data_source) | Description | An Augmentation is a wrapper around a Data Source which modifies its in- or outputs depending on the implementation. | One of its uses is to add distortion to a Data Source.

Parameters:
  • query_shape (tuple of ints) – The expected shape of the queries

  • result_shape (tuple of ints) – The expected shape of the results

data_source: DataSource = NOTSET#
property exhausted: bool#
Description
See DataSource.exhausted().
Returns:

Whether the augmented DataSource has been exhausted

Return type:

boolean

post_init(self) None[source]#
Description
Initializes the DataSource.
query(self, queries) data_points[source]#
Description
Modifies the query before passing it on to DataSource.query().
Parameters:

queries (NDArray) – Requested Query

Returns:

Processed Query, Result

Return type:

A tuple of two NDArray

query_constrain(self) QueryConstrain[source]#
Description
Returns its own query constrains.
Returns:

Constrains around queries

Return type:

QueryConstrain

property query_shape#
Description
Returns the accepted query shape of the Data Source.
Returns:

Accepted query shape

Return type:

Array Shape

result_constrain(self) ResultConstrain[source]#
Description
Returns its own result constrains.
Returns:

Constrains around results

Return type:

ResultConstrain

property result_shape: Tuple[int, ...]#
Description
Returns the accepted result shape of the Data Source.
Returns:

Accepted query shape

Return type:

Array Shape