Skip to main content

No project description provided

Project description

InferIO-X

Inference I/O Extended

Python Code style: black Ruff pre-commit Conventional Commits

Installation

$ pip install inferio-x==0.1.0

Usage

from pydantic import BaseModel
from inferio import Service, Endpoint, Method


class PredictPayload(BaseModel):
    name: str
    age: int


class Predictor:
    def __init__(self, model_f: str) -> None:
        self.model_f = model_f

    def predict(self, payload: PredictPayload) -> dict: ...


if __name__ == "__main__":
    predictor = Predictor(model_f="model.pth")
    service = Service(
    endpoints=[
        Endpoint(path="/", handler=predictor.predict, methods=[Method.POST]),
    ])
    service.run()

Tests

To run the tests, use the following command:

$ poetry run pytest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

inferio_x-0.1.0.tar.gz (5.9 kB view hashes)

Uploaded Source

Built Distribution

inferio_x-0.1.0-py3-none-any.whl (7.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page