如何部署仅包含python函数的机器学习模型

2024-06-16 11:56:56 发布

您现在位置:Python中文网/ 问答频道 /正文

我需要在任何环境中部署我的机器学习模型,以便向管理层演示。我的模型只包含函数而不包含类,即

a.py
def function1
def function2

b.py
def function3
def function4


Function_Calls.py
z = b.function4 (data processing)
u = b.function3 (test train data)
a.function1(z) (Model calling)
a.function2(u) (Model predictions)

在这种情况下如何部署模型

预期:我的模型应该从文件中获取输入数据/测试数据,然后根据模型进行预测


Tags: 函数py模型机器datamodel环境部署