diff --git a/.circleci/config.yml b/.circleci/config.yml index d33ec5d85..daa7cf8c1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,7 +2,7 @@ version: 2 defaults: &defaults docker: - - image: circleci/python:3.7.2 + - image: circleci/python:3.8 working_directory: ~/project prepare_venv: &prepare_venv diff --git a/packages/ml_api/requirements.txt b/packages/ml_api/requirements.txt index 13e82d198..7901ff163 100644 --- a/packages/ml_api/requirements.txt +++ b/packages/ml_api/requirements.txt @@ -1,7 +1,11 @@ --extra-index-url=${PIP_EXTRA_INDEX_URL} # api -flask==1.0.2 +flask==1.1.1 +jinja2==2.10.3 +markupsafe==1.1.1 +itsdangerous==1.1.0 +werkzeug==0.16.0 # schema validation marshmallow==2.17.0 diff --git a/packages/ml_api/tests/test_controller.py b/packages/ml_api/tests/test_controller.py index cc0beb09f..9f5d1b878 100644 --- a/packages/ml_api/tests/test_controller.py +++ b/packages/ml_api/tests/test_controller.py @@ -45,5 +45,5 @@ def test_prediction_endpoint_returns_prediction(flask_test_client): response_json = json.loads(response.data) prediction = response_json['predictions'] response_version = response_json['version'] - assert math.ceil(prediction[0]) == 112476 + assert math.ceil(prediction[0]) == 112512 assert response_version == _version diff --git a/packages/regression_model/regression_model/VERSION b/packages/regression_model/regression_model/VERSION index 6c6aa7cb0..6da28dde7 100644 --- a/packages/regression_model/regression_model/VERSION +++ b/packages/regression_model/regression_model/VERSION @@ -1 +1 @@ -0.1.0 \ No newline at end of file +0.1.1 \ No newline at end of file diff --git a/packages/regression_model/regression_model/processing/preprocessors.py b/packages/regression_model/regression_model/processing/preprocessors.py index 47326120f..d5f771dc5 100644 --- a/packages/regression_model/regression_model/processing/preprocessors.py +++ b/packages/regression_model/regression_model/processing/preprocessors.py @@ -91,7 +91,7 @@ def fit(self, X, y=None): for var in self.variables: # the encoder will learn the most frequent categories - t = pd.Series(X[var].value_counts() / np.float(len(X))) + t = pd.Series(X[var].value_counts() / np.float64(len(X))) # frequent labels: self.encoder_dict_[var] = list(t[t >= self.tol].index) diff --git a/packages/regression_model/requirements.txt b/packages/regression_model/requirements.txt index 919b75917..dc681c01b 100644 --- a/packages/regression_model/requirements.txt +++ b/packages/regression_model/requirements.txt @@ -3,17 +3,17 @@ # updates/fixes, whilst ensuring we don't install a major update which could introduce backwards incompatible changes. # Model Building Requirements -numpy>=1.18.1,<1.19.0 -pandas>=0.25.3,<0.26.0 -scikit-learn>=0.22.1,<0.23.0 -joblib>=0.14.1,<0.15.0 +numpy>=1.18.1 +pandas>=0.25.3 +scikit-learn>=0.21.3 +joblib>=0.14.1 # testing requirements -pytest>=5.3.2,<6.0.0 +pytest>=5.3.2 # packaging -setuptools>=41.4.0,<42.0.0 -wheel>=0.33.6,<0.34.0 +setuptools>=41.4.0 +wheel>=0.33.6 # fetching datasets -kaggle>=1.5.6,<1.6.0 +kaggle>=1.5.6 diff --git a/packages/regression_model/tests/test_predict.py b/packages/regression_model/tests/test_predict.py index 8c06e5b78..6b357742f 100644 --- a/packages/regression_model/tests/test_predict.py +++ b/packages/regression_model/tests/test_predict.py @@ -15,7 +15,7 @@ def test_make_single_prediction(): # Then assert subject is not None assert isinstance(subject.get('predictions')[0], float) - assert math.ceil(subject.get('predictions')[0]) == 112476 + assert math.ceil(subject.get('predictions')[0]) == 112512 def test_make_multiple_predictions(): diff --git a/scripts/fetch_kaggle_dataset.sh b/scripts/fetch_kaggle_dataset.sh index 455b9c970..4f5d53b4a 100644 --- a/scripts/fetch_kaggle_dataset.sh +++ b/scripts/fetch_kaggle_dataset.sh @@ -1,3 +1,5 @@ #!/usr/bin/env bash -kaggle competitions download -c house-prices-advanced-regression-techniques -p packages/regression_model/regression_model/datasets/ \ No newline at end of file +kaggle competitions download -c house-prices-advanced-regression-techniques -p packages/regression_model/regression_model/datasets/ + +unzip packages/regression_model/regression_model/datasets/house-prices-advanced-regression-techniques.zip -d packages/regression_model/regression_model/datasets \ No newline at end of file