MLeap变压器可能有更多输入吗

时间:2019-06-08 18:33:31

标签: scala mleap

我有一个mleap Transformer,它必须有大约14个输入才能进行转换。我尝试创建核心模型,但是当我增加输入变量的数量时看到错误,否则它不会创建错误。

package com.mlmodel.mleap_ext.test_sob


import ml.combust.mleap.core.types.NodeShape
import ml.combust.mleap.runtime.frame.{SimpleTransformer, MultiTransformer, Transformer}
import ml.combust.mleap.runtime.function.UserDefinedFunction

case class TestSob(override val uid: String = Transformer.uniqueName(opname),
                            override val shape: NodeShape,
                            override val model: TestSobModel
                           ) extends MultiTransformer{
  override val exec: UserDefinedFunction = (inputA: Seq[String],inputB: Seq[Int],inputC: Seq[String],inputD: Seq[Int],inputE: Int
                                            ,inputF: Int,inputG: Int)
  => model.apply(inputA.toArray,
      inputB.toArray,
      inputC.toArray,
      inputD.toArray,
      inputE,
      inputF,
      inputG
    )

  override def equals(that: Any): Boolean = true

}

显示类型不匹配

Error:(13, 3) type mismatch;
 found   : (Seq[String], Seq[Int], Seq[String], Seq[Int], Int, Int, Int) => (Int, Int, Int, Int)
 required: ml.combust.mleap.runtime.function.UserDefinedFunction
  => model(inputA.toArray,

有什么建议需要做吗?mleap的新手。

0 个答案:

没有答案