From 91abfa5bcae0766f7d6269eb32ce1b297f40b88c Mon Sep 17 00:00:00 2001 From: ywilhelm Date: Tue, 13 Dec 2022 03:06:31 +0100 Subject: [PATCH] updates --- .gitignore | 1 + docs/source/install.rst | 2 +- pyproject.toml | 5 +-- setup.py | 39 --------------------- src/pusion/__init__.py | 2 +- src/pusion/evaluation/evaluation_metrics.py | 2 +- tests/user_test_1.py | 5 ++- 7 files changed, 11 insertions(+), 45 deletions(-) delete mode 100644 setup.py diff --git a/.gitignore b/.gitignore index fad24fb..5931f2e 100644 --- a/.gitignore +++ b/.gitignore @@ -155,3 +155,4 @@ run.py tests/figs tests/res tests/test.py +/decision-fusion-framework/ diff --git a/docs/source/install.rst b/docs/source/install.rst index 8e87c66..884f325 100644 --- a/docs/source/install.rst +++ b/docs/source/install.rst @@ -41,7 +41,7 @@ For `MacOS` or `Unix` user: python3 -m build -Once successfully executed, two files are generated in the `dist` subfolder within the project's root folder. +Once successfully executed, two files are generated in the `dist` subfolder within the project's root folder. The `tar.gz` file is the source distribution and the `whl` file is the built distribution. Installation ------------ diff --git a/pyproject.toml b/pyproject.toml index ed4d418..323ab67 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,7 +11,7 @@ authors = [ ] description = "Pusion (Python Universal Fusion) is a generic and automated framework for decision fusion written in Python." readme = "README.md" -license={file = "LICENSE.txt"} +license={file = "LICENSE"} requires-python = ">=3.6" classifiers = [ "Programming Language :: Python :: 3", @@ -24,7 +24,8 @@ dependencies = [ "scikit-learn~=0.24.1", "setuptools~=54.2.0", "pandas~=1.2.3", - "matplotlib~=3.4.1" + "matplotlib~=3.4.1", + "torchmetrics~=0.7.2" ] keywords = ["decision fusion", "combining classifiers", "fusion", "pusion"] diff --git a/setup.py b/setup.py deleted file mode 100644 index 1d0a120..0000000 --- a/setup.py +++ /dev/null @@ -1,39 +0,0 @@ -from setuptools import find_packages, setup - -with open("README.md", "r", encoding="utf-8") as fh: - long_description = fh.read() - -setup( - name="pusion", - version="0.1.0", - description="Pusion (Python Universal Fusion) is a generic and flexible decision fusion framework written in Python for combining multiple classifier’s decision outcomes.", - long_description=long_description, - long_description_content_type="text/markdown", - author="Admir Obralija, Yannick Wilhelm", - author_email="yannick.wilhelm@gsame.uni-stuttgart.de", - license="MIT", - url = "https://github.com/IPVS-AS/pusion", - project_urls={ - "Bug Tracker": "https://github.com/IPVS-AS/pusion/issues", - "Documentation": "https://ipvs-as.github.io/pusion/build/html/index.html" - }, - classifiers=[ - "Programming Language :: Python :: 3", - "License :: OSI Approved :: MIT License", - "Operating System :: OS Independent", - ], - python_requires=">=3.6", - install_requires=[ - 'numpy~=1.20.2', - 'scipy~=1.6.2', - 'scikit-learn~=0.24.1', - 'setuptools~=54.2.0', - 'pandas~=1.2.3', - 'matplotlib~=3.4.1' - ], - setup_requires=['pytest-runner'], - packages=find_packages(exclude=['tests'], where="pusion"), - package_dir={"": "pusion"}, - tests_require=['pytest'], - test_suite="tests" -) \ No newline at end of file diff --git a/src/pusion/__init__.py b/src/pusion/__init__.py index ce0efb0..0c45598 100644 --- a/src/pusion/__init__.py +++ b/src/pusion/__init__.py @@ -21,7 +21,7 @@ from pusion.util import * from pusion.util.constants import * from pusion.util.exceptions import * - +from pusion.util.generator import * # Maintain this static attributes according to implemented methods for ease of framework usage, # e.g., `pusion.Method.AutoCombiner`. diff --git a/src/pusion/evaluation/evaluation_metrics.py b/src/pusion/evaluation/evaluation_metrics.py index 864e379..92c7154 100644 --- a/src/pusion/evaluation/evaluation_metrics.py +++ b/src/pusion/evaluation/evaluation_metrics.py @@ -1,5 +1,5 @@ import numpy as np -import torch +#import torch import torchmetrics from sklearn.metrics import * diff --git a/tests/user_test_1.py b/tests/user_test_1.py index 9fce94c..fc5cfbb 100644 --- a/tests/user_test_1.py +++ b/tests/user_test_1.py @@ -93,5 +93,8 @@ def main(): print("------------- Runtimes ---------------") print("Total train time:", t_elapsed_train) print("Total combine time:", t_elapsed_combine) - print() + + +if __name__ == '__main__': + main()