Skip to content
This repository has been archived by the owner on Jun 24, 2020. It is now read-only.

hcho3/treelite-java-example

Repository files navigation

Deploying compiled tree model to Java application using Treelite

This is a short example of how you can deploy decision tree models to a Java-based serving system using Treelite.

  1. Checkout this repository with
git clone --recursive https://github.com/hcho3/treelite-java-example
  1. Compile Treelite by running
mkdir treelite/build
cd treelite/build
cmake ..
make -j4
cd ../..
  1. Run the Python script gencode.py to compile mushroom.model into a collection of Java source files. The collection will be saved to a directory named model/.
  2. Now run mvn package inside the model/ directory.
  3. Run javac -cp model/target/model-1.0-SNAPSHOT.jar *.java to compile PredictWrapper.java and Test.java.
  4. Run Test by typing java -cp "${PWD}:model/target/model-1.0-SNAPSHOT.jar" Test.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published