{"id":23209131,"url":"https://github.com/algorithmiaio/algorithmia-modeldeployment-action","last_synced_at":"2025-10-06T17:44:53.892Z","repository":{"id":65158812,"uuid":"302546447","full_name":"algorithmiaio/algorithmia-modeldeployment-action","owner":"algorithmiaio","description":"Algorithmia Github Action capable of running Jupyter notebooks to create the ML model, uploading the model and updating the algorithm at Algorithmia","archived":false,"fork":false,"pushed_at":"2021-03-29T18:47:33.000Z","size":800,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-12-01T04:50:40.026Z","etag":null,"topics":["algorithmia","ci-cd","githubaction-workflow","githubactions","machine-learning","model-deployment","model-serving"],"latest_commit_sha":null,"homepage":"http://algorithmia.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/algorithmiaio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-10-09T05:57:02.000Z","updated_at":"2021-04-29T15:08:08.000Z","dependencies_parsed_at":"2023-01-05T04:51:28.140Z","dependency_job_id":null,"html_url":"https://github.com/algorithmiaio/algorithmia-modeldeployment-action","commit_stats":{"total_commits":76,"total_committers":1,"mean_commits":76.0,"dds":0.0,"last_synced_commit":"42a16ba67d42e4f3c203a33b8f85172aa1d0eaae"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/algorithmiaio%2Falgorithmia-modeldeployment-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/algorithmiaio%2Falgorithmia-modeldeployment-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/algorithmiaio%2Falgorithmia-modeldeployment-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/algorithmiaio%2Falgorithmia-modeldeployment-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/algorithmiaio","download_url":"https://codeload.github.com/algorithmiaio/algorithmia-modeldeployment-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230318623,"owners_count":18207812,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithmia","ci-cd","githubaction-workflow","githubactions","machine-learning","model-deployment","model-serving"],"created_at":"2024-12-18T18:14:48.633Z","updated_at":"2025-10-06T17:44:53.824Z","avatar_url":"https://github.com/algorithmiaio.png","language":"Python","readme":"# Github Action for Continuous Deployment from an ML Repo at Github to Algorithmia\n\n## When to use it?\nAfter 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.\n\nThis 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 optionally prefer to work on your inference (algorithm) code in this same repository.\n\n\n## How does it work?\n\nWhenever 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.\n\n![](images/overview.png)\n\nIf 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:\n  - Install the required packages in your requirements.txt file on a Github worker machine\n  - Run your configured Jupyter notebook file on the worker machine's from-scratch environment \n  \nIf 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.\n\nIn both scenarios, the Github Action will then:\n- Take the ML model file from the configured path and upload it to your data collection at Algorithmia\n- Copy your inference (algorithm) files to your algorithm repository\n- Update/create a model_manifest.json file, connecting your inference (algorithm) code at Algorithmia with this newly uploaded model file\n\n![](images/flowchart.png)\n\n## What other perks does it have?\nTo get your inference endpoint use this newly uploaded model, the workflow will make the connection between your inference algorithm and the uploaded model file, with the key-value pairs in  `model_manifest.json` file.\nIn addition to that, the manifest file will contain certain metadata such as:\n- Which Github repository and which ref was this model file uploaded from?\n- What was the MD5 hash of your model file when it was first created?\n- What is the Github commit SHA and the commit message resulting in this automated upload?\n- When did this upload happen?\n\nBy 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.  \n\n![](images/model_manifest.png)\n\n## How to configure it?\n\nThe required / optional inputs to this Github Action are listed below.\n\nAmong 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.\n\nYou'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.\n\n```\ninputs:\n  algorithmia_api_key:\n    description: 'Algorithmia API Key, used when uploading the model file'\n    required: true\n  algorithmia_username:\n    description: 'Algorithmia Username, used as Git Commit Username and as part of default model upload path'\n    required: true\n  algorithmia_email:\n    description: 'Algorithmia Email, used as Git Commit Email'\n    required: false\n    default: 'githubactions@placeholder.email'\n  algorithmia_password:\n    description: 'Algorithmia Password. Only required if the algorithm is hosted on Algorithmia.'\n    required: false\n  github_username:\n    description: 'Github username owning the algorithm repository, used to clone the algorithm repository. Only required if the algorithm is hosted on Github.'\n    required: false\n  github_pat:\n    description: 'Github Personal Access Token, used to clone the algorithm repository. Only required if the algorithm is hosted on Github.'\n    required: false  \n  algorithmia_algoname:\n    description: 'Algorithmia Algorithm name'\n    required: true\n  algorithmia_uploadpath:\n    description: 'Algorithmia data collection name to upload the model file'\n    required: true\n    default: 'data://$ALGORITHMIA_USERNAME/$ALGORITHMIA_ALGONAME'\n  model_path:\n    description: 'Path of the model file to be uploaded to Algorithmia'\n    required: true\n    default: 'model.pkl'  \n  notebook_path:\n    description: 'Path of the notebook to be executed by this action'\n    required: false\n    default: 'model_training.ipynb'\n  git_host:\n    description: Git host for the Algorithmia algorithm repository. Change to git.algorithmia.com if the algorithm is hosted on Algorithmia Marketplace or git.YOUR_DOMAIN for enterprise installations.\n    required: false\n    default: 'github.com'\n  algorithmia_api: \n    description: API endpoint Algorithmia installation, for enterprise customers.\n    required: false\n    default: 'https://api.algorithmia.com'\n```\n\n\n## Example usages\nCheck out the two example ML repos that incorporate this Github Action to continuously deploy\n  * [to an Algorithmia algorithm backed by Algorithmia](https://github.com/algorithmiaio/githubactions-modeldeployment-demo-algorithmiaalgo)\n  * [to an Algorithmia algorithm backed by Github](https://github.com/algorithmiaio/githubactions-modeldeployment-demo-githubalgo)\n \n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falgorithmiaio%2Falgorithmia-modeldeployment-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falgorithmiaio%2Falgorithmia-modeldeployment-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falgorithmiaio%2Falgorithmia-modeldeployment-action/lists"}