Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve json serde error in evalMetFromJson #380

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
code check fix
  • Loading branch information
gerashegalov committed Aug 7, 2019
commit c1dd0f534c69a3a218d7876ed118b3f5d3af6236
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,9 @@ case object ModelSelectorSummary {
*/
private[selector] def evalMetFromJson(className: String, json: String): Try[EvaluationMetrics] = {
def error(c: Class[_], t: Throwable): Try[MultiMetrics] = Failure[MultiMetrics] {
new IllegalArgumentException(s"Could not extract metrics of type " +
s"${classOf[MultiMetrics]} from:\n$json", t)
new IllegalArgumentException(
s"""Could not extract metrics of type ${classOf[MultiMetrics]}
|from:$json""".stripMargin, t)
}
ReflectionUtils.classForName(className) match {
case n if n == classOf[MultiMetrics] =>
Expand Down