Skip to content

Commit

Permalink
Doc fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hcho3 committed Oct 25, 2023
1 parent 721191d commit dfd1565
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
12 changes: 6 additions & 6 deletions docs/treelite-api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ Scikit-learn importer
.. automodule:: treelite.sklearn
:members:

The Model object
----------------

.. automodule:: treelite
:members:

Model builder
-------------

.. automodule:: treelite.model_builder
:members:

Model class
-----------

.. autoclass:: treelite.Model
:members:
5 changes: 4 additions & 1 deletion python/treelite/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,17 @@ def concatenate(cls, model_objs: List[Model]) -> Model:
----------
model_objs :
List of :py:class:`Model` objects
Returns
-------
model : :py:class:`Model` object
Concatenated model
Example
-------
.. code-block:: python
concatenated_model = Model.concatenate([model1, model2, model3])
concatenated_model = treelite.Model.concatenate([model1, model2, model3])
"""
concatenated_model_handle = ctypes.c_void_p()
model_obj_handles = []
Expand Down
4 changes: 2 additions & 2 deletions python/treelite/model_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ class ModelBuilder:
.. note::
The model builder object must only be access by a single thread. To build
The model builder object must be only accessed by a single thread. To build
multiple trees in parallel, create multiple builder objects and use model
concatenation.
concatenation (:py:meth:`~treelite.Model.concatenate`).
Parameters
----------
Expand Down
2 changes: 1 addition & 1 deletion python/treelite/sklearn/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

def import_model_with_model_builder(sklearn_model):
"""
This function was removed in Treelite 4.0. Please use :py:meth:`treelite.sklearn.import_model`
This function was removed in Treelite 4.0; please use :py:meth:`~treelite.sklearn.import_model`
instead.
"""
raise NotImplementedError(
Expand Down

0 comments on commit dfd1565

Please sign in to comment.