Skip to main content

AxonServe

Simple package for ML Model serving with gRPC

Installation

$ pip install axon_serve

Usage

Server

from axon_serve import PredictionService, GRPCService

# implement PredictionService class
class TestPredictionService(PredictionService):
    def __init__(self)
        super().__init__()

	# override predict method with your custom prediction logic
	# model_input and return values must be numpy arrays
	# params is a dict with optional kwargs for model
    def predict(self, model_input, params):

        print("model_input: ", model_input.shape)
        print("params: ", params)

        return model_input

if __name__ == "__main__":
	# instantiate your prediction service
	test_prediction_service = TestPredictionService()

	# register it with GRPCService providing the port
	service = GRPCService(test_prediction_service, port=5005)

	# start the server
	service.start()

Client

from axon_serve import ModelServeClient

# instantiate the client providing host and port
serve_client = ModelServeClient(host="localhost", port=5005)

model_input = np.array([1, 2, 3])
params = {"test_param": true}

# call predict method to send request to server
result = serve_client.predict(model_input, params)

print(result.shape)

TODOs

  • add tests
  • add support for secure channels
  • add support for arbitrary tensor serialization

Metadata

Release files for axon-serve 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for axon-serve 0.0.1
File Size Uploaded Provenance
axon_serve-0.0.1.tar.gz 6.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for axon-serve 0.0.1
File Interpreter ABI Platform
axon_serve-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 15.9 kB

Release files / axon_serve-0.0.1.tar.gz

Download URL axon_serve-0.0.1.tar.gz
Size 6.6 kB
Tags Source
SHA-256 checksum
How to use checksums
8a548754e62b0f5d2948724a51c2cca7fda0a9ae211d1dd2a38ee6bf8333378a
BLAKE2b-256 checksum
How to use checksums
57fcda461686f3521013d8c915372c414e1689005e97989c222e8784773720c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / axon_serve-0.0.1-py3-none-any.whl

Download URL axon_serve-0.0.1-py3-none-any.whl
Size 9.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
378ba057c427012d43cc003d6eeafbab796232843d938f53bac0495f192fe04f
BLAKE2b-256 checksum
How to use checksums
149921dc67db9abefa743ca88b063bb46387903d7c3b3814f6ce46f34240a305
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Security for axon-serve 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page