我创建了自己的自定义转换器(将字符串添加到列值的简单模型)来测试Mleap序列化,但是在为Mleap和Spark序列化编写Op文件时,我不能指定转换器的名称。
我的reference.conf文件如下所示
my.domain.mleap.spark.ops = ["spark_side.CustomTransformerOp"]
// include the custom transformers ops we have defined to the default Spark registries
ml.combust.mleap.spark.registry.v20.ops += my.domain.mleap.spark.ops
ml.combust.mleap.spark.registry.v21.ops += my.domain.mleap.spark.ops
ml.combust.mleap.spark.registry.v22.ops += my.domain.mleap.spark.ops
ml.combust.mleap.spark.registry.v23.ops += my.domain.mleap.spark.ops
my.domain.mleap.ops = ["mleap_side.CustomTransformerOp"]
// include the custom transformers we have defined to the default MLeap registry
ml.combust.mleap.registry.default.ops += my.domain.mleap.ops当我在我的数据集中只运行该阶段的管道时,它工作得很好,如果我将opName设置为某个字符串或某个Bundle.BuiltinOps成员,我甚至能够保存管道。
如果我输入一些字符串,错误弹出:"unable to find key : thatString",如果我使用另一个成员,错误说明它无法从该成员中找到键(这是完全合理的,我理解为什么会发生这种情况)。
我的问题是,在Op文件中声明opName时,如何使转换器的名称可用。
(如果有人能找到Hollin Wilkins,那就太棒了:D)
发布于 2019-08-07 06:45:24
我也有同样的问题。根据此链接
https://github.com/combust/mleap/wiki/Adding-an-MLeap-Spark-Transformer
您需要自己将其添加到ml.combust.bundle.dsl.Bundle.BuiltinOps中
在第3节中,为MLeap实现Bundle.ML序列化
注意:如果实现一个普通的Spark transformer,请确保将opName添加到ml.combust.bundle.dsl.Bundle.BuiltinOps中。
https://stackoverflow.com/questions/49740281
复制相似问题