From ec19042d0df56acf49569449f9423fa062987508 Mon Sep 17 00:00:00 2001 From: deng Date: Wed, 1 Mar 2023 17:13:17 +0800 Subject: [PATCH] update file description and reference --- README.md | 32 ++++++++++++++++++++++++++++++-- test_pytorch_m1.py | 10 ++++++++-- 2 files changed, 38 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d5805b9..ac0e0e1 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,31 @@ -# test_mlflow +# Abstract -測試使用MLflow紀錄Pytorch模型訓練,以及從Model registry中拉取Production model進行推論。 \ No newline at end of file +Try to use [MLflow](https://mlflow.org) platform to log PyTorch model training, and pull production model from model registry to run inference⛩ + +# Requirements + +* MacOS 12.5 +* Docker 20.10 + +# Dir + +* **service** + * House MLflow service data, including MLflow artifacts, backend store and model registry + +# Files + +* **conda.yaml** + * conda env yaml to run this repo +* **start_mlflow_server.sh** + * a script to start MLflow server with basic configuration +* **test_pytorch_m1.py** + * a script to test PyTorch on Apple M1 platform with GPU acceleration +* **train.py** + * a sample code to apply PyTorch to train a small neural network to predict fortune with MLflow logging +* **predict.py** + * a sample code to call registered model to predict testing data and save model to local file system +* **get_registered_model_via_rest_api.py** + * a script to test MLflow REST api + + +###### tags: `MLOps` \ No newline at end of file diff --git a/test_pytorch_m1.py b/test_pytorch_m1.py index 095355d..f685abb 100644 --- a/test_pytorch_m1.py +++ b/test_pytorch_m1.py @@ -1,8 +1,14 @@ +# test_pytorch_m1.py +# Ref: https://towardsdatascience.com/installing-pytorch-on-apple-m1-chip-with-gpu-acceleration-3351dc44d67c +# +# author: deng +# date : 20230301 + import torch import math -print('this ensures that the current MacOS version is at least 12.3+') +print('This ensures that the current MacOS version is at least 12.3+') print(torch.backends.mps.is_available()) -print('\nthis ensures that the current current PyTorch installation was built with MPS activated.') +print('\nThis ensures that the current current PyTorch installation was built with MPS activated.') print(torch.backends.mps.is_built()) \ No newline at end of file