treelite icon indicating copy to clipboard operation
treelite copied to clipboard

Documentation for library writers

Open hcho3 opened this issue 1 year ago • 1 comments

  • [x] #503
  • [ ] Write a tutorial for integrating Treelite into a C++ project (using CMake).
  • [ ] Write a tutorial for integrating Treelite into a Python package. In particular, library writers should be encouraged to produce treelite.Model object, rather than a custom object with a native Treelite handle.

hcho3 avatar Mar 31 '23 16:03 hcho3

Currently, Treelite object is a dumb structure, which library writers are expected to fill correctly. It's easy to get it wrong, e.g. by forgetting to fill a field or violating a constraint. See https://github.com/dmlc/treelite/issues/474 for a recent incident. We need better API design that makes it easy to correctly build tree models. Validation should be built-in.

Credit @RAMitchell

hcho3 avatar Apr 25 '23 07:04 hcho3