Query Selector (Core)#

alts.core.query.query_selector
class ProcessQuerySelector(query_optimizer, query_decider)[source]#

Bases: QuerySelector, ProcessDataSubscriber

Description
Has additional access to a process for decision making.
Parameters:
  • query_optimizer (QueryOptimizer) – Chooses the most informative queries to be asked next

  • query_decider (QueryDecider) – Decided if the chosen queries are informative enough to be asked

process_update(self, subscription) None[source]#
Description
Receives notification of the updated subscription.
Parameters:

subscription (Subscribable) – The updated subscription

class QuerySelector(query_optimizer, query_decider)[source]#

Bases: ExperimentModule, QueryConstrained

Description
The QuerySelector chooses the next queries to be queried.
It utilizes the QueryOptimizer and the QueryDecider.
Parameters:
  • query_optimizer (QueryOptimizer) – Chooses the most informative queries to be asked next

  • query_decider (QueryDecider) – Decided if the chosen queries are informative enough to be asked

decide(self) None[source]#
Description
1. Chooses the best queries with the optimizer
2. Decides if chosen queries are worth the effort
3. If they are worth it, forwards the chosen queries to the oracle
post_init(self) None[source]#
Description
Initializes query_optimizer and query_Decider with its experiment modules.
query_decider: QueryDecider = NOTSET#
query_optimizer: QueryOptimizer = NOTSET#
class ResultQuerySelector(query_optimizer, query_decider)[source]#

Bases: QuerySelector, ResultDataSubscriber

Description
Has additional access to a result data pool foor decision making.
Parameters:
  • query_optimizer (QueryOptimizer) – Chooses the most informative queries to be asked next

  • query_decider (QueryDecider) – Decided if the chosen queries are informative enough to be asked

result_update(self, subscription) None[source]#
Description
Receives notification of the updated subscription.
Parameters:

subscription (Subscribable) – The updated subscription

class StreamQuerySelector(query_optimizer, query_decider)[source]#

Bases: QuerySelector, StreamDataSubscriber

Description
Has additional access to a stream for decision making.
Parameters:
  • query_optimizer (QueryOptimizer) – Chooses the most informative queries to be asked next

  • query_decider (QueryDecider) – Decided if the chosen queries are informative enough to be asked

stream_update(self, subscription) None[source]#
Description
Receives notification of the updated subscription.
Parameters:

subscription (Subscribable) – The updated subscription