Skip to content

Commit 84d6ba9

Browse files
committed
Modify documentation structure
1 parent d6cd3a2 commit 84d6ba9

File tree

7 files changed

+42
-30
lines changed

7 files changed

+42
-30
lines changed

docsrc/source/base_model.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Base Model
2+
~~~~~~~~~~
3+
.. automodule:: python.model.base
4+
:members:
5+
:undoc-members:
6+
:show-inheritance:
7+
:exclude-members: SHAP_AVAILABLE, Task

docsrc/source/code_doc.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Code Documentation
2+
==================
3+
4+
.. toctree::
5+
:maxdepth: 2
6+
:caption: Contents:
7+
8+
base_model
9+
sklearn_model
10+
service_api

docsrc/source/index.rst

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,5 @@
33
:maxdepth: 3
44
:caption: Contents:
55

6-
.. mdinclude:: ../../README.md
7-
8-
9-
Code Documentation
10-
==================
11-
12-
Model Class
13-
-----------
14-
.. automodule:: model
15-
:members:
16-
:undoc-members:
17-
:show-inheritance:
18-
:exclude-members: SHAP_AVAILABLE, Task
19-
20-
21-
Service
22-
-------
23-
.. automodule:: service
24-
:members:
25-
:undoc-members:
26-
:show-inheritance:
27-
:exclude-members: DEBUG, MODEL_NAME, ENVIRONMENT, SERVICE_START_TIMESTAMP, app, model, NumpyEncoder, returns_json, create_model_instance
28-
29-
30-
Indices and tables
31-
==================
32-
* :ref:`genindex`
33-
* :ref:`modindex`
34-
* :ref:`search`
6+
readme
7+
code_doc

docsrc/source/readme.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.. mdinclude:: ../../README.md

docsrc/source/service_api.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
Service
3+
-------
4+
.. automodule:: service
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:
8+
:exclude-members: MODEL_TYPE, DEBUG, MODEL_NAME, ENVIRONMENT, SERVICE_START_TIMESTAMP, app, model

docsrc/source/sklearn_model.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Scikit-learn Model
2+
~~~~~~~~~~~~~~~~~~
3+
.. automodule:: python.model.sklearn
4+
:members:
5+
:undoc-members:
6+
:show-inheritance:

python/model/base.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def __repr__(self):
6262

6363

6464
class BaseModel(object):
65-
"""Base Class that handles the loaded model."""
65+
"""Abstract class that handles the loaded model."""
6666
family = ''
6767
# Explainable models
6868
_explainable_models = tuple()
@@ -77,30 +77,37 @@ def __init__(self, file_name):
7777

7878
# Abstract
7979
def _load(self):
80+
"""Abstract method"""
8081
raise NotImplementedError()
8182

8283
@_check()
8384
def _get_predictor(self):
85+
"""Abstract method"""
8486
raise NotImplementedError()
8587

8688
@_check(task='classification')
8789
def _get_class_names(self):
90+
"""Abstract method"""
8891
raise NotImplementedError()
8992

9093
@_check()
9194
def preprocess(self, features):
95+
"""Abstract method"""
9296
raise NotImplementedError()
9397

9498
@_check()
9599
def predict(self, features):
100+
"""Abstract method"""
96101
raise NotImplementedError()
97102

98103
@_check(task='classification')
99104
def predict_proba(self, features):
105+
"""Abstract method"""
100106
raise NotImplementedError()
101107

102108
@_check(explainable=True)
103109
def explain(self, features, samples=None):
110+
"""Abstract method"""
104111
raise NotImplementedError()
105112

106113
# Private

0 commit comments

Comments
 (0)