The gravity-ai.com helper package
Project description
Gravity-ai.com
This package includes helper scripts for interfacing your machine learning code with the Gravity-ai.com containerization code.
To install from pypi:
pip install gravityai
To install from source:
python3 setup.py install
Example Implementation Code
from gravityai import gravityai as grav
# the following function is a callback (defined by you), that may be
# async or synchronous and that may be called multiple times, to
# transform input data against an algorithm or model (or whatever you want)
# If an error is experienced, return an error string message, or throw an exception.
def process(dataPath, outPath):
# TODO:
# Read data in from dataPath
# Transform Data via model
# Write data out to outPath
# Return None if everything went ok.
# return an error string if there was a problem.
# TODO Initialize models, etc. before calling wait_for_requests.
grav.wait_for_requests(process)
Building a new Version
To build a new version for pypi (only we do that):
python3 -m pip install --user --upgrade setuptools wheel
python3 -m pip install --user --upgrade twine
python3 setup.py sdist bdist_wheel
python3 -m twine upload --repository pypi dist/*
Use the saved credentials, and remember the username is __token__
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
gravityai-0.1.1.tar.gz
(5.6 kB
view hashes)
Built Distribution
Close
Hashes for gravityai-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b69408ab098ad5e80da3525fa21825d732f2089ad1fa751d0c5743e55bfa8bbb |
|
MD5 | fff9b7980b2fc5054956d9f0e367bef7 |
|
BLAKE2b-256 | 0f20712ce6be232cb1ce9e3856db7cea7905da314d6b40e61fb85f2f884f372b |