Skip to main content

TotoML Python SDK

This library is an SDK for Toto ML

This library provides the following key components:

Model Controller: the Model Controller is a wrapper for your models. It provides:

  • REST APIs to trigger the training, scoring and predictions
  • Event-based access to the same (training, scoring, predicting)

How to use it

In your main python file (e.g. app.py), import the ModelController and ControllerConfig classes, create a Flask app, instantiate your model (in this example ERCBOD()) and pass it to the ModelController constructor.

from totoml.controller import ModelController
from totoml.config import ControllerConfig

app = Flask(__name__)

model_controller = ModelController(ERCBOD(), app, ControllerConfig(enable_batch_predictions_events=False, enable_single_prediction_events=False))

In order for the Model Controller to work, you have to provide to it your model (in the example ERBOCD()): that's called here a Model Delegate.

ModelDelegate is an abstract class provided by this SDK (delegate.ModelDelegate). Your model has to implement its methods.
Those methods are:

get_name()
This method has to return the name of the model. This is very important because the name of the model is used for everything in TotoML (internal folders, registry, file storage, etc..), so the name has to be unique.

get_model_type()
Not very used for now. Should return the type of model: sklearn, tf, etc..
Has to be an instance of ModelType

predict() and predict_batch()
These methods perform predictions.

score()
This method scores the current champion model: it has to recalculate the metrics for the model and return them

train()
This method performs the training of the model and returns the trained model and all the associated files.
It's important to note that also any file containing training data or built features should be returned, so that Toto ML can grant the persistence of those files and make sure there is lineage.

Metadata

Release files for totoml 2.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for totoml 2.2.3
File Size Uploaded Provenance Actions
totoml-2.2.3.tar.gz 11.6 kB Without provenance Details for totoml-2.2.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for totoml 2.2.3
File Interpreter ABI Platform Actions
totoml-2.2.3-py3-none-any.whl Python 3 none any Details for totoml-2.2.3-py3-none-any.whl

Total release size: 26.5 kB

Release files / totoml-2.2.3.tar.gz

Download URL totoml-2.2.3.tar.gz
Size 11.6 kB
Tags Source
SHA-256 checksum
How to use checksums
e5bdd543be7e530842aab0fc42aa2fa0e28e6b99ac8596d6d67f4cb6845b857e
BLAKE2b-256 checksum
How to use checksums
ee31b4baebe3b7599cfae49ff57aefe24ff0cf88e6ef7e2d51861046f870f712
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.4

Release files / totoml-2.2.3-py3-none-any.whl

Download URL totoml-2.2.3-py3-none-any.whl
Size 14.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
412b021c4502355768e33a1902e4db1e4b5c85532ea05f434fc36ea0889b4809
BLAKE2b-256 checksum
How to use checksums
310601adfc08fd2114b258795838c849bea75ec1c07dc88f24bde7f86e8fbd5d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.4

Security for totoml 2.2.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page