diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..6925c8f --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,4 @@ +include LICENSE +include README.md +include requirements.txt +recursive-include src/aiia * \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..a8bdbe9 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,8 @@ +[build-system] +requires = ["setuptools>=42", "wheel"] +build-backend = "setuptools.build_meta" + +[tool.black] +line-length = 88 +target-version = ['py37'] +include = '\.pyi?$' \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..06e8438 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,5 @@ +torch>=4.5.0 +numpy +tqdm +pytest +pillow \ No newline at end of file diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..fb45363 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,26 @@ +[metadata] +name = aiia +version = 0.1.0 +author = Your Name +author_email = falko.habel@gmx.de +description = AIIA deep learning model implementation +long_description = file: README.md +long_description_content_type = text/markdown +url = https://gitea.fabelous.app/Maschine-Learning/AIIA.git +classifiers = + Programming Language :: Python :: 3 + License :: OSI Approved :: MIT License + Operating System :: OS Independent + +[options] +package_dir = + = src +packages = find: +python_requires = >=3.7 +install_requires = + torch>=1.8.0 + numpy>=1.19.0 + tqdm>=4.62.0 + +[options.packages.find] +where = src \ No newline at end of file diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..0eb6be6 --- /dev/null +++ b/setup.py @@ -0,0 +1,25 @@ +from setuptools import setup, find_packages + +setup( + name="aiia", + version="0.1.0", + packages=find_packages(where="src"), + package_dir={"": "src"}, + install_requires=[ + "torch>=1.8.0", + "numpy>=1.19.0", + "tqdm>=4.62.0", + ], + author="Falko Habel", + author_email="falko.habel@gmx.de", + description="AIIA deep learning model implementation", + long_description=open("README.md").read(), + long_description_content_type="text/markdown", + url="https://gitea.fabelous.app/Maschine-Learning/AIIA.git", + classifiers=[ + "Programming Language :: Python :: 3", + "License :: OSI Approved :: Creative Commons Attribution-NonCommercial 4.0 International", + "Operating System :: OS Independent", + ], + python_requires=">=3.10", +) diff --git a/src/aiia/__init__.py b/src/aiia/__init__.py index 71acf48..6dbc27a 100644 --- a/src/aiia/__init__.py +++ b/src/aiia/__init__.py @@ -1,3 +1,5 @@ -from .model import AIIA, AIIABase, AIIAchunked, AIIAExpert, AIIAmoe, AIIArecursive, AIIABaseShared -from .data import AIIADataLoader -from .model.config import AIIAConfig \ No newline at end of file +from .model.Model import AIIABase, AIIABaseShared, AIIAchunked, AIIAExpert, AIIAmoe, AIIA, AIIArecursive +from .model.config import AIIAConfig +from .data.DataLoader import DataLoader + +__version__ = "0.1.0" diff --git a/src/aiia/data/__init__.py b/src/aiia/data/__init__.py index d1ae9b0..5e8a93c 100644 --- a/src/aiia/data/__init__.py +++ b/src/aiia/data/__init__.py @@ -1 +1,3 @@ -from .DataLoader import AIIADataLoader \ No newline at end of file +from .DataLoader import AIIADataLoader + +__all__ = ["AIIADataLoader"] diff --git a/src/aiia/model/Model.py b/src/aiia/model/Model.py index 771caf8..f0e65ff 100644 --- a/src/aiia/model/Model.py +++ b/src/aiia/model/Model.py @@ -223,4 +223,8 @@ class AIIArecursive(AIIA): processed_patches.append(pp) combined_output = torch.mean(torch.stack(processed_patches, dim=0), dim=0) - return combined_output \ No newline at end of file + return combined_output + +config = AIIAConfig() +model = AIIAmoe(config, num_experts=5) +model.save("test") \ No newline at end of file diff --git a/src/aiia/model/__init__.py b/src/aiia/model/__init__.py index 0e6a459..f68a42a 100644 --- a/src/aiia/model/__init__.py +++ b/src/aiia/model/__init__.py @@ -1,2 +1,21 @@ +from .Model import ( + AIIA, + AIIABase, + AIIABaseShared, + AIIAchunked, + AIIAExpert, + AIIAmoe, + AIIArecursive +) from .config import AIIAConfig -from .Model import AIIA, AIIABase, AIIAchunked, AIIAExpert, AIIAmoe, AIIArecursive, AIIABaseShared \ No newline at end of file + +__all__ = [ + "AIIA", + "AIIABase", + "AIIABaseShared", + "AIIAchunked", + "AIIAExpert", + "AIIAmoe", + "AIIArecursive", + "AIIAConfig" +] \ No newline at end of file