From 5fab1bdc44a658d436a771f139e0eeb192408a21 Mon Sep 17 00:00:00 2001 From: abs51295 Date: Sun, 7 Apr 2019 11:17:37 +0530 Subject: [PATCH] Add training folder to docstyle and linter checks --- check-docstyle.sh | 2 +- run-linter.sh | 2 +- training/train.py | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/check-docstyle.sh b/check-docstyle.sh index 0af498a..0308e38 100755 --- a/check-docstyle.sh +++ b/check-docstyle.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -directories="src tests" +directories="src tests training" pass=0 fail=0 diff --git a/run-linter.sh b/run-linter.sh index 5323389..5440a5e 100755 --- a/run-linter.sh +++ b/run-linter.sh @@ -1,6 +1,6 @@ #!/bin/bash -directories="src tests" +directories="src tests training" pass=0 fail=0 diff --git a/training/train.py b/training/train.py index 04e404c..8386efc 100644 --- a/training/train.py +++ b/training/train.py @@ -133,7 +133,7 @@ def run_recommender(train_df, latent_factor): def validate_manifest_data(manifest_list): - """Validates manifest packages with pypi.""" + """Validate manifest packages with pypi.""" for idx, manifest in enumerate(manifest_list): filtered_manifest = bq_validator.validate_pypi(manifest) # Even the filtered manifest is of length 0, we don't care about that here. @@ -344,8 +344,8 @@ def train_model(): data = load_data(s3_obj) hyper_params = load_hyper_params() or {} lower_limit = int(hyper_params.get('lower_limit', 2)) - upper_limit = int(hyper_params.get('upper_limit', 40)) - latent_factor = int(hyper_params.get('latent_factor', 40)) + upper_limit = int(hyper_params.get('upper_limit', 100)) + latent_factor = int(hyper_params.get('latent_factor', 100)) _logger.info("Lower limit {}, Upper limit {} and latent factor {} are used." .format(lower_limit, upper_limit, latent_factor)) package_id_dict, manifest_id_dict = preprocess_data(data, lower_limit, upper_limit)