No project description provided
Project description
deepmux-python
deepmux is a PaaS solution to effortlessly deploy trained machine learning models on the cloud and generate predictions without setting up any hardware.
At the moment only pytorch models are supported.
Installation
pip install deepmux
Getting token
You can get your deepmux token at https://app.deepmux.com/api_key.
Quickstart
Creating model
Initialize a model and upload it to deepmux servers
from deepmux import create_model
model = create_model(<YOUR PYTORCH MODEL>, <MODEL_NAME>, <SHAPE OF INPUT DATA>, <SHAPE OF OUTPUT DATA>, <TOKEN>)
Getting model by name
On your production server you can simply get model by it's name.
from deepmux import get_model
model = get_model(<MODEL NAME>, <TOKEN>)
Executing model on your import
After initializing your model with create_model
or get_model
you can run the model. All computations will be performed on deepmux infrastucture.
output = model.run(<YOUR INPUT>)
Complete example on a model from PyTorch Hub
import numpy as np
import torch
from deepmux import create_model
token = "<YOUR_TOKEN>"
pytorch_model = torch.hub.load('pytorch/vision:v0.5.0', 'squeezenet1_0', pretrained=True)
deepmux_model = create_model(
pytorch_model,
model_name='my_model',
input_shape=[1, 3, 227, 227],
output_shape=[1, 1000],
token=token)
dummy_input = np.zeros([1, 3, 227, 227], dtype=np.float32)
output = deepmux_model.run(dummy_input)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file deepmux-0.4.1.tar.gz
.
File metadata
- Download URL: deepmux-0.4.1.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4c387c39be695aad07de54bc60a1645e8c0dcef03cc78250e7d720b8fe7dec8 |
|
MD5 | 53163b79718eb553d7cb94531b5d22e5 |
|
BLAKE2b-256 | 41ae271f9dfc866861e040bb39aa9a8251a7f9e55059f01d7f19639059c833ba |
File details
Details for the file deepmux-0.4.1-py3-none-any.whl
.
File metadata
- Download URL: deepmux-0.4.1-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a859e81bbdfb8b12ac2ded767f81d24320dfce87aafe75a51797c80e5d65128 |
|
MD5 | 00757863cd28ca85acd261dc69030caa |
|
BLAKE2b-256 | c1988df506b93d2cc8dc50c6e0f5cd4465a0af66f6d1493ba522f269eb4cffe6 |