Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
- run:
name: Deploy to Railway App (You must set RAILWAY_TOKEN env var)
command: |
cd section-07-ci-and-publishing/house-prices-api && railway up --detach
cd section-07-ci-and-publishing/house-prices-api && railway up --detach -s splendid-writer -e production

section_07_test_and_upload_regression_model:
<<: *defaults
Expand Down Expand Up @@ -92,7 +92,7 @@ jobs:
- run:
name: Build and run Dockerfile (see https://docs.railway.app/deploy/dockerfiles)
command: |
cd section-08-deploying-with-containers && railway up --detach
cd section-08-deploying-with-containers && railway up --detach -s splendid-writer -e production

test_regression_model_py37:
docker:
Expand Down Expand Up @@ -279,7 +279,15 @@ workflows:
- demo
# upload after git tags are created
- section_07_test_and_upload_regression_model:
<<: *tags_only
# <<: *tags_only
requires:
- section_07_deploy_app_to_railway
filters:
branches:
only:
- main
- master
- demo

- section_08_deploy_app_container_via_railway:
filters:
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.0.3
4.0.2
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ def make_prediction(
if not errors:
predictions = _price_pipe.predict(
X=validated_data[config.model_config.features]
)
)
dtype = np.result_type(np.float32, predictions)
results = {
"predictions": [np.exp(pred) for pred in predictions], # type: ignore
"predictions": [np.exp(pred).astype(dtype) for pred in predictions], # type: ignore
"version": _version,
"errors": errors,
}
Expand Down
1 change: 1 addition & 0 deletions section-07-ci-and-publishing/model-package/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ passenv =
KAGGLE_USERNAME
KAGGLE_KEY
GEMFURY_PUSH_URL
RAILWAY_TOKEN

[testenv:test_package]
allowlist_externals = python
Expand Down