Skip to content

Commit

Permalink
update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
MainRo committed Oct 8, 2021
1 parent 466ae3b commit b299330
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 12 deletions.
29 changes: 22 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ Ebm2onnx
.. image:: https://img.shields.io/pypi/v/ebm2onnx.svg
:target: https://pypi.python.org/pypi/ebm2onnx

.. image:: https://github.com/SoftAtHome/ebm2onnx/actions/workflows/ci.yml/badge.svg
:target: https://github.com/SoftAtHome/ebm2onnx/actions/workflows/ci.yml
.. image:: https://github.com/interpretml/ebm2onnx/actions/workflows/ci.yml/badge.svg
:target: https://github.com/interpretml/ebm2onnx/actions/workflows/ci.yml
:alt: CI

.. image:: https://coveralls.io/repos/github/SoftAtHome/ebm2onnx/badge.svg?branch=master
:target: https://coveralls.io/github/SoftAtHome/ebm2onnx?branch=master
.. image:: https://coveralls.io/repos/github/interpretml/ebm2onnx/badge.svg?branch=master
:target: https://coveralls.io/github/interpretml/ebm2onnx?branch=master
:alt: Code Coverage

.. image:: https://readthedocs.org/projects/ebm2onnx/badge/?version=latest
:target: https://ebm2onnx.readthedocs.io/en/latest/?version=latest
:alt: Documentation Status

.. image:: https://mybinder.org/badge_logo.svg
:target: https://mybinder.org/v2/gh/SoftAtHome/ebm2onnx/master?filepath=examples%2Fconvert.ipynb
:target: https://mybinder.org/v2/gh/interpretml/ebm2onnx/master?filepath=examples%2Fconvert.ipynb


Ebm2onnx converts `EBM <https://github.com/interpretml/interpret>`_ models to
Expand Down Expand Up @@ -67,6 +67,21 @@ Train an EBM model:
Then you can convert it to ONNX in a single function call:

.. code:: python
import onnx
import ebm2onnx
onnx_model = ebm2onnx.to_onnx(
model,
ebm2onnx.get_dtype_from_pandas(x_train),
)
onnx.save_model(onnx_model, 'ebm_model.onnx')
If your dataset is not a pandas dataframe, you can provide the features' types
directly:

.. code:: python
import ebm2onnx
Expand All @@ -85,5 +100,5 @@ Then you can convert it to ONNX in a single function call:
Try it live
-------------

- You can live test the `model conversion <https://mybinder.org/v2/gh/SoftAtHome/ebm2onnx/master?filepath=examples%2Fconvert.ipynb>`_.
- You can live test `local explanations <https://mybinder.org/v2/gh/SoftAtHome/ebm2onnx/master?filepath=examples%2Fexplain_local.ipynb>`_.
- You can live test the `model conversion <https://mybinder.org/v2/gh/interpretml/ebm2onnx/master?filepath=examples%2Fconvert.ipynb>`_.
- You can live test `local explanations <https://mybinder.org/v2/gh/interpretml/ebm2onnx/master?filepath=examples%2Fexplain_local.ipynb>`_.
8 changes: 4 additions & 4 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ You can either clone the public repository:

.. code-block:: console
$ git clone git://github.com/SoftAtHome/ebm2onnx.git
$ git clone git://github.com/interpretml/ebm2onnx.git
Or download the `tarball`_:

.. code-block:: console
$ curl -OJL https://github.com/SoftAtHome/ebm2onnx/tarball/master
$ curl -OJL https://github.com/interpretml/ebm2onnx/tarball/master
Once you have a copy of the source, you can install it with:

Expand All @@ -47,5 +47,5 @@ Once you have a copy of the source, you can install it with:
$ python setup.py install
.. _Github repo: https://github.com/SoftAtHome/ebm2onnx
.. _tarball: https://github.com/SoftAtHome/ebm2onnx/tarball/master
.. _Github repo: https://github.com/interpretml/ebm2onnx
.. _tarball: https://github.com/interpretml/ebm2onnx/tarball/master
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
keywords='ebm2onnx',
name='ebm2onnx',
packages=find_packages(include=['ebm2onnx']),
url='https://github.com/SoftAtHome/ebm2onnx.git',
url='https://github.com/interpretml/ebm2onnx.git',
version='1.1.1',
zip_safe=True,
)

0 comments on commit b299330

Please sign in to comment.