Machine learning model contracts with machine learning infrastructure
Project description
Twinn-ml-interface
Twinn-ml-interface is a Python package for data contracts between machine learning code and infrastructure.
Author: Royal HaskoningDHV
Installation
The easiest way to install is package is using pip:
pip install twinn-ml-interface
Model Interface
Properties
model_type_name
An unique name for each model class.
model_category
Whether the model outputs anomalies, predictions or actuals. This determines the format in which the results are expected.
performance_value
The model is expected to calculate some metric value after training to indicate the model performance.
train_data_config
N/A for most cases.
target_tag
For most cases, return a UnitTagLiteral containing the unit code and tagname of the target of the model.
data_config
For most cases, return a list of UnitTagLiterals containing all the data that is used for training the model. The training window can be passed at runtime.
result_tag
For most cases, return a UnitTagLiteral of the result unit and tag of the model.
unit_properties_template
N/A for most cases.
unit_hierarchy_template
N/A for most cases.
train_window_finder_config_template
N/A for most cases.
Training
For training, the functions of the model interface are called in the following order:
- initialize
- preprocess
- validate_input_data
- train
- dump
Prediction
For prediction, the functions of the model interface are called in the following order:
- load
- predict
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
Built Distribution
Hashes for twinn-ml-interface-0.2.10.dev0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7acdff63031e0210c576196bb4264da1b2fb90e898176e5db00d9abf7594bf9c |
|
MD5 | 9b7c280af83296e5c0049a386a32388b |
|
BLAKE2b-256 | 4e6438909c557153702e068e26ff25577a49dd7df3f8f38fb0acc89159875717 |
Hashes for twinn_ml_interface-0.2.10.dev0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 19de50b36d727d933c88f8abac972294e7b203d14dad2c36dd5fdea2ee2388ce |
|
MD5 | fec0c2ce0307dd7eb970115cd308cdb6 |
|
BLAKE2b-256 | c1ab84edbe23e566c727b5dd91dcbee9dbcd3a28a9e4c91491f3be3c8363331a |