diff --git a/README.md b/README.md index 1705494..7ba67eb 100644 --- a/README.md +++ b/README.md @@ -40,12 +40,12 @@ nn-Meter is a latency predictor of models with type of Tensorflow, PyTorch, Onnx | Testing Model Type | Requirements | | :-------------------: | :------------------------------------------------: | | Tensorflow | `tensorflow==1.15.0` | -| Torch | `torch==1.7.1`, `torchvision==0.8.2`, (alternative)[`onnx==1.9.0`, `onnx-simplifier==0.3.6`] or [`nni==2.4`]$^{[1]}$ | +| Torch | `torch==1.7.1`, `torchvision==0.8.2`, (alternative)[`onnx==1.9.0`, `onnx-simplifier==0.3.6`] or [`nni==2.4`][1] | | Onnx | `onnx==1.9.0` | | nn-Meter IR graph | --- | | NNI IR graph | `nni==2.4` | -${[1]}$ Please refer to [nn-Meter Usage](#torch-model-converters) for more information +[1] Please refer to [nn-Meter Usage](#torch-model-converters) for more information. Please also check the versions of `numpy` and `scikit_learn`. The different versions may change the prediction accuracy of kernel predictors. diff --git a/docs/quick_start.md b/docs/quick_start.md index 35ef260..cd37c1b 100644 --- a/docs/quick_start.md +++ b/docs/quick_start.md @@ -19,12 +19,12 @@ nn-Meter is a latency predictor of models with type of Tensorflow, PyTorch, Onnx | Testing Model Type | Requirements | | :-------------------: | :------------------------------------------------: | | Tensorflow | `tensorflow==1.15.0` | -| Torch | `torch==1.7.1`, `torchvision==0.8.2`, (alternative)[`onnx==1.9.0`, `onnx-simplifier==0.3.6`] or [`nni==2.4`]$^{[1]}$ | +| Torch | `torch==1.7.1`, `torchvision==0.8.2`, (alternative)[`onnx==1.9.0`, `onnx-simplifier==0.3.6`] or [`nni==2.4`][1] | | Onnx | `onnx==1.9.0` | | nn-Meter IR graph | --- | | NNI IR graph | `nni==2.4` | -${[1]}$ Please refer to [nn-Meter Usage](usage.md#torch-model-converters) for more information. +[1] Please refer to [nn-Meter Usage](usage.md#torch-model-converters) for more information. Please also check the versions of `numpy` and `scikit_learn`. The different versions may change the prediction accuracy of kernel predictors. diff --git a/nn_meter/__init__.py b/nn_meter/__init__.py index 2519cfe..1c10337 100644 --- a/nn_meter/__init__.py +++ b/nn_meter/__init__.py @@ -1,5 +1,12 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT license. + +try: + import pkg_resources # part of setuptools + __version__ = pkg_resources.require("nn-meter")[0].version +except ModuleNotFoundError: + __version__ = 'UNKNOWN' + from .nn_meter import ( nnMeter, load_latency_predictor, diff --git a/setup.py b/setup.py index e4b0fd7..474e3d0 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ from setuptools import setup, find_packages setup( - name='nn_meter', + name='nn-meter', version='1.0', description='nn-Meter is a novel and efficient system to accurately predict the inference latency of DNN models on diverse edge devices.', long_description = open('README.md', encoding='utf-8').read(), @@ -13,7 +13,7 @@ setup( author_email='nn-meter-dev@microsoft.com', url='https://github.com/microsoft/nn-Meter', project_urls={ - 'prediction models and fusion rules': 'https://github.com/microsoft/nn-Meter/releases/tag/v1.0-data' + 'Data of models': 'https://github.com/microsoft/nn-Meter/releases/tag/v1.0-data', }, license = 'MIT', classifiers = [