Sign inSign up

weevenetwork/scikit-learn

By weevenetwork

•Updated over 3 years ago

Image
0

342

weevenetwork/scikit-learn repository overview

⁠Scikit Learn

NameScikit-Learn
Versionv1.0.0
GitHubweeve-modules/scikit-learn⁠
AuthorsJakub Grzelak

⁠Description

Use your pre-trained scikit-learn model with weeve modules. The model should be available to the module via a downloadable URL or it should be stored in the edge device local filesystem. The module will take input data and the compose a numpy array with data in the order assigned to the Ordered Labels environment variable. Later, the module will input that array into the model.

⁠Environment Variables

⁠Module Specific

The following module configurations can be provided in a data service designer section on weeve platform:

NameEnvironment VariablestypeDescription
Model Download URLMODEL_DOWNLOAD_URLstringIf model is stored online, then provide a download URL to parse the model. Leave empty field to search for the model in the local filesystem (see Model Filepath configuration field).
Model FilepathMODEL_FILEPATHstringIf model is stored in the local filesystem of the edge device or node (above field for the URL was left empty), then provide a path to the model file.
Ordered LabelsORDERED_LABELSstringInput data labels in the order of feeding into the model. Later a numpy array will be created to feed that data into the model in the given order.
Output LabelOUTPUT_LABELstringThe output label at which data is dispatched.
⁠Set by the weeve Agent on the edge-node

Other features required for establishing the inter-container communication between modules in a data service are set by weeve agent.

Environment VariablestypeDescription
MODULE_NAMEstringName of the module
MODULE_TYPEstringType of the module (Input, Processing, Output)
EGRESS_URLSstringHTTP ReST endpoints for the next module
INGRESS_HOSTstringHost to which data will be received
INGRESS_PORTstringPort to which data will be received

⁠Dependencies

bottle
requests
scikit-learn

⁠Input

Input to this module is:

  • JSON body single object, example:
{
    "temperature": 12,
    "volume": 1.3,
    "pressure": 0.32
}
  • array of JSON body objects, example:
[
    {
        "temperature": 12,
        "volume": 1.3,
        "pressure": 0.32
    },
    {
        "temperature": 13,
        "volume": 2.1,
        "pressure": 0.34
    }
]

⁠Output

Output of this module is

  • JSON body single object, example:
{
    "prediction": 14.323
}
  • array of JSON body objects, example:
[
    {
        "prediction": 14.323
    },
    {
        "prediction": 13.45
    }
]

Tag summary

Content type

Image

Digest

sha256:0026bd50f…

Size

175.7 MB

Last updated

over 3 years ago

docker pull weevenetwork/scikit-learn:v1.0.1