PyTannic
Python bindings for the Tannic framework.
PyTannic is a Python library for interacting with the Tannic-NN framework. It provides utilities for serializing PyTorch models, handling metadata, and sending/receiving tensor data over TCP in a format compatible with Tannic-NN.
Features
- Serialize
torch.nn.Moduleparameters. - Network client for sending/receiving serialized tensors.
Installation
pip install pytannic
Quick Start
Write trained modules to files to load them from the C++ Tannic framework.
from pytannic.torch.modules import write
from torch.nn import Linear
module = Linear(10, 5)
write(module, "linear_model")
PyTannic allows you to send serialized PyTorch tensors to a Tannic server and receive responses.
tensor = torch.randn(3, 3)
with Client("127.0.0.1", 8080) as client:
client.send(serialize(tensor)
data = client.receive()
result = deserialize(data)
print("Sent tensor:")
print(tensor)
print("\nReceived tensor:")
print(response)
This will allow you to easily create inference servers in C++. For a complete MNIST server example, see the mnist-server repository.
License
Tannic is licensed under the Apache License, Version 2.0. See the LICENSE file for details.
Metadata
Release files for pytannic 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pytannic-0.1.5.tar.gz | 12.0 kB | Without provenance | Details for pytannic-0.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pytannic-0.1.5-py3-none-any.whl | Python 3 | none | any | Details for pytannic-0.1.5-py3-none-any.whl |
Total release size: 28.2 kB
Release files / pytannic-0.1.5.tar.gz
| Download URL | pytannic-0.1.5.tar.gz |
|---|---|
| Size | 12.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e9775975085fac2f46372a64a9580fc65b00d1c983f796b07b8018c7a5ffe290
|
|
BLAKE2b-256 checksum How to use checksums |
aa8d6dc93a67fc9aa37fb09d97b0d29aa7db557990e81947f925830158061bfd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.1 CPython/3.12.1 Linux/6.17.0-1020-azure
|
Release files / pytannic-0.1.5-py3-none-any.whl
| Download URL | pytannic-0.1.5-py3-none-any.whl |
|---|---|
| Size | 16.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
eb95bc4ff8c6903fbce4da496d2dd4f9c0f18da969ded62093383caf5a34d06a
|
|
BLAKE2b-256 checksum How to use checksums |
3971e861ee3028f40028158ccd8a1e2eb83e54cef6638dd58cd06b3bce9a0aeb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.1 CPython/3.12.1 Linux/6.17.0-1020-azure
|
Security for pytannic 0.1.5
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.