added network utils and bumped taar3 version requirement
This commit is contained in:
Родитель
a2ba808965
Коммит
84232167a8
|
@ -153,8 +153,8 @@ coverage==4.3.4 \
|
|||
--hash=sha256:6c9bd3924052151b1a4f157d860f57d17708962deb4258739ae406d9376da77d \
|
||||
--hash=sha256:9ddd809ce195ec60aec6d8dacec433b1ac55f6076f773253208dd35dfd9b59bc \
|
||||
--hash=sha256:0962e9764e44172a72fa6e486aeb87d714f7018619ff41eb7c67b03fc53d122a
|
||||
mozilla-taar3==0.0.22 \
|
||||
--hash=sha256:af34fc41dff3cfea69c4d6fbfd5b4bbc571e4e50b0df0faa3928a9b292ecdaf6
|
||||
mozilla-taar3==0.0.23 \
|
||||
--hash=sha256:5f6af63bf8a0a89aff4819e6df01b5d95dd348d14230c657cae48e20185971ec
|
||||
numpy==1.13.1 \
|
||||
--hash=sha256:c9b0283776085cb2804efff73e9955ca279ba4edafd58d3ead70b61d209c4fbb
|
||||
thriftpy==0.3.9 \
|
||||
|
|
|
@ -5,6 +5,7 @@ from taar import recommenders
|
|||
from taar.context import default_context
|
||||
from taar.profile_fetcher import ProfileFetcher
|
||||
from taar import ProfileController
|
||||
from taar.recommender import utils
|
||||
|
||||
# Cache the recommendation manager for 24hrs (in seconds).
|
||||
VALID_BRANCHES = set(['linear', 'ensemble', 'control'])
|
||||
|
@ -51,6 +52,8 @@ def recommendations(request, client_id):
|
|||
dynamo_client = ProfileController(region_name=settings.DYNAMO_REGION,
|
||||
table_name=settings.DYNAMO_TABLE_NAME)
|
||||
profile_fetcher = ProfileFetcher(dynamo_client)
|
||||
|
||||
ctx['utils'] = utils # This is required for S3 access
|
||||
ctx['profile_fetcher'] = profile_fetcher
|
||||
|
||||
# Lock the context down after we've got basic bits installed
|
||||
|
|
Загрузка…
Ссылка в новой задаче