{"id":21160234,"url":"https://github.com/isaacmg/model_agnostic_prediction","last_synced_at":"2026-03-07T19:33:10.806Z","repository":{"id":52422134,"uuid":"135772934","full_name":"isaacmg/model_agnostic_prediction","owner":"isaacmg","description":"Peelout model agnostic is a class for easily performing production pipeline predictions. ","archived":false,"fork":false,"pushed_at":"2021-04-29T19:11:33.000Z","size":111697,"stargazers_count":8,"open_issues_count":6,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-09T14:47:15.614Z","etag":null,"topics":["deep-learning","deployment","machine-learning","prediction"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","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/isaacmg.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":"2018-06-01T23:50:50.000Z","updated_at":"2023-11-07T12:48:52.000Z","dependencies_parsed_at":"2022-09-06T08:04:23.624Z","dependency_job_id":null,"html_url":"https://github.com/isaacmg/model_agnostic_prediction","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/isaacmg/model_agnostic_prediction","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isaacmg%2Fmodel_agnostic_prediction","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isaacmg%2Fmodel_agnostic_prediction/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isaacmg%2Fmodel_agnostic_prediction/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isaacmg%2Fmodel_agnostic_prediction/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/isaacmg","download_url":"https://codeload.github.com/isaacmg/model_agnostic_prediction/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isaacmg%2Fmodel_agnostic_prediction/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30227852,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T19:01:10.287Z","status":"ssl_error","status_checked_at":"2026-03-07T18:59:58.103Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["deep-learning","deployment","machine-learning","prediction"],"created_at":"2024-11-20T13:03:00.909Z","updated_at":"2026-03-07T19:33:10.791Z","avatar_url":"https://github.com/isaacmg.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Agnostic model loader\n\n[![Build Status](https://travis-ci.org/isaacmg/model_agnostic_prediction.svg?branch=master)](https://travis-ci.org/isaacmg/model_agnostic_prediction)\n\nModel Agnostic (MA) provides an easy model instantiation for Flask, Django, and other production Python projects. It also supports exporting models to other common serving platforms. Finally MA, allows you to easily load models and perform predictions without having to worry about the model backends. Moreover, it helps you organize your code for easy updating and maintainance.\n\n## Usage \n\nTo install run \n` pip install model_agnostic `\n\nYou can also build from the source by (though we strongly reccomend using pip)\n\n` git clone https://github.com/isaacmg/model_agnostic_prediction.git`\n\n`cd model_agnostic_prediction`\n\n` python setup.py build install ` \n\nTo use create a new class that extends your model's backend subclass. Models are located in the model folder in the \"frameworkName_serve\" format. \n\n```python \nfrom model_agnostic.models.pytorch_serve import PytorchModel\nclass NewPyTorch(PytorchModel):\n    def __init__(self, weight_path=None):\n        super(NewPyTorch, self).__init__(weight_path)\n        # Handle any model specific loading here \n    def preprocessing(self, raw_data):\n        # Apply necessary pre-processing here for your data here.\n        pass\n    def process_result(self):\n        # Implement this function if have any post-processing needs of predictions.\n        pass\n\n```\n You will have to implement `preprocessing` and possibly `create_model` and `process_result` depending on your model (see examples for more info).  \n\n## Project Goals\n* Allow users to pre-load model weights from any framework with any save configuration\n\n* Works with common frameworks (PyTorch, Keras, Tensorflow, CNTK).\n\n* Same high level functions regardless of backend framework (i.e. preprocess, predict, process_response)\n\n* Provide a standard template which users can extend for their model's specific functionality.\n\n* Easy to use preprocessing functions that user can tweak depending on their model. \n\n* A model library (of filled out templates pre-setup) so user can deploy standard models easily onto Flask/Django.\n\n* Easy model exporting to ONNX, TF-Serving\n\n\n# Examples \n\n* [CheXNet Keras Deployment on Heroku using model agnostic loader](https://github.com/isaacmg/example_keras_heroku)\n\n* [ResNet50 Example](https://github.com/isaacmg/model_agnostic_prediction/blob/143af897897e675b5cfaff60b6d5212963f8cff8/examples2/example_keras.py#L28)\n\n* [S2I PyTorch example](https://github.com/isaacmg/s2i_pytorch_chex)\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisaacmg%2Fmodel_agnostic_prediction","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fisaacmg%2Fmodel_agnostic_prediction","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisaacmg%2Fmodel_agnostic_prediction/lists"}