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

Cloud not load xgboost model into spring boot service #785

Open
BDon-Tan opened this issue Oct 17, 2021 · 4 comments
Open

Cloud not load xgboost model into spring boot service #785

BDon-Tan opened this issue Oct 17, 2021 · 4 comments

Comments

@BDon-Tan
Copy link

hi,
I have serialized a xgboost-spark pipeline model in bundle format, but I could not load it into spring boot service because of "xgboost.classifier" op is not supported. I found that mleap-xgboost-runtime is released now. It seems loading xgboost-spark pipeline should be accessible. Would you help me about how to add dependency of mleap-xgboost-runtime into mleap-spring-boot ? Or update the docker with xgboost model support?

@jsleight
Copy link
Contributor

I think this should be a matter of adding mleap-xgboost-runtime into your jvm dependency management system? I.e., add it as a dependency in your pom.xml, build.sbt, or build.gradle file depending on which build system you are using.

@zgcheng82725411
Copy link

hi, I have add it as a dependency in our build.sbt, but it does not work,
project mleap-runtime build.sbt:

import ml.combust.mleap.{Dependencies, Common}
Common.defaultMleapSettings
Common.defaultMleapXgboostSparkSettings
Dependencies.runtime(scalaVersion)

The error is “Exception in thread "main" java.util.NoSuchElementException: key not found: xgboost.classifier
at scala.collection.MapLike.default(MapLike.scala:235)”

1 similar comment
@zgcheng82725411
Copy link

hi, I have add it as a dependency in our build.sbt, but it does not work,
project mleap-runtime build.sbt:

import ml.combust.mleap.{Dependencies, Common}
Common.defaultMleapSettings
Common.defaultMleapXgboostSparkSettings
Dependencies.runtime(scalaVersion)

The error is “Exception in thread "main" java.util.NoSuchElementException: key not found: xgboost.classifier
at scala.collection.MapLike.default(MapLike.scala:235)”

@jsleight
Copy link
Contributor

jsleight commented Jan 4, 2022

Can you provide a more complete stacktrace?

My only thought right now is that the mleap runtime can't find the correct op used to load the bundle. This could occur if you have a resources.conf file in your project and aren't having mleap's reference.conf appended to your project's reference.conf. E.g., if you are using sbt-assembly plugin, then you might need

assemblyMergeStrategy in assembly := {
  case "reference.conf" => MergeStrategy.concat
  case _ => MergeStrategy.first
}

But a complete stacktrace will help to confirm/deny this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants