You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+18-25Lines changed: 18 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,23 +1,27 @@
1
1
# Github Action for Continuous Deployment from an ML Repo at Github to Algorithmia
2
2
3
-
## When to use?
3
+
## When to use it?
4
4
After you create an algorithm on Algorithmia as the scalable inference endpoint for your ML model, you can incorporate this Github Action to your Github ML repository's workflow file, to automate deploying your model and your inference (algorithm) code.
5
5
6
6
This action would be a good fit for your workflow if you are using a Jupyter notebook to train and evaluate your ML model or checking your saved model file into your repository and you have your inference (algorithm) script & dependencies in your ML repo.
7
7
8
8
9
9
## How does it work?
10
10
11
-
The Github Action will get deploy your model file to a data collection at Algorithmia and create a new build for your inference endpoint to use the new model, whenever you do a Git push to your master branch (or any other triggering event you configure).
11
+
Whenever you do a Git push to your master branch (or any other triggering event you configure), your workflow integrating this Github Action will kick off.
12
12
13
13

14
14
15
-
Depending on your model development preference:
15
+
If you're developing your ML model in a Jupyter notebook, you can configure the workflow with the notebook path to execute. In this case, the Github Action will:
16
+
- Install the required packages in your requirements.txt file on a Github worker machine
17
+
- Run your configured Jupyter notebook file on the worker machine's from-scratch environment
18
+
19
+
If not and if you have an already saved model checked-in to your repository, you can configure the workflow with the existing model file path.
16
20
17
-
If you're developing your ML model on a Jupyter notebook, you can configure the workflow with the notebook path and tell it where to save the model file. In this case, the workflow will run the notebook on the CI worker machine's from-scratch environment.
18
-
If you have an already saved model checked-in to your repository, you can configure the workflow with the existing model file path.
19
-
20
-
In both scenarios, the workflow will get the model file and upload it to the configured data collection on Algorithmia.
21
+
In both scenarios, the Github Action will then:
22
+
- Take the ML model file from the configured path and upload it to your data collection at Algorithmia
23
+
- Copy your inference (algorithm) script to your algorithm repository
24
+
- Update/create a model_manifest.json file, connecting your inference (algorithm) code at Algorithmia with this newly uploaded model file
21
25
22
26

23
27
@@ -29,13 +33,17 @@ In addition to that, the manifest file will contain certain metadata such as:
29
33
- What is the Github commit SHA and the commit message resulting in this automated upload?
30
34
- When did this upload happen?
31
35
32
-
By using this manifest, your inference script will know which model to load and use. It can also calculate the loaded model file's MD5 hash with the original MD5 hash that was calculated at the time of the upload, and make sure that the model file hasn't been changed.
36
+
By using this manifest, your inference script will know which model to load and use. It can also re-calculate the MD5 hash of the model file at inference time and compare it with the original MD5 hash that was calculated at the time of the upload, and make sure that the model file hasn't been changed.
33
37
34
38

35
39
36
-
## How is it configured?
40
+
## How to configure it?
41
+
42
+
The required / optional inputs to this Github Action are listed below.
43
+
44
+
Among these, some inputs are required when your Algorithmia algorithm is hosted at (backed by) Github and some will be required when your Algorithmia algorithm is hosted at (backed by) Algorithmia.
37
45
38
-
The inputs to this Github Action is as follows. Please check the default values of some of them, and make sure to include them in your own ML repo's workflow file if you want a non-default configuration for these.
46
+
You'll also notice that some of the inputs have default values, so that you're not bogged down in configuration and can start with reasonable defaults. So make sure to check out the default values first and if you want a non-default configuration for these, you can provide those values in your own ML repo's workflow file.
39
47
40
48
```
41
49
inputs:
@@ -76,21 +84,6 @@ inputs:
76
84
description: Git host for the Algorithmia algorithm repository. Change to git.algorithmia.com if the algorithm is hosted on Algorithmia.
0 commit comments