modelship


Namemodelship JSON
Version 0.2.0 PyPI version JSON
download
home_pageNone
SummaryShip machine learning models in minutes, not months
upload_time2025-10-14 22:40:02
maintainerNone
docs_urlNone
authorNone
requires_python<3.14,>=3.10
licenseApache-2.0
keywords deployment machine-learning onnx webassembly
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 🚢 modelship

> Ship machine learning models in minutes, not months

[![PyPI](https://img.shields.io/pypi/v/modelship.svg)](https://pypi.org/project/modelship/)
[![Python Versions](https://img.shields.io/pypi/pyversions/modelship?logo=python&logoColor=white)](https://pypi.org/project/modelship/)
[![CI/CD](https://github.com/datalpia/modelship/actions/workflows/ci-cd.yml/badge.svg)](https://github.com/datalpia/modelship/actions/workflows/ci-cd.yml)
[![License](https://img.shields.io/github/license/datalpia/modelship)](https://github.com/datalpia/modelship/blob/main/LICENSE)

`modelship` is a utility application to ease wrapping and deploying machine learning models
by autogenerating applications, leveraging modern standards such as ONNX and WebAssembly.

## Demo

Examples of static web applications generated with `modelship` from ONNX models:

- `housing`: housing price prediction model (regression)
    - Live: https://datalpia.github.io/modelship/demo/housing/
    - Source: [demo/housing](demo/housing)
- `sentiment`: movie review sentiment analysis (binary classification)
    - Live: https://datalpia.github.io/modelship/demo/sentiment/
    - Source: [demo/sentiment](demo/sentiment)

## Features

- ONNX model support
- Generate a static web application with autogenerated form

## Installation

Using `pip` (or any other Python package manager):

```bash
pip install modelship
```

Using `uvx`:

```bash
uvx modelship
```

## Usage

### Model metadata

Every model must be described with some basic metadata for conversions to work properly.

Here is the YAML schema:

```yaml
name: Model Name
description: Model description
inputs:
  float_input:
    name: Float Input Name
    type: float32
    shape: [null, 1]
    min: 10
    max: 100
    step: 1
    default: 50
  string_input:
    name: String Input Name
    type: string
    shape: [null]
outputs:
  float_output:
    name: Float Output Name
    type: float32
    shape: [null, 1]
  string_output:
    name: String Output Name
    type: string
    shape: [null]
```

Input fields:
- `name`: `str`
- `type`: `Literal["float32", "string"]`
- `shape`: `list[int | None]`
- (optional) `min`: `float`
- (optional) `max`: `float`
- (optional) `step`: `float`
- (optional) `defaut`: `float | str`

Output fields:
- `name`: `str`
- `type`: `Literal["float32", "string"]`
- `shape`: `list[int | None]`

### Static web application generation

Provide an ONNX model with its YAML metadata description, and `modelship`
will generate a static web application with an autogenerated HTML form,
performing model inference using ONNX Runtime Web (WebAssembly):

```bash
$ modelship static --output dist --metadata model/metadata.yml model/model.onnx
```

The resulting static application in `dist` can now be deployed on any static
hosting provider (GitHub Pages, GitLab Pages, Cloudflare Pages, S3, Vercel)!

## License

Licensed under [Apache License 2.0](LICENSE)

Copyright (c) 2025 - present Romain Clement / Datalpia

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "modelship",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<3.14,>=3.10",
    "maintainer_email": null,
    "keywords": "deployment, machine-learning, onnx, webassembly",
    "author": null,
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/ed/51/00dcdf5fdd884bafea42a09d4caaf35ff08b74334307d81cd943f9bb738d/modelship-0.2.0.tar.gz",
    "platform": null,
    "description": "# \ud83d\udea2 modelship\n\n> Ship machine learning models in minutes, not months\n\n[![PyPI](https://img.shields.io/pypi/v/modelship.svg)](https://pypi.org/project/modelship/)\n[![Python Versions](https://img.shields.io/pypi/pyversions/modelship?logo=python&logoColor=white)](https://pypi.org/project/modelship/)\n[![CI/CD](https://github.com/datalpia/modelship/actions/workflows/ci-cd.yml/badge.svg)](https://github.com/datalpia/modelship/actions/workflows/ci-cd.yml)\n[![License](https://img.shields.io/github/license/datalpia/modelship)](https://github.com/datalpia/modelship/blob/main/LICENSE)\n\n`modelship` is a utility application to ease wrapping and deploying machine learning models\nby autogenerating applications, leveraging modern standards such as ONNX and WebAssembly.\n\n## Demo\n\nExamples of static web applications generated with `modelship` from ONNX models:\n\n- `housing`: housing price prediction model (regression)\n    - Live: https://datalpia.github.io/modelship/demo/housing/\n    - Source: [demo/housing](demo/housing)\n- `sentiment`: movie review sentiment analysis (binary classification)\n    - Live: https://datalpia.github.io/modelship/demo/sentiment/\n    - Source: [demo/sentiment](demo/sentiment)\n\n## Features\n\n- ONNX model support\n- Generate a static web application with autogenerated form\n\n## Installation\n\nUsing `pip` (or any other Python package manager):\n\n```bash\npip install modelship\n```\n\nUsing `uvx`:\n\n```bash\nuvx modelship\n```\n\n## Usage\n\n### Model metadata\n\nEvery model must be described with some basic metadata for conversions to work properly.\n\nHere is the YAML schema:\n\n```yaml\nname: Model Name\ndescription: Model description\ninputs:\n  float_input:\n    name: Float Input Name\n    type: float32\n    shape: [null, 1]\n    min: 10\n    max: 100\n    step: 1\n    default: 50\n  string_input:\n    name: String Input Name\n    type: string\n    shape: [null]\noutputs:\n  float_output:\n    name: Float Output Name\n    type: float32\n    shape: [null, 1]\n  string_output:\n    name: String Output Name\n    type: string\n    shape: [null]\n```\n\nInput fields:\n- `name`: `str`\n- `type`: `Literal[\"float32\", \"string\"]`\n- `shape`: `list[int | None]`\n- (optional) `min`: `float`\n- (optional) `max`: `float`\n- (optional) `step`: `float`\n- (optional) `defaut`: `float | str`\n\nOutput fields:\n- `name`: `str`\n- `type`: `Literal[\"float32\", \"string\"]`\n- `shape`: `list[int | None]`\n\n### Static web application generation\n\nProvide an ONNX model with its YAML metadata description, and `modelship`\nwill generate a static web application with an autogenerated HTML form,\nperforming model inference using ONNX Runtime Web (WebAssembly):\n\n```bash\n$ modelship static --output dist --metadata model/metadata.yml model/model.onnx\n```\n\nThe resulting static application in `dist` can now be deployed on any static\nhosting provider (GitHub Pages, GitLab Pages, Cloudflare Pages, S3, Vercel)!\n\n## License\n\nLicensed under [Apache License 2.0](LICENSE)\n\nCopyright (c) 2025 - present Romain Clement / Datalpia\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "Ship machine learning models in minutes, not months",
    "version": "0.2.0",
    "project_urls": null,
    "split_keywords": [
        "deployment",
        " machine-learning",
        " onnx",
        " webassembly"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "33587ea068f4092cc3d2131577471b68db7bce87c79bc4403d477e3133294266",
                "md5": "b9a6106b65a302b1e00c877428ccc126",
                "sha256": "74783a0a32241188175e9af40d0c9b296923ac73f31182315b0f922e5e2f19eb"
            },
            "downloads": -1,
            "filename": "modelship-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b9a6106b65a302b1e00c877428ccc126",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.14,>=3.10",
            "size": 6109951,
            "upload_time": "2025-10-14T22:40:00",
            "upload_time_iso_8601": "2025-10-14T22:40:00.136877Z",
            "url": "https://files.pythonhosted.org/packages/33/58/7ea068f4092cc3d2131577471b68db7bce87c79bc4403d477e3133294266/modelship-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "ed5100dcdf5fdd884bafea42a09d4caaf35ff08b74334307d81cd943f9bb738d",
                "md5": "f29b35a66204ee6fb5df6eb247845571",
                "sha256": "2c67d93440726ac8bf841a1f679e0fb0486f75a5a93ed6c46fdbf8cf5f147c16"
            },
            "downloads": -1,
            "filename": "modelship-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "f29b35a66204ee6fb5df6eb247845571",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.14,>=3.10",
            "size": 6600329,
            "upload_time": "2025-10-14T22:40:02",
            "upload_time_iso_8601": "2025-10-14T22:40:02.372561Z",
            "url": "https://files.pythonhosted.org/packages/ed/51/00dcdf5fdd884bafea42a09d4caaf35ff08b74334307d81cd943f9bb738d/modelship-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-14 22:40:02",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "modelship"
}
        
Elapsed time: 0.51213s