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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Machine Learning Engineering for Production
# Machine Learning Engineering for Production

Welcome to the public repo for [deeplearning.ai](https://www.deeplearning.ai/)'s Machine Learning Engineering for Production Specialization.

Here you will find public resources for the courses of this specialization.

## Want to contribute?

At the time being we are not accepting Pull Requests but if you have any suggestion or spot any bug please raise an issue.
At the time being we are not accepting Pull Requests but if you have any suggestion or spot any bug please raise an issue.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
app = FastAPI(title="Predicting Wine Class with batching")

# Open classifier in global scope
with open("models/wine.pkl", "rb") as file:
with open("models/wine-95-fixed.pkl", "rb") as file:
clf = pickle.load(file)


Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from sklearn.pipeline import Pipeline
from sklearn.preprocessing import StandardScaler
import pickle
from main import clf


def test_accuracy():

# Load test data
with open("data/test_data.pkl", "rb") as file:
test_data = pickle.load(file)
Expand All @@ -16,3 +16,14 @@ def test_accuracy():

# Accuracy should be over 90%
assert acc > 0.9

def test_pipeline_and_scaler():
# Check if clf is an instance of sklearn.pipeline.Pipeline
is_pipeline = isinstance(clf, Pipeline)
assert is_pipeline

if is_pipeline:
# Check if the first step of the pipeline is an instance of
# sklearn.preprocessing.StandardScaler
first_step = clf.named_steps.values()[0]
assert isinstance(first_step, StandardScaler)