用于Python的TotoML SDK

totoml的Python项目详细描述


TotoML Python SDK

这个库是Toto-ML的一个SDK

此库提供以下关键组件:

Model Controller:模型控制器是模型的包装器。它提供:

  • restapi来触发训练、评分和预测
  • 基于事件的访问(培训、评分、预测)

如何使用它

在你的主python文件中(例如。应用程序),导入ModelControllerControllerConfig类,创建一个Flask应用程序,实例化您的模型(在本例中是ERCBOD()),并将其传递给ModelController构造函数。在

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))

为了让模型控制器工作,您必须向它提供您的模型(在示例ERBOCD()):这里称为模型委托。

ModelDelegate是由SDK(delegate.ModelDelegate)提供的^{str1}$抽象类。你的模型必须实现它的方法。
这些方法是:

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.

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java出现编译错误,我不理解   java在gnu-trove库中是否有任何有序映射?   java Servlet应该有映射,但找不到Servlet   java时间和第二期显示1:10,而不是13:10   java Play Framework 1.2.7 Heroku更新崩溃   线程“main”java中的opencsv异常。lang.NoClassDefFoundError:org/apache/commons/lang3/ObjectUtils   selenium在java中隐藏警告消息   java使用ID引用将JSON实体反序列化为POJO   java无法在JRE 8中加载字体   一个线程中的异常/错误会使整个应用程序停止吗?   java访问重复子规则的元素标签;e、 g.用ANTLR解析(1,2,3)中的a   java如何从平移旋转中找到新坐标   使用HTML Java小程序托管jar文件存在安全问题   java如何按频率而不是字母顺序排列字符串数组   java清除bufferedReader和块以获得更多输入   java解密SAML2断言