├── .gitignore ├── Chapter 10 ├── adaboostreg.pb ├── aggregate_models │ └── major_class_finder.py ├── model_update.py ├── model_update │ ├── model_current │ │ └── model.txt │ └── model_new │ │ └── model.txt ├── regression_models.py ├── rfreg.pb └── server.py ├── Chapter 11 ├── data_validation.py └── feature_transformation.py ├── Chapter 12 ├── models │ └── 1 │ │ ├── saved_model.pb │ │ └── variables │ │ ├── variables.data-00000-of-00001 │ │ └── variables.index └── serving_example.py ├── Chapter 13 ├── deployment_graph.py ├── ensemble_example.py ├── first_ray_serve_demo.py ├── model_composition.py └── pipeline_pattern.py ├── Chapter 14 ├── bento1.py ├── bento_load1.py ├── bento_service_dummy.py ├── bentofile.yaml ├── custom_route.py ├── regression_models.py ├── regression_service.py ├── service1.py └── validations.py ├── Chapter 3 ├── checkpoint ├── decision_tree.py ├── dt.pkl ├── dt_save_model.py ├── filename.pkl ├── hmmExample.py ├── keras_dnn_mnist.py ├── keras_mist_save_model.py ├── keras_mnist_load.py ├── linear_regression_example.py ├── logistic.py ├── mnist_weights.data-00000-of-00001 ├── mnist_weights.index ├── model.json ├── model.pkl ├── models │ └── dt.pkl ├── removing_states_between_calls.py ├── rf_plot_tree.py ├── rf_trees.png ├── rf_trees2.png ├── rf_with_random_state.py ├── rnn_example.py ├── saved_model │ ├── saved_model.pb │ └── variables │ │ ├── variables.data-00000-of-00001 │ │ └── variables.index ├── serving │ ├── dt.pkl │ └── flaskApi.py ├── simple_lr.py ├── singleton.py ├── state_store │ ├── dt.json │ ├── dt.pkl │ ├── dt_params.pkl │ └── tree.pkl ├── stateful_to_stateless.py ├── statefull.py ├── stateless.py └── states_between_calls..py ├── Chapter 4 ├── accuracy_monitoring_example.py ├── accuracy_raw_python.py ├── accuracy_sklearn.py ├── f1_score_sklearn.py ├── iris_model.py ├── monitor.py ├── precision_raw.py ├── precision_sklearn.py ├── recall_raw.py ├── recall_scikit.py └── regression_monitoring_example.py ├── Chapter 5 ├── create_hash_keys.py ├── duplicate_keys.sql ├── keyed_pred_example.py ├── multi_thread1.py ├── mutliple_model_servers.py ├── reorder_response.py └── table_query.sql ├── Chapter 6 ├── cron_example.py ├── flaskApi.py ├── model.py ├── predictions │ └── predictions.csv └── survery_rating.py ├── Chapter 7 ├── check_weight_diff.py ├── cluster_change.py ├── data_verification.py ├── data_wrangling.py ├── flaskApi.py ├── keras_mnist │ ├── saved_model.pb │ └── variables │ │ ├── variables.data-00000-of-00001 │ │ └── variables.index ├── keras_mnist2 │ ├── saved_model.pb │ └── variables │ │ ├── variables.data-00000-of-00001 │ │ └── variables.index ├── keras_model_serve_dummy.py ├── kmeans_partial_fit.py ├── mutliple_reqs.py ├── poll_data_from_file.py ├── prediction_first_model_creation.py ├── train_directory │ └── data.csv └── underperform_with_new_data.py ├── Chapter 8 ├── compute_median.py ├── int_quantization.py ├── mnist │ ├── saved_model.pb │ └── variables │ │ ├── variables.data-00000-of-00001 │ │ └── variables.index ├── mnist_vgg.py ├── model_size.py ├── quantization_example.py ├── quantized_model │ └── mnist_model_quant.tflite ├── reduced_feature_phase_one.py └── separately_trained_different_phase_one_model.py ├── Chapter 9 ├── __init__.py ├── dag_pipeline1.py ├── ml_pipeline.py ├── stage1.py ├── stage2.py └── stages │ ├── data_collector_source1.py │ ├── data_collector_source2.py │ ├── data_combiner.py │ ├── init_data_dir.py │ └── train.py ├── LICENSE ├── README.md └── requirements.txt /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .idea/ 3 | -------------------------------------------------------------------------------- /Chapter 10/adaboostreg.pb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 10/adaboostreg.pb -------------------------------------------------------------------------------- /Chapter 10/aggregate_models/major_class_finder.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 10/aggregate_models/major_class_finder.py -------------------------------------------------------------------------------- /Chapter 10/model_update.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 10/model_update.py -------------------------------------------------------------------------------- /Chapter 10/model_update/model_current/model.txt: -------------------------------------------------------------------------------- 1 | model_current -------------------------------------------------------------------------------- /Chapter 10/model_update/model_new/model.txt: -------------------------------------------------------------------------------- 1 | model new -------------------------------------------------------------------------------- /Chapter 10/regression_models.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 10/regression_models.py -------------------------------------------------------------------------------- /Chapter 10/rfreg.pb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 10/rfreg.pb -------------------------------------------------------------------------------- /Chapter 10/server.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 10/server.py -------------------------------------------------------------------------------- /Chapter 11/data_validation.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 11/data_validation.py -------------------------------------------------------------------------------- /Chapter 11/feature_transformation.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 11/feature_transformation.py -------------------------------------------------------------------------------- /Chapter 12/models/1/saved_model.pb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 12/models/1/saved_model.pb -------------------------------------------------------------------------------- /Chapter 12/models/1/variables/variables.data-00000-of-00001: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 12/models/1/variables/variables.data-00000-of-00001 -------------------------------------------------------------------------------- /Chapter 12/models/1/variables/variables.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 12/models/1/variables/variables.index -------------------------------------------------------------------------------- /Chapter 12/serving_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 12/serving_example.py -------------------------------------------------------------------------------- /Chapter 13/deployment_graph.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 13/deployment_graph.py -------------------------------------------------------------------------------- /Chapter 13/ensemble_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 13/ensemble_example.py -------------------------------------------------------------------------------- /Chapter 13/first_ray_serve_demo.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 13/first_ray_serve_demo.py -------------------------------------------------------------------------------- /Chapter 13/model_composition.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 13/model_composition.py -------------------------------------------------------------------------------- /Chapter 13/pipeline_pattern.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 13/pipeline_pattern.py -------------------------------------------------------------------------------- /Chapter 14/bento1.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 14/bento1.py -------------------------------------------------------------------------------- /Chapter 14/bento_load1.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 14/bento_load1.py -------------------------------------------------------------------------------- /Chapter 14/bento_service_dummy.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 14/bento_service_dummy.py -------------------------------------------------------------------------------- /Chapter 14/bentofile.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 14/bentofile.yaml -------------------------------------------------------------------------------- /Chapter 14/custom_route.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 14/custom_route.py -------------------------------------------------------------------------------- /Chapter 14/regression_models.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 14/regression_models.py -------------------------------------------------------------------------------- /Chapter 14/regression_service.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 14/regression_service.py -------------------------------------------------------------------------------- /Chapter 14/service1.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 14/service1.py -------------------------------------------------------------------------------- /Chapter 14/validations.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 14/validations.py -------------------------------------------------------------------------------- /Chapter 3/checkpoint: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 3/checkpoint -------------------------------------------------------------------------------- /Chapter 3/decision_tree.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 3/decision_tree.py -------------------------------------------------------------------------------- /Chapter 3/dt.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 3/dt.pkl -------------------------------------------------------------------------------- /Chapter 3/dt_save_model.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 3/dt_save_model.py -------------------------------------------------------------------------------- /Chapter 3/filename.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 3/filename.pkl -------------------------------------------------------------------------------- /Chapter 3/hmmExample.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 3/hmmExample.py -------------------------------------------------------------------------------- /Chapter 3/keras_dnn_mnist.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 3/keras_dnn_mnist.py -------------------------------------------------------------------------------- /Chapter 3/keras_mist_save_model.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 3/keras_mist_save_model.py -------------------------------------------------------------------------------- /Chapter 3/keras_mnist_load.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 3/keras_mnist_load.py -------------------------------------------------------------------------------- /Chapter 3/linear_regression_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 3/linear_regression_example.py -------------------------------------------------------------------------------- /Chapter 3/logistic.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 3/logistic.py -------------------------------------------------------------------------------- /Chapter 3/mnist_weights.data-00000-of-00001: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 3/mnist_weights.data-00000-of-00001 -------------------------------------------------------------------------------- /Chapter 3/mnist_weights.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 3/mnist_weights.index -------------------------------------------------------------------------------- /Chapter 3/model.json: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Chapter 3/model.pkl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Chapter 3/models/dt.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 3/models/dt.pkl -------------------------------------------------------------------------------- /Chapter 3/removing_states_between_calls.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 3/removing_states_between_calls.py -------------------------------------------------------------------------------- /Chapter 3/rf_plot_tree.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 3/rf_plot_tree.py -------------------------------------------------------------------------------- /Chapter 3/rf_trees.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 3/rf_trees.png -------------------------------------------------------------------------------- /Chapter 3/rf_trees2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 3/rf_trees2.png -------------------------------------------------------------------------------- /Chapter 3/rf_with_random_state.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 3/rf_with_random_state.py -------------------------------------------------------------------------------- /Chapter 3/rnn_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 3/rnn_example.py -------------------------------------------------------------------------------- /Chapter 3/saved_model/saved_model.pb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 3/saved_model/saved_model.pb -------------------------------------------------------------------------------- /Chapter 3/saved_model/variables/variables.data-00000-of-00001: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 3/saved_model/variables/variables.data-00000-of-00001 -------------------------------------------------------------------------------- /Chapter 3/saved_model/variables/variables.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 3/saved_model/variables/variables.index -------------------------------------------------------------------------------- /Chapter 3/serving/dt.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 3/serving/dt.pkl -------------------------------------------------------------------------------- /Chapter 3/serving/flaskApi.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 3/serving/flaskApi.py -------------------------------------------------------------------------------- /Chapter 3/simple_lr.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 3/simple_lr.py -------------------------------------------------------------------------------- /Chapter 3/singleton.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 3/singleton.py -------------------------------------------------------------------------------- /Chapter 3/state_store/dt.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 3/state_store/dt.json -------------------------------------------------------------------------------- /Chapter 3/state_store/dt.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 3/state_store/dt.pkl -------------------------------------------------------------------------------- /Chapter 3/state_store/dt_params.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 3/state_store/dt_params.pkl -------------------------------------------------------------------------------- /Chapter 3/state_store/tree.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 3/state_store/tree.pkl -------------------------------------------------------------------------------- /Chapter 3/stateful_to_stateless.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 3/stateful_to_stateless.py -------------------------------------------------------------------------------- /Chapter 3/statefull.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 3/statefull.py -------------------------------------------------------------------------------- /Chapter 3/stateless.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 3/stateless.py -------------------------------------------------------------------------------- /Chapter 3/states_between_calls..py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 3/states_between_calls..py -------------------------------------------------------------------------------- /Chapter 4/accuracy_monitoring_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 4/accuracy_monitoring_example.py -------------------------------------------------------------------------------- /Chapter 4/accuracy_raw_python.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 4/accuracy_raw_python.py -------------------------------------------------------------------------------- /Chapter 4/accuracy_sklearn.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 4/accuracy_sklearn.py -------------------------------------------------------------------------------- /Chapter 4/f1_score_sklearn.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 4/f1_score_sklearn.py -------------------------------------------------------------------------------- /Chapter 4/iris_model.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 4/iris_model.py -------------------------------------------------------------------------------- /Chapter 4/monitor.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 4/monitor.py -------------------------------------------------------------------------------- /Chapter 4/precision_raw.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 4/precision_raw.py -------------------------------------------------------------------------------- /Chapter 4/precision_sklearn.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 4/precision_sklearn.py -------------------------------------------------------------------------------- /Chapter 4/recall_raw.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 4/recall_raw.py -------------------------------------------------------------------------------- /Chapter 4/recall_scikit.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 4/recall_scikit.py -------------------------------------------------------------------------------- /Chapter 4/regression_monitoring_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 4/regression_monitoring_example.py -------------------------------------------------------------------------------- /Chapter 5/create_hash_keys.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 5/create_hash_keys.py -------------------------------------------------------------------------------- /Chapter 5/duplicate_keys.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 5/duplicate_keys.sql -------------------------------------------------------------------------------- /Chapter 5/keyed_pred_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 5/keyed_pred_example.py -------------------------------------------------------------------------------- /Chapter 5/multi_thread1.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 5/multi_thread1.py -------------------------------------------------------------------------------- /Chapter 5/mutliple_model_servers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 5/mutliple_model_servers.py -------------------------------------------------------------------------------- /Chapter 5/reorder_response.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 5/reorder_response.py -------------------------------------------------------------------------------- /Chapter 5/table_query.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 5/table_query.sql -------------------------------------------------------------------------------- /Chapter 6/cron_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 6/cron_example.py -------------------------------------------------------------------------------- /Chapter 6/flaskApi.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 6/flaskApi.py -------------------------------------------------------------------------------- /Chapter 6/model.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 6/model.py -------------------------------------------------------------------------------- /Chapter 6/predictions/predictions.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 6/predictions/predictions.csv -------------------------------------------------------------------------------- /Chapter 6/survery_rating.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 6/survery_rating.py -------------------------------------------------------------------------------- /Chapter 7/check_weight_diff.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 7/check_weight_diff.py -------------------------------------------------------------------------------- /Chapter 7/cluster_change.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 7/cluster_change.py -------------------------------------------------------------------------------- /Chapter 7/data_verification.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 7/data_verification.py -------------------------------------------------------------------------------- /Chapter 7/data_wrangling.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 7/data_wrangling.py -------------------------------------------------------------------------------- /Chapter 7/flaskApi.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 7/flaskApi.py -------------------------------------------------------------------------------- /Chapter 7/keras_mnist/saved_model.pb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 7/keras_mnist/saved_model.pb -------------------------------------------------------------------------------- /Chapter 7/keras_mnist/variables/variables.data-00000-of-00001: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 7/keras_mnist/variables/variables.data-00000-of-00001 -------------------------------------------------------------------------------- /Chapter 7/keras_mnist/variables/variables.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 7/keras_mnist/variables/variables.index -------------------------------------------------------------------------------- /Chapter 7/keras_mnist2/saved_model.pb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 7/keras_mnist2/saved_model.pb -------------------------------------------------------------------------------- /Chapter 7/keras_mnist2/variables/variables.data-00000-of-00001: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 7/keras_mnist2/variables/variables.data-00000-of-00001 -------------------------------------------------------------------------------- /Chapter 7/keras_mnist2/variables/variables.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 7/keras_mnist2/variables/variables.index -------------------------------------------------------------------------------- /Chapter 7/keras_model_serve_dummy.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 7/keras_model_serve_dummy.py -------------------------------------------------------------------------------- /Chapter 7/kmeans_partial_fit.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 7/kmeans_partial_fit.py -------------------------------------------------------------------------------- /Chapter 7/mutliple_reqs.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 7/mutliple_reqs.py -------------------------------------------------------------------------------- /Chapter 7/poll_data_from_file.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 7/poll_data_from_file.py -------------------------------------------------------------------------------- /Chapter 7/prediction_first_model_creation.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 7/prediction_first_model_creation.py -------------------------------------------------------------------------------- /Chapter 7/train_directory/data.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 7/train_directory/data.csv -------------------------------------------------------------------------------- /Chapter 7/underperform_with_new_data.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 7/underperform_with_new_data.py -------------------------------------------------------------------------------- /Chapter 8/compute_median.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 8/compute_median.py -------------------------------------------------------------------------------- /Chapter 8/int_quantization.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 8/int_quantization.py -------------------------------------------------------------------------------- /Chapter 8/mnist/saved_model.pb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 8/mnist/saved_model.pb -------------------------------------------------------------------------------- /Chapter 8/mnist/variables/variables.data-00000-of-00001: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 8/mnist/variables/variables.data-00000-of-00001 -------------------------------------------------------------------------------- /Chapter 8/mnist/variables/variables.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 8/mnist/variables/variables.index -------------------------------------------------------------------------------- /Chapter 8/mnist_vgg.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 8/mnist_vgg.py -------------------------------------------------------------------------------- /Chapter 8/model_size.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 8/model_size.py -------------------------------------------------------------------------------- /Chapter 8/quantization_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 8/quantization_example.py -------------------------------------------------------------------------------- /Chapter 8/quantized_model/mnist_model_quant.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 8/quantized_model/mnist_model_quant.tflite -------------------------------------------------------------------------------- /Chapter 8/reduced_feature_phase_one.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 8/reduced_feature_phase_one.py -------------------------------------------------------------------------------- /Chapter 8/separately_trained_different_phase_one_model.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 8/separately_trained_different_phase_one_model.py -------------------------------------------------------------------------------- /Chapter 9/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Chapter 9/dag_pipeline1.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 9/dag_pipeline1.py -------------------------------------------------------------------------------- /Chapter 9/ml_pipeline.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 9/ml_pipeline.py -------------------------------------------------------------------------------- /Chapter 9/stage1.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 9/stage1.py -------------------------------------------------------------------------------- /Chapter 9/stage2.py: -------------------------------------------------------------------------------- 1 | if __name__=="__main__": 2 | print("I am at stage 2") 3 | -------------------------------------------------------------------------------- /Chapter 9/stages/data_collector_source1.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 9/stages/data_collector_source1.py -------------------------------------------------------------------------------- /Chapter 9/stages/data_collector_source2.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 9/stages/data_collector_source2.py -------------------------------------------------------------------------------- /Chapter 9/stages/data_combiner.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 9/stages/data_combiner.py -------------------------------------------------------------------------------- /Chapter 9/stages/init_data_dir.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 9/stages/init_data_dir.py -------------------------------------------------------------------------------- /Chapter 9/stages/train.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/Chapter 9/stages/train.py -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/README.md -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices/HEAD/requirements.txt --------------------------------------------------------------------------------