зеркало из https://github.com/mozilla/taar.git
* Disable colander schema validation because of call overhead
* Added a test enviroment shell script to enable local execution of flask app * disable fetching of branch intervention from the CGI args
This commit is contained in:
Родитель
da42d3dc3a
Коммит
21a6247ce5
|
@ -0,0 +1,18 @@
|
|||
# Setup shell test enviroment settings
|
||||
export TAAR_API_PLUGIN=taar.plugin
|
||||
export TAAR_ITEM_MATRIX_BUCKET=telemetry-public-analysis-2
|
||||
export TAAR_ITEM_MATRIX_KEY=telemetry-ml/addon_recommender/item_matrix.json
|
||||
export TAAR_ADDON_MAPPING_BUCKET=telemetry-public-analysis-2
|
||||
export TAAR_ADDON_MAPPING_KEY=telemetry-ml/addon_recommender/addon_mapping.json
|
||||
export TAAR_ENSEMBLE_BUCKET=telemetry-parquet
|
||||
export TAAR_ENSEMBLE_KEY=taar/ensemble/ensemble_weight.json
|
||||
export TAAR_WHITELIST_BUCKET=telemetry-parquet
|
||||
export TAAR_WHITELIST_KEY=telemetry-ml/addon_recommender/only_guids_top_200.json
|
||||
export TAAR_LOCALE_BUCKET=telemetry-parquet
|
||||
export TAAR_LOCALE_KEY=taar/locale/top10_dict.json
|
||||
export TAAR_SIMILARITY_BUCKET=telemetry-parquet
|
||||
export TAAR_SIMILARITY_DONOR_KEY=taar/similarity/donors.json
|
||||
export TAAR_SIMILARITY_LRCURVES_KEY=taar/similarity/lr_curves.json
|
||||
export TAAR_MAX_RESULTS=10
|
||||
export DYNAMO_REGION=us-west-2
|
||||
export DYNAMO_TABLE_NAME=taar_addon_data_20180206
|
|
@ -76,9 +76,7 @@ def configure_plugin(app): # noqa: C901
|
|||
# Coerce the uuid.UUID type into a string
|
||||
client_id = str(hashed_client_id)
|
||||
|
||||
branch = request.args.get("branch", "")
|
||||
|
||||
extra_data = {"branch": branch}
|
||||
extra_data = {"branch": 'intervention_a'}
|
||||
|
||||
locale = request.args.get("locale", None)
|
||||
if locale is not None:
|
||||
|
|
|
@ -158,7 +158,6 @@ class RecommendationManager:
|
|||
self._ctx, TAAR_WHITELIST_BUCKET, TAAR_WHITELIST_KEY
|
||||
)
|
||||
|
||||
@schema_validate(RecommendationManagerQuerySchema)
|
||||
def recommend(self, client_id, limit, extra_data={}):
|
||||
"""Return recommendations for the given client.
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче