1

我有一个 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的新手。

4

0 回答 0