Skip to content

Instantly share code, notes, and snippets.

View mostafam's full-sized avatar

Mostafa Majidpour mostafam

View GitHub Profile
@mostafam
mostafam / scoreREPL.scala
Created August 13, 2020 08:58
Read MLeap and score the LeapFrame
scala> import ml.combust.bundle.BundleFile
scala> import ml.combust.mleap.runtime.MleapSupport._
scala> import resource._
scala> import ml.combust.mleap.core.types._
scala> import ml.combust.mleap.runtime.frame.{DefaultLeapFrame, Row}
// creating LeapFrame equivalent to the DataFrame above
scala> val schema = StructType(StructField("email", ScalarType.String),
| StructField("first_name", ScalarType.String)).get