问题标签 [mleap]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
0 回答
113 浏览

apache-spark - 如何解决 self._java_obj = _jvm().ml.combust.mleap.spark.SimpleSparkSerializer() TypeError: 'JavaPackage' object is not callable

我尝试在 EMR 集群上使用 mleap,但是当我尝试使用它时,我收到以下错误:

我从代码中加载 jar 文件

开始工作的脚本:

在我的代码里面:

在加载期间的 EMR 日志中,我看到:

我正在使用火花版本 2.4.5

知道为什么我会面临这个问题吗?

PS:如果我在 sagemaker 笔记本上使用 pyspark,我会收到相同的错误消息。

谢谢

0 投票
0 回答
80 浏览

python - 使用 MLEAP 序列化 Scala spark 模型并在 Python 环境中服务

是否可以在 scala 环境中训练模型,使用 mleap 对其进行序列化,然后在不同的 python 服务器上提供服务?我已经阅读了文档,但我仍然不清楚这些东西的兼容性如何

0 投票
0 回答
25 浏览

python - 如何在 Python-Mleap 中加载在 Scala-Mleap 中序列化的模型

我有一个在 Spark-Scala 中训练并由 Mleap 序列化的模型。现在我需要在 Python 中反序列化模型,因为我的网络服务器在 python 中。有可能做到吗?

0 投票
1 回答
32 浏览

java - 在同一个项目中同时使用 XGBoostPredictorClassification 和 XGBoostClassification

来自https://github.com/combust/mleap/pull/645,XGBoostPredictorClassification 仅通过预测概率来提高性能

我想知道我们是否在同一个项目中同时使用 XGBoostPredictorClassification 和 XGBoostClassification,因为现在我们有多个具有不同操作依赖性的包,有些依赖 XGBoostClassification 来支持叶预测,而有些则不。

例如,以下设置启用 XGBoostPredictorClassificationOp 作为默认操作

ml.combust.mleap.xgboost.ops = [ "ml.combust.mleap.xgboost.runtime.bundle.ops.XGBoostPredictorClassificationOp", "ml.combust.mleap.xgboost.runtime.bundle.ops.XGBoostRegressionOp" ]

以下启用 XGBoostClassificationOp 作为默认 OP

ml.combust.mleap.xgboost.ops = [ "ml.combust.mleap.xgboost.runtime.bundle.ops.XGBoostClassificationOp", "ml.combust.mleap.xgboost.runtime.bundle.ops.XGBoostRegressionOp" ]

我需要 XGBoostClassificationOp 来评估一些带有叶子的 xgboost 预测,同时使用 XGBoostPredictorClassificationOp 来评估其他 xgboost 预测以提高 xgb 性能

0 投票
0 回答
14 浏览

machine-learning - 带有自定义 sklearn 转换器的 MLeap 管道

我有一个 sklearn 管道来使用自定义转换器(例如使用FunctionTransformer)预处理数据。是否可以将它们序列化为 mleap 包?

MLeap 文档中阅读预告文本时,听起来好像 mleap 能够序列化我的 sklearn 管道,但我越深入细节,似乎只能序列化由预定义转换器集组成的管道。

有人可以确认不能将 mleap 与自定义转换器一起使用吗?阅读文档和源代码让我感到困惑。

0 投票
0 回答
13 浏览

serialization - mleap 支持 Spark ML Imputer

通过阅读mleap 文档,我可以看到Spark MLImputer 在受支持的转换器列表中。

但是,当我尝试在 pyspark 中序列化管道时,我得到了java.util.NoSuchElementException: key not found: org.apache.spark.ml.feature.ImputerModel.

这是否意味着不支持 Imputer?

在 mleap repo中找到了一张关于这个问题的票 - 这是否意味着只支持火花的 MLeap 版本Imputer(来自 的那个mleap-spark-extension)?如何从 pyspark 使用它?(在这种情况下,文档非常具有误导性,应该在某处提及)。

我的代码无法序列化管道(pyspark 3.0.3,mleap 0.19.0):