Process model queries (
- class emmaa.answer_queries.QueryManager(db=None, model_managers=None)[source]¶
Manager to run queries and interact with the database.
db (emmaa.db.EmmaaDatabaseManager) – An instance of a database manager to use.
model_managers (list[emmaa.model_tests.ModelManager]) – Optional list of ModelManagers to use for running queries. If not given, the methods will load ModelManager from S3 when needed.
- answer_immediate_query(user_email, user_id, query, model_names, subscribe, bucket='emmaa')[source]¶
This method first tries to find saved result to the query in the database and if not found, runs ModelManager method to answer query.
- answer_registered_queries(model_name, bucket='emmaa')[source]¶
Retrieve and asnwer registered queries
Retrieve queries registered on database for a given model, answer them, calculate delta between results and put results to a database.
- get_registered_queries(user_email, query_type='path_property')[source]¶
Get formatted results to queries registered by user.
- emmaa.answer_queries.answer_queries_from_s3(model_name, db=None, bucket='emmaa')[source]¶
Answer registered queries with model manager on s3.
model_name (str) – Name of EmmaaModel to answer queries for.
db (Optional[emmaa.db.manager.EmmaaDatabaseManager]) – If given over-rides the default primary database.