MLHub

command module
v0.0.3-test2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2024 License: MIT Imports: 23 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

MLHub

build status go report card godoc

MLHUb for CHESS

API usage
# upload ML model
curl http://localhost:port/upload \
    -v -X POST \
    -H "Authorization: bearer $token" \
    -F 'file=@/path/model.tar.gz' \
    -F 'model=model' -F 'type=TensorFlow' -F 'backend=GoFake'

# list current models
curl http://localhost:port/models

# download specific model
curl http://localhost:port/models/<model_name>

# predict results for given model for provided file.json input
curl http://localhost:port/predict \
    -v -X POST \
    -H "Authorization: bearer $token" \
    -H "Accept: applicatin/json" \
    -H "Content-type: application/json" \
    -d@/path/input.json

where input.json has the form:
{"input":[1,2,3], "model": "model", "type": "TensorFlow", "backend": "GoFake"}

# upload MNIST model
curl http://localhost:port/upload \
    -v -X POST -H "Authorization: bearer $token" \
    -F 'file=@./mnist.tar.gz' \
    -F 'model=mnist' \
    -F 'type=TensorFlow' \
    -F 'backend=TFaaS'

# predict MNIST image
curl http://localhost:port/predict \
    -v -X POST -H "Authorization: bearer $token" \
    -F 'image=@./img1.png' \
    -F 'model=mnist' \
    -F 'type=TensorFlow' \
    -F 'backend=TensorFlow'

# delete existing model
curl http://localhost:port/delete
    -v -X DELETE \
    -H "Authorization: bearer $token" \
    -H "Content-type: application/json" \
    -d@/path/model.json

where model.json has the form:
{"model": "model", "type": "TensorFlow", "version": "latest"}

# get documentation
curl http://localhost:port/docs/docs

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL