Skip to main content

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_data(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_data)

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


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.4.post2.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

gravityai-0.1.4.post2-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file gravityai-0.1.4.post2.tar.gz.

File metadata

  • Download URL: gravityai-0.1.4.post2.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.6

File hashes

Hashes for gravityai-0.1.4.post2.tar.gz
Algorithm Hash digest
SHA256 aa7ee0f1abc611eff0932f3a23d9dfe22f4a6c6713497aeb22718cae6076288c
MD5 823842e4c23cf63fb35c7e643e4b77dd
BLAKE2b-256 9b52b70d4c371fbfd9b58b64558654051a7952d62ba8633e0a4ceeaaf03ecb0d

See more details on using hashes here.

File details

Details for the file gravityai-0.1.4.post2-py3-none-any.whl.

File metadata

File hashes

Hashes for gravityai-0.1.4.post2-py3-none-any.whl
Algorithm Hash digest
SHA256 6e024dc699c9847752951ffd19539801a65658d8c0add378788fed6163e034cc
MD5 7974bb58ec3ce3a5a27309d84ddf8b8d
BLAKE2b-256 396aeea3c93b3b4946480e2e135802cf837f988587aa8b111439a971161472d3

See more details on using hashes here.

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