module cli.make_ml_upload

Short summary

module lightmlrestapi.cli.make_ml_upload

Creates and runs an Falcon application.

source on GitHub

Functions

function

truncated documentation

upload_model

Uplaods a machine learned models to a REST API defined by MLStoragePost.

Documentation

Creates and runs an Falcon application.

source on GitHub

lightmlrestapi.cli.make_ml_upload.upload_model(login='', pwd='', name='', pyfile='', data='', url='127.0.0.1:8081', timeout=50, fLOG=<built-in function print>)

Uplaods a machine learned models to a REST API defined by MLStoragePost.

Parameters:
  • login – user login

  • pwd – user pasword

  • name – name of the model, should be unique and not already used

  • pyfile – python file which computes the prediction, the file must follows the specification defined in Templates

  • data – files to upload

  • url – url of the REST API

  • timeout – timeout

  • fLOG – logging function

Uploads a machine model

Uploads a machine learned model to a REST API created with lightmlrestapi. The code of this command line is equivalent to:

from lightmlrestapi.netrest import submit_rest_request, json_upload_model
req = json_upload_model(name=name, pyfile=pyfile, data=data)
submit_rest_request(req, login=login, pwd=pwd, url=url)

<<<

python -m lightmlrestapi upload_model --help

>>>

usage: upload_model [-h] [-l LOGIN] [--pwd PWD] [-n NAME] [-p PYFILE]
                    [-d DATA] [--url URL] [-t TIMEOUT]

Uplaods a machine learned models to a REST API defined by
:class:`MLStoragePost <lightmlrestapi.mlapp.mlstorage_rest.MLStoragePost>`.

optional arguments:
  -h, --help            show this help message and exit
  -l LOGIN, --login LOGIN
                        user login (default: )
  --pwd PWD             user pasword (default: )
  -n NAME, --name NAME  name of the model, should be unique and not already
                        used (default: )
  -p PYFILE, --pyfile PYFILE
                        python file which computes the prediction, the file
                        must follows the specification defined in
                        :ref:`l-template-ml` (default: )
  -d DATA, --data DATA  files to upload (default: )
  --url URL             url of the REST API (default: 127.0.0.1:8081)
  -t TIMEOUT, --timeout TIMEOUT
                        timeout (default: 50)

source on GitHub