ai.salmonbrain.ruleofthumb.ConfigUtils.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ruleofthumb_3.0.0_2.12 Show documentation
Show all versions of ruleofthumb_3.0.0_2.12 Show documentation
Apache Spark based framework for analysis A/B experiments
The newest version!
package ai.salmonbrain.ruleofthumb
import com.fasterxml.jackson.databind.ObjectMapper
import com.fasterxml.jackson.dataformat.yaml.YAMLFactory
import com.fasterxml.jackson.module.scala.DefaultScalaModule
import java.io.File
object ConfigUtils {
private val factory = new YAMLFactory()
private val mapper = new ObjectMapper(factory)
mapper.registerModule(DefaultScalaModule)
def readConfig(path: String): Config = {
mapper.readValue(new File(path), classOf[Config])
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy