diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 9bd9161..2ffbdf6 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -15,7 +15,7 @@ Types of Contributions Report Bugs ~~~~~~~~~~~ -Report bugs at https://github.com/hhsecond/mlutil/issues. +Report bugs at https://github.com/hhsecond/ml2rt/issues. If you are reporting a bug, please include: @@ -38,14 +38,14 @@ and "help wanted" is open to whoever wants to implement it. Write Documentation ~~~~~~~~~~~~~~~~~~~ -MLutil could always use more documentation, whether as part of the -official MLutil docs, in docstrings, or even on the web in blog posts, +ml2rt could always use more documentation, whether as part of the +official ml2rt docs, in docstrings, or even on the web in blog posts, articles, and such. Submit Feedback ~~~~~~~~~~~~~~~ -The best way to send feedback is to file an issue at https://github.com/hhsecond/mlutil/issues. +The best way to send feedback is to file an issue at https://github.com/hhsecond/ml2rt/issues. If you are proposing a feature: @@ -57,17 +57,17 @@ If you are proposing a feature: Get Started! ------------ -Ready to contribute? Here's how to set up `mlutil` for local development. +Ready to contribute? Here's how to set up `ml2rt` for local development. -1. Fork the `mlutil` repo on GitHub. +1. Fork the `ml2rt` repo on GitHub. 2. Clone your fork locally:: - $ git clone git@github.com:your_name_here/mlutil.git + $ git clone git@github.com:your_name_here/ml2rt.git 3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development:: - $ mkvirtualenv mlutil - $ cd mlutil/ + $ mkvirtualenv ml2rt + $ cd ml2rt/ $ python setup.py develop 4. Create a branch for local development:: @@ -79,7 +79,7 @@ Ready to contribute? Here's how to set up `mlutil` for local development. 5. When you're done making changes, check that your changes pass flake8 and the tests, including testing other Python versions with tox:: - $ flake8 mlutil tests + $ flake8 ml2rt tests $ python setup.py test or py.test $ tox @@ -103,7 +103,7 @@ Before you submit a pull request, check that it meets these guidelines: your new functionality into a function with a docstring, and add the feature to the list in README.rst. 3. The pull request should work for Python 2.7, 3.4, 3.5 and 3.6, and for PyPy. Check - https://travis-ci.org/hhsecond/mlutil/pull_requests + https://travis-ci.org/hhsecond/ml2rt/pull_requests and make sure that the tests pass for all supported Python versions. Tips @@ -111,7 +111,7 @@ Tips To run a subset of tests:: -$ py.test tests.test_mlutil +$ py.test tests.test_ml2rt Deploying diff --git a/README.rst b/README.rst index 183868e..c02a4fb 100644 --- a/README.rst +++ b/README.rst @@ -1,6 +1,6 @@ -================================= -mlut - Machine Learning utilities -================================= +===================================================== +ml2rt - Utilities for taking ML to different runtimes +===================================================== Machine learning utilities for model conversion, serialization, loading etc @@ -13,13 +13,13 @@ Installation :: - pip install mlut + pip install ml2rt Documentation ------------- -mlut provides some convenient functions to convert, save & load machine learning models. It currently supports Tensorflow, PyTorch, Sklearn, Spark and ONNX but frameworks like xgboost, coreml are on the way. +ml2rt provides some convenient functions to convert, save & load machine learning models. It currently supports Tensorflow, PyTorch, Sklearn, Spark and ONNX but frameworks like xgboost, coreml are on the way. Saving Tensorflow model *********************** @@ -27,7 +27,7 @@ Saving Tensorflow model .. code-block:: python import tensorflow as tf - from mlut import save_tensorflow + from ml2rt import save_tensorflow # train your model here sess = tf.Session() save_tensorflow(sess, path, output=['output']) @@ -38,7 +38,7 @@ Saving PyTorch model .. code-block:: python # it has to be a torchscript graph made by tracing / scripting - from mlut import save_torch + from ml2rt import save_torch save_torch(torch_script_graph, path) Saving ONNX model @@ -46,7 +46,7 @@ Saving ONNX model .. code-block:: python - from mlut import save_onnx + from ml2rt import save_onnx save_onnx(onnx_model, path) Saving sklearn model @@ -54,7 +54,7 @@ Saving sklearn model .. code-block:: python - from mlut import save_sklearn + from ml2rt import save_sklearn prototype = np.array(some_shape, dtype=some_dtype) # Equivalent to the input of the model save_sklearn(sklearn_model, path, prototype=prototype) @@ -74,7 +74,7 @@ Saving sparkml model .. code-block:: python - from mlut import save_sparkml + from ml2rt import save_sparkml prototype = np.array(some_shape, dtype=some_dtype) # Equivalent to the input of the model save_sparkml(spark_model, path, prototype=prototype) @@ -97,6 +97,6 @@ Loading model & script .. code-block:: python - model = mlut.load_model(path) + model = ml2rt.load_model(path) - script = mlut.load_script(script) + script = ml2rt.load_script(script) diff --git a/mlut/__init__.py b/ml2rt/__init__.py similarity index 100% rename from mlut/__init__.py rename to ml2rt/__init__.py diff --git a/mlut/exporter.py b/ml2rt/exporter.py similarity index 100% rename from mlut/exporter.py rename to ml2rt/exporter.py diff --git a/mlut/importer.py b/ml2rt/importer.py similarity index 100% rename from mlut/importer.py rename to ml2rt/importer.py diff --git a/mlut/utils.py b/ml2rt/utils.py similarity index 100% rename from mlut/utils.py rename to ml2rt/utils.py diff --git a/mlut/version.py b/ml2rt/version.py similarity index 100% rename from mlut/version.py rename to ml2rt/version.py diff --git a/setup.cfg b/setup.cfg index 2a39e17..dc97b6a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -7,7 +7,7 @@ tag = True search = version='{current_version}' replace = version='{new_version}' -[bumpversion:file:mlutil/__init__.py] +[bumpversion:file:ml2rt/__init__.py] search = __version__ = '{current_version}' replace = __version__ = '{new_version}' diff --git a/setup.py b/setup.py index 485fe0d..e35db2f 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ with open('README.rst') as readme_file: readme = readme_file.read() -exec(open('mlut/version.py').read()) +exec(open('ml2rt/version.py').read()) requirements = [] extras_require = { @@ -41,13 +41,13 @@ license="Apache Software License 2.0", long_description=readme + '\n\n', include_package_data=True, - keywords='mlut', - name='mlut', - packages=find_packages(include=['mlut']), + keywords='ml2rt', + name='ml2rt', + packages=find_packages(include=['ml2rt']), setup_requires=setup_requirements, test_suite='tests', tests_require=test_requirements, - url='https://github.com/hhsecond/mlut', - version=__version__, # comes from mlut/version.py + url='https://github.com/hhsecond/ml2rt', + version=__version__, # comes from ml2rt/version.py zip_safe=False, ) diff --git a/tests/test_mlut.py b/tests/test_mlut.py index 647950f..97df0b4 100644 --- a/tests/test_mlut.py +++ b/tests/test_mlut.py @@ -2,10 +2,10 @@ import os import sys -from mlut import load_model, load_script -from mlut import ( +from ml2rt import load_model, load_script +from ml2rt import ( save_tensorflow, save_torch, save_onnx, save_sklearn, save_sparkml) -from mlut import utils +from ml2rt import utils import tensorflow as tf import torch from sklearn import linear_model, datasets diff --git a/tox.ini b/tox.ini index 96eea1e..e826394 100644 --- a/tox.ini +++ b/tox.ini @@ -9,7 +9,7 @@ python = [testenv:flake8] basepython = python deps = flake8 -commands = flake8 mlutil +commands = flake8 ml2rt [testenv] setenv =