Ashwin Padhy
Ashwin Padhy

Reputation: 111

Is it possible to have more inputs for MLeap Transformer

I have a mleap Transformer which has to have around 14 inputs for transformation.I tried to create core model however i see the error when i increase the number of input variable else its does not create error.

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

}

Its showing type mismatch

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,

Is there any suggestions what needs to be done.New to mleap.

Upvotes: 1

Views: 66

Answers (0)

Related Questions