pyTorchAutoForge 0.1.2.post1.dev1__tar.gz → 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pytorchautoforge-0.1.2.post1.dev1 → pytorchautoforge-0.2.0}/LICENSE +1 -1
- {pytorchautoforge-0.1.2.post1.dev1 → pytorchautoforge-0.2.0}/PKG-INFO +25 -22
- {pytorchautoforge-0.1.2.post1.dev1 → pytorchautoforge-0.2.0}/_version.py +16 -3
- {pytorchautoforge-0.1.2.post1.dev1 → pytorchautoforge-0.2.0}/conda_install.sh +14 -14
- pytorchautoforge-0.2.0/environment.yml +276 -0
- {pytorchautoforge-0.1.2.post1.dev1 → pytorchautoforge-0.2.0}/pyTorchAutoForge/__init__.py +1 -1
- pytorchautoforge-0.2.0/pyTorchAutoForge/api/__init__.py +19 -0
- {pytorchautoforge-0.1.2.post1.dev1 → pytorchautoforge-0.2.0}/pyTorchAutoForge/api/matlab/TorchModelMATLABwrapper.py +10 -10
- pytorchautoforge-0.2.0/pyTorchAutoForge/api/mlflow/__init__.py +7 -0
- pytorchautoforge-0.2.0/pyTorchAutoForge/api/mlflow/mlflow_api.py +307 -0
- {pytorchautoforge-0.1.2.post1.dev1 → pytorchautoforge-0.2.0}/pyTorchAutoForge/api/onnx/ModelHandlerONNx.py +139 -124
- pytorchautoforge-0.2.0/pyTorchAutoForge/api/onnx/__init__.py +3 -0
- {pytorchautoforge-0.1.2.post1.dev1 → pytorchautoforge-0.2.0}/pyTorchAutoForge/api/tcp/tcp_torchModel_eval.py +0 -1
- pytorchautoforge-0.2.0/pyTorchAutoForge/api/torch/__init__.py +3 -0
- pytorchautoforge-0.2.0/pyTorchAutoForge/api/torch/torchModulesIO.py +287 -0
- pytorchautoforge-0.2.0/pyTorchAutoForge/datasets/.experimental.py +416 -0
- pytorchautoforge-0.2.0/pyTorchAutoForge/datasets/DataAugmentation.py +155 -0
- pytorchautoforge-0.2.0/pyTorchAutoForge/datasets/DataloaderIndex.py +110 -0
- pytorchautoforge-0.2.0/pyTorchAutoForge/datasets/DatasetClasses.py +1203 -0
- pytorchautoforge-0.2.0/pyTorchAutoForge/datasets/ImagesAugmentation.py +1294 -0
- pytorchautoforge-0.2.0/pyTorchAutoForge/datasets/LabelsClasses.py +364 -0
- pytorchautoforge-0.2.0/pyTorchAutoForge/datasets/__init__.py +22 -0
- pytorchautoforge-0.2.0/pyTorchAutoForge/datasets/auxiliary_functions.py +240 -0
- pytorchautoforge-0.1.2.post1.dev1/pyTorchAutoForge/datasets/DataAugmentation.py → pytorchautoforge-0.2.0/pyTorchAutoForge/datasets/noise_models/FrameCameraNoiseModels.py +14 -191
- pytorchautoforge-0.2.0/pyTorchAutoForge/datasets/noise_models/__init__.py +0 -0
- pytorchautoforge-0.2.0/pyTorchAutoForge/evaluation/ModelEvaluator.py +672 -0
- pytorchautoforge-0.2.0/pyTorchAutoForge/evaluation/ModelExplainer.py +460 -0
- {pytorchautoforge-0.1.2.post1.dev1 → pytorchautoforge-0.2.0}/pyTorchAutoForge/evaluation/ModelProfiler.py +32 -15
- {pytorchautoforge-0.1.2.post1.dev1 → pytorchautoforge-0.2.0}/pyTorchAutoForge/evaluation/ResultsPlotter.py +105 -59
- pytorchautoforge-0.2.0/pyTorchAutoForge/evaluation/__init__.py +15 -0
- pytorchautoforge-0.2.0/pyTorchAutoForge/extra/data_analysis_tools_module.py +27 -0
- pytorchautoforge-0.2.0/pyTorchAutoForge/extra/experimental_pysr_module.py +411 -0
- pytorchautoforge-0.2.0/pyTorchAutoForge/extra/xgboost_regression_module.py +321 -0
- {pytorchautoforge-0.1.2.post1.dev1 → pytorchautoforge-0.2.0}/pyTorchAutoForge/hparams_optim/optuna_auxiliary.py +9 -4
- pytorchautoforge-0.2.0/pyTorchAutoForge/hparams_optim/seedNewOptunaStudy.py +66 -0
- pytorchautoforge-0.2.0/pyTorchAutoForge/model_building/.deprecated/_modelBuldingBlocks.py +250 -0
- {pytorchautoforge-0.1.2.post1.dev1 → pytorchautoforge-0.2.0}/pyTorchAutoForge/model_building/ModelAssembler.py +13 -7
- pytorchautoforge-0.2.0/pyTorchAutoForge/model_building/ModelAutoBuilder.py +252 -0
- pytorchautoforge-0.2.0/pyTorchAutoForge/model_building/__init__.py +47 -0
- pytorchautoforge-0.2.0/pyTorchAutoForge/model_building/backbones/README.md +9 -0
- pytorchautoforge-0.2.0/pyTorchAutoForge/model_building/backbones/__init__.py +0 -0
- pytorchautoforge-0.2.0/pyTorchAutoForge/model_building/backbones/base_backbones.py +190 -0
- pytorchautoforge-0.2.0/pyTorchAutoForge/model_building/backbones/efficient_net.py +187 -0
- pytorchautoforge-0.2.0/pyTorchAutoForge/model_building/backbones/image_processing_operators.py +521 -0
- pytorchautoforge-0.2.0/pyTorchAutoForge/model_building/backbones/input_adapters.py +580 -0
- pytorchautoforge-0.2.0/pyTorchAutoForge/model_building/backbones/spatial_features_operators.py +148 -0
- pytorchautoforge-0.2.0/pyTorchAutoForge/model_building/convolutionalBlocks.py +628 -0
- pytorchautoforge-0.2.0/pyTorchAutoForge/model_building/factories/block_factories.py +303 -0
- pytorchautoforge-0.2.0/pyTorchAutoForge/model_building/fullyConnectedBlocks.py +225 -0
- pytorchautoforge-0.2.0/pyTorchAutoForge/model_building/modelBuildingBlocks.py +970 -0
- pytorchautoforge-0.2.0/pyTorchAutoForge/optimization/ModelTrainingManager.py +2185 -0
- {pytorchautoforge-0.1.2.post1.dev1 → pytorchautoforge-0.2.0}/pyTorchAutoForge/optimization/__init__.py +5 -1
- {pytorchautoforge-0.1.2.post1.dev1 → pytorchautoforge-0.2.0}/pyTorchAutoForge/optimization/lossFunctionsClasses.py +1 -0
- pytorchautoforge-0.2.0/pyTorchAutoForge/programs/profile_and_export_model.py +256 -0
- {pytorchautoforge-0.1.2.post1.dev1 → pytorchautoforge-0.2.0}/pyTorchAutoForge/setup/AutoForgeInit.py +13 -0
- pytorchautoforge-0.2.0/pyTorchAutoForge/utils/DeviceManager.py +379 -0
- pytorchautoforge-0.2.0/pyTorchAutoForge/utils/TODO +3 -0
- {pytorchautoforge-0.1.2.post1.dev1 → pytorchautoforge-0.2.0}/pyTorchAutoForge/utils/__init__.py +11 -4
- pytorchautoforge-0.2.0/pyTorchAutoForge/utils/argument_parsers.py +179 -0
- pytorchautoforge-0.2.0/pyTorchAutoForge/utils/context_management.py +32 -0
- pytorchautoforge-0.2.0/pyTorchAutoForge/utils/conversion_utils.py +287 -0
- pytorchautoforge-0.2.0/pyTorchAutoForge/utils/rename_images.py +101 -0
- pytorchautoforge-0.2.0/pyTorchAutoForge/utils/test_fixtures/images_fixtures.py +24 -0
- pytorchautoforge-0.2.0/pyTorchAutoForge/utils/utils.py +140 -0
- {pytorchautoforge-0.1.2.post1.dev1 → pytorchautoforge-0.2.0}/pyproject.toml +33 -26
- pytorchautoforge-0.1.2.post1.dev1/environment.yml +0 -181
- pytorchautoforge-0.1.2.post1.dev1/pyTorchAutoForge/api/__init__.py +0 -20
- pytorchautoforge-0.1.2.post1.dev1/pyTorchAutoForge/api/mlflow/__init__.py +0 -1
- pytorchautoforge-0.1.2.post1.dev1/pyTorchAutoForge/api/mlflow/mlflow_api.py +0 -19
- pytorchautoforge-0.1.2.post1.dev1/pyTorchAutoForge/api/onnx/__init__.py +0 -3
- pytorchautoforge-0.1.2.post1.dev1/pyTorchAutoForge/api/torch/__init__.py +0 -3
- pytorchautoforge-0.1.2.post1.dev1/pyTorchAutoForge/api/torch/torchModulesIO.py +0 -162
- pytorchautoforge-0.1.2.post1.dev1/pyTorchAutoForge/datasets/DataloaderIndex.py +0 -55
- pytorchautoforge-0.1.2.post1.dev1/pyTorchAutoForge/datasets/DatasetClasses.py +0 -74
- pytorchautoforge-0.1.2.post1.dev1/pyTorchAutoForge/datasets/__init__.py +0 -4
- pytorchautoforge-0.1.2.post1.dev1/pyTorchAutoForge/evaluation/ModelEvaluator.py +0 -156
- pytorchautoforge-0.1.2.post1.dev1/pyTorchAutoForge/evaluation/__init__.py +0 -5
- pytorchautoforge-0.1.2.post1.dev1/pyTorchAutoForge/model_building/ModelAutoBuilder.py +0 -176
- pytorchautoforge-0.1.2.post1.dev1/pyTorchAutoForge/model_building/ModelZoo.py +0 -1
- pytorchautoforge-0.1.2.post1.dev1/pyTorchAutoForge/model_building/__init__.py +0 -6
- pytorchautoforge-0.1.2.post1.dev1/pyTorchAutoForge/model_building/modelClasses.py +0 -935
- pytorchautoforge-0.1.2.post1.dev1/pyTorchAutoForge/optimization/ModelTrainingManager.py +0 -1831
- pytorchautoforge-0.1.2.post1.dev1/pyTorchAutoForge/utils/ArgsParser.py +0 -19
- pytorchautoforge-0.1.2.post1.dev1/pyTorchAutoForge/utils/DeviceManager.py +0 -146
- pytorchautoforge-0.1.2.post1.dev1/pyTorchAutoForge/utils/conversion_utils.py +0 -28
- pytorchautoforge-0.1.2.post1.dev1/pyTorchAutoForge/utils/utils.py +0 -136
- {pytorchautoforge-0.1.2.post1.dev1 → pytorchautoforge-0.2.0}/.gitignore +0 -0
- {pytorchautoforge-0.1.2.post1.dev1 → pytorchautoforge-0.2.0}/README.md +0 -0
- {pytorchautoforge-0.1.2.post1.dev1 → pytorchautoforge-0.2.0}/pyTorchAutoForge/api/matlab/CTorchModelWrapper.m +0 -0
- {pytorchautoforge-0.1.2.post1.dev1 → pytorchautoforge-0.2.0}/pyTorchAutoForge/api/matlab/EnumTorchWrapperMode.m +0 -0
- {pytorchautoforge-0.1.2.post1.dev1 → pytorchautoforge-0.2.0}/pyTorchAutoForge/api/matlab/__init__.py +0 -0
- {pytorchautoforge-0.1.2.post1.dev1 → pytorchautoforge-0.2.0}/pyTorchAutoForge/api/tcp/.deprecated/torchModelOverTCP_legacy.py +0 -0
- {pytorchautoforge-0.1.2.post1.dev1 → pytorchautoforge-0.2.0}/pyTorchAutoForge/api/tcp/__init__.py +0 -0
- {pytorchautoforge-0.1.2.post1.dev1 → pytorchautoforge-0.2.0}/pyTorchAutoForge/api/tcp/tcpServerPy.py +0 -0
- {pytorchautoforge-0.1.2.post1.dev1 → pytorchautoforge-0.2.0}/pyTorchAutoForge/api/tcp/tcp_socket_server.py +0 -0
- {pytorchautoforge-0.1.2.post1.dev1 → pytorchautoforge-0.2.0}/pyTorchAutoForge/api/telegram/AutoForge_AlertSystem_bot.py.wip +0 -0
- {pytorchautoforge-0.1.2.post1.dev1 → pytorchautoforge-0.2.0}/pyTorchAutoForge/api/telegram/__init__.py +0 -0
- {pytorchautoforge-0.1.2.post1.dev1 → pytorchautoforge-0.2.0}/pyTorchAutoForge/api/telegram/bot_token_private.json +0 -0
- {pytorchautoforge-0.1.2.post1.dev1 → pytorchautoforge-0.2.0}/pyTorchAutoForge/api/tensorrt/.gitkeep +0 -0
- {pytorchautoforge-0.1.2.post1.dev1 → pytorchautoforge-0.2.0}/pyTorchAutoForge/api/tensorrt/TODO +0 -0
- {pytorchautoforge-0.1.2.post1.dev1 → pytorchautoforge-0.2.0}/pyTorchAutoForge/api/tensorrt/TRTengineExporter.py +0 -0
- {pytorchautoforge-0.1.2.post1.dev1 → pytorchautoforge-0.2.0}/pyTorchAutoForge/api/tensorrt/__init__.py +0 -0
- {pytorchautoforge-0.1.2.post1.dev1 → pytorchautoforge-0.2.0}/pyTorchAutoForge/hparams_optim/ModelHparamsOptimizer.py +0 -0
- {pytorchautoforge-0.1.2.post1.dev1 → pytorchautoforge-0.2.0}/pyTorchAutoForge/hparams_optim/OptunaStudyAnalyzer.py +0 -0
- {pytorchautoforge-0.1.2.post1.dev1 → pytorchautoforge-0.2.0}/pyTorchAutoForge/hparams_optim/__init__.py +0 -0
- /pytorchautoforge-0.1.2.post1.dev1/pyTorchAutoForge/model_building/modelBuildingFunctions.py → /pytorchautoforge-0.2.0/pyTorchAutoForge/model_building/.deprecated/_modelBuildingFunctions.py +0 -0
- {pytorchautoforge-0.1.2.post1.dev1 → pytorchautoforge-0.2.0}/pyTorchAutoForge/model_building/ModelMutator.py +0 -0
- {pytorchautoforge-0.1.2.post1.dev1 → pytorchautoforge-0.2.0}/pyTorchAutoForge/optimization/.gitignore +0 -0
- {pytorchautoforge-0.1.2.post1.dev1 → pytorchautoforge-0.2.0}/pyTorchAutoForge/optimization/sessionConfig.yaml +0 -0
- {pytorchautoforge-0.1.2.post1.dev1 → pytorchautoforge-0.2.0}/pyTorchAutoForge/setup/BaseConfigClass.py +0 -0
- {pytorchautoforge-0.1.2.post1.dev1 → pytorchautoforge-0.2.0}/pyTorchAutoForge/setup/__init__.py +0 -0
- {pytorchautoforge-0.1.2.post1.dev1 → pytorchautoforge-0.2.0}/pyTorchAutoForge/tensorboard/tensorboard_fcns.py +0 -0
- {pytorchautoforge-0.1.2.post1.dev1 → pytorchautoforge-0.2.0}/pyTorchAutoForge/utils/LossLandscapeVisualizer.py +0 -0
- {pytorchautoforge-0.1.2.post1.dev1 → pytorchautoforge-0.2.0}/pyTorchAutoForge/utils/pytest_test.py +0 -0
- {pytorchautoforge-0.1.2.post1.dev1 → pytorchautoforge-0.2.0}/pyTorchAutoForge/utils/timing_utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pyTorchAutoForge
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.0
|
|
4
4
|
Summary: PyTorchAutoForge library is based on raw PyTorch and designed to automate DNN development, model tracking and deployment, tightly integrated with MLflow and Optuna. It supports Spiking networks libraries (WIP). Deployment can be performed using ONNx, pyTorch facilities or TensorRT (WIP). The library is designed to be compatible with Jetson Orin Nano Jetpack rev6.1, with bash script to automatically configure virtualenv.
|
|
5
5
|
Author-email: "Pietro Califano (PC)" <petercalifano.gs@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -11,34 +11,37 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
11
11
|
Classifier: Programming Language :: Python :: 3.11
|
|
12
12
|
Classifier: Programming Language :: Python :: 3.12
|
|
13
13
|
Requires-Python: >=3.10
|
|
14
|
-
Requires-Dist: albumentations
|
|
15
|
-
Requires-Dist:
|
|
14
|
+
Requires-Dist: albumentations
|
|
15
|
+
Requires-Dist: captum
|
|
16
|
+
Requires-Dist: colorama
|
|
16
17
|
Requires-Dist: dacite
|
|
17
18
|
Requires-Dist: expelliarmus; platform_machine == 'x86_64'
|
|
18
|
-
Requires-Dist:
|
|
19
|
-
Requires-Dist:
|
|
19
|
+
Requires-Dist: inputimeout
|
|
20
|
+
Requires-Dist: kornia
|
|
21
|
+
Requires-Dist: lietorch; platform_machine == 'x86_64'
|
|
20
22
|
Requires-Dist: matplotlib<=3.10.0
|
|
21
|
-
Requires-Dist: mlflow<=2
|
|
22
|
-
Requires-Dist: msgpack
|
|
23
|
-
Requires-Dist: mypy
|
|
23
|
+
Requires-Dist: mlflow<=3.2
|
|
24
|
+
Requires-Dist: msgpack
|
|
25
|
+
Requires-Dist: mypy
|
|
24
26
|
Requires-Dist: norse; platform_machine == 'x86_64'
|
|
25
|
-
Requires-Dist: numpy
|
|
26
|
-
Requires-Dist: onnx<=1.
|
|
27
|
-
Requires-Dist: onnxruntime
|
|
28
|
-
Requires-Dist: onnxscript
|
|
29
|
-
Requires-Dist: optuna
|
|
27
|
+
Requires-Dist: numpy
|
|
28
|
+
Requires-Dist: onnx<=1.18.0
|
|
29
|
+
Requires-Dist: onnxruntime
|
|
30
|
+
Requires-Dist: onnxscript
|
|
31
|
+
Requires-Dist: optuna
|
|
30
32
|
Requires-Dist: pytest<=8.3.5
|
|
31
33
|
Requires-Dist: scikit-learn<=1.6.1
|
|
32
|
-
Requires-Dist: scipy
|
|
33
|
-
Requires-Dist: seaborn
|
|
34
|
+
Requires-Dist: scipy
|
|
35
|
+
Requires-Dist: seaborn
|
|
36
|
+
Requires-Dist: statsmodels
|
|
34
37
|
Requires-Dist: tonic; platform_machine == 'x86_64'
|
|
35
|
-
Requires-Dist: torch-tb-profiler
|
|
36
|
-
Requires-Dist: torch<=2.
|
|
37
|
-
Requires-Dist: torchinfo
|
|
38
|
-
Requires-Dist: torchvision
|
|
39
|
-
Provides-Extra: cuda-
|
|
40
|
-
Requires-Dist: pycuda; (platform_machine == 'x86_64') and extra == 'cuda-
|
|
41
|
-
Requires-Dist: pynvml; (platform_machine == 'x86_64') and extra == 'cuda-
|
|
38
|
+
Requires-Dist: torch-tb-profiler
|
|
39
|
+
Requires-Dist: torch<=2.8.0; platform_machine == 'x86_64'
|
|
40
|
+
Requires-Dist: torchinfo
|
|
41
|
+
Requires-Dist: torchvision; platform_machine == 'x86_64'
|
|
42
|
+
Provides-Extra: cuda-all
|
|
43
|
+
Requires-Dist: pycuda; (platform_machine == 'x86_64') and extra == 'cuda-all'
|
|
44
|
+
Requires-Dist: pynvml; (platform_machine == 'x86_64') and extra == 'cuda-all'
|
|
42
45
|
Description-Content-Type: text/markdown
|
|
43
46
|
|
|
44
47
|
# pyTorchAutoForge
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
# file generated by setuptools-scm
|
|
2
2
|
# don't change, don't track in version control
|
|
3
3
|
|
|
4
|
-
__all__ = [
|
|
4
|
+
__all__ = [
|
|
5
|
+
"__version__",
|
|
6
|
+
"__version_tuple__",
|
|
7
|
+
"version",
|
|
8
|
+
"version_tuple",
|
|
9
|
+
"__commit_id__",
|
|
10
|
+
"commit_id",
|
|
11
|
+
]
|
|
5
12
|
|
|
6
13
|
TYPE_CHECKING = False
|
|
7
14
|
if TYPE_CHECKING:
|
|
@@ -9,13 +16,19 @@ if TYPE_CHECKING:
|
|
|
9
16
|
from typing import Union
|
|
10
17
|
|
|
11
18
|
VERSION_TUPLE = Tuple[Union[int, str], ...]
|
|
19
|
+
COMMIT_ID = Union[str, None]
|
|
12
20
|
else:
|
|
13
21
|
VERSION_TUPLE = object
|
|
22
|
+
COMMIT_ID = object
|
|
14
23
|
|
|
15
24
|
version: str
|
|
16
25
|
__version__: str
|
|
17
26
|
__version_tuple__: VERSION_TUPLE
|
|
18
27
|
version_tuple: VERSION_TUPLE
|
|
28
|
+
commit_id: COMMIT_ID
|
|
29
|
+
__commit_id__: COMMIT_ID
|
|
19
30
|
|
|
20
|
-
__version__ = version = '0.
|
|
21
|
-
__version_tuple__ = version_tuple = (0,
|
|
31
|
+
__version__ = version = '0.2.0'
|
|
32
|
+
__version_tuple__ = version_tuple = (0, 2, 0)
|
|
33
|
+
|
|
34
|
+
__commit_id__ = commit_id = None
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# Default values
|
|
2
|
-
jetson_target=
|
|
3
|
-
editable_mode=
|
|
4
|
-
sudo_mode=
|
|
2
|
+
jetson_target=false
|
|
3
|
+
editable_mode=false
|
|
4
|
+
sudo_mode=false
|
|
5
5
|
venv_name="autoforge"
|
|
6
|
-
create_conda_env=
|
|
6
|
+
create_conda_env=false
|
|
7
7
|
|
|
8
8
|
# Parse options using getopt
|
|
9
9
|
# NOTE: no ":" after option means no argument, ":" means required argument, "::" means optional argument
|
|
@@ -36,18 +36,18 @@ while true; do
|
|
|
36
36
|
shift 2
|
|
37
37
|
;;
|
|
38
38
|
-s|--sudo_mode)
|
|
39
|
-
sudo_mode=
|
|
39
|
+
sudo_mode=true
|
|
40
40
|
echo "Sudo mode requested..."
|
|
41
41
|
shift
|
|
42
42
|
;;
|
|
43
43
|
|
|
44
44
|
-c|--create_conda_env)
|
|
45
|
-
create_conda_env=
|
|
45
|
+
create_conda_env=true
|
|
46
46
|
echo "Creating and initializing conda environment..."
|
|
47
47
|
shift
|
|
48
48
|
;;
|
|
49
49
|
-e|--editable_mode)
|
|
50
|
-
editable_mode=
|
|
50
|
+
editable_mode=true
|
|
51
51
|
echo "Editable mode selected..."
|
|
52
52
|
shift
|
|
53
53
|
;;
|
|
@@ -62,15 +62,15 @@ while true; do
|
|
|
62
62
|
esac
|
|
63
63
|
done
|
|
64
64
|
|
|
65
|
-
if [ $jetson_target
|
|
65
|
+
if [ $jetson_target = true ] && [ ! $sudo_mode = true ]; then
|
|
66
66
|
echo "Jetson target requires sudo mode. Please use -s option."
|
|
67
67
|
exit 1
|
|
68
68
|
fi
|
|
69
69
|
|
|
70
|
-
if [ $create_conda_env
|
|
70
|
+
if [ $create_conda_env = true ]; then
|
|
71
71
|
# Create and activate conda environment
|
|
72
|
-
conda create -n $venv_name python=3.
|
|
73
|
-
conda
|
|
72
|
+
conda create -n $venv_name python=3.12
|
|
73
|
+
source $(conda info --base)/etc/profile.d/conda.sh
|
|
74
74
|
conda activate $venv_name
|
|
75
75
|
else
|
|
76
76
|
echo "Attempt to activate existing conda environment..."
|
|
@@ -89,7 +89,7 @@ fi
|
|
|
89
89
|
|
|
90
90
|
sleep 1
|
|
91
91
|
|
|
92
|
-
if [ $jetson_target
|
|
92
|
+
if [ $jetson_target = false ] && [ ! -f /usr/local/cuda/lib64/libcusparseLt.so ]; then
|
|
93
93
|
echo "libcusparseLt.so not found. Downloading and installing..."
|
|
94
94
|
# if not exist, download and copy to the directory
|
|
95
95
|
wget https://developer.download.nvidia.com/compute/cusparselt/redist/libcusparse_lt/linux-sbsa/libcusparse_lt-linux-sbsa-0.5.2.1-archive.tar.xz
|
|
@@ -100,8 +100,8 @@ if [ $jetson_target -eq 1 ] && [ ! -f /usr/local/cuda/lib64/libcusparseLt.so ];
|
|
|
100
100
|
rm -r libcusparse_lt-linux-sbsa-0.5.2.1-archive
|
|
101
101
|
fi
|
|
102
102
|
|
|
103
|
-
if [ $jetson_target
|
|
104
|
-
|
|
103
|
+
if [ $jetson_target = true ]; then
|
|
104
|
+
|
|
105
105
|
#pip install -r requirements.txt # Install dependencies
|
|
106
106
|
#pip install -e . # Install the package in editable mode
|
|
107
107
|
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
name: autoforge
|
|
2
|
+
channels:
|
|
3
|
+
- defaults
|
|
4
|
+
- https://repo.anaconda.com/pkgs/main
|
|
5
|
+
- https://repo.anaconda.com/pkgs/r
|
|
6
|
+
dependencies:
|
|
7
|
+
- _libgcc_mutex=0.1=main
|
|
8
|
+
- _openmp_mutex=5.1=1_gnu
|
|
9
|
+
- bzip2=1.0.8=h5eee18b_6
|
|
10
|
+
- ca-certificates=2024.12.31=h06a4308_0
|
|
11
|
+
- ld_impl_linux-64=2.40=h12ee557_0
|
|
12
|
+
- libffi=3.4.4=h6a678d5_1
|
|
13
|
+
- libgcc-ng=11.2.0=h1234567_1
|
|
14
|
+
- libgomp=11.2.0=h1234567_1
|
|
15
|
+
- libstdcxx-ng=11.2.0=h1234567_1
|
|
16
|
+
- libuuid=1.41.5=h5eee18b_0
|
|
17
|
+
- ncurses=6.4=h6a678d5_0
|
|
18
|
+
- openssl=3.0.15=h5eee18b_0
|
|
19
|
+
- python=3.11.11=he870216_0
|
|
20
|
+
- readline=8.2=h5eee18b_0
|
|
21
|
+
- setuptools=75.8.0=py311h06a4308_0
|
|
22
|
+
- sqlite=3.45.3=h5eee18b_0
|
|
23
|
+
- tk=8.6.14=h39e8969_0
|
|
24
|
+
- wheel=0.45.1=py311h06a4308_0
|
|
25
|
+
- xz=5.4.6=h5eee18b_1
|
|
26
|
+
- zlib=1.2.13=h5eee18b_1
|
|
27
|
+
- pip:
|
|
28
|
+
- absl-py==2.1.0
|
|
29
|
+
- accelerate==1.3.0
|
|
30
|
+
- aestream==0.6.4
|
|
31
|
+
- aiohappyeyeballs==2.4.6
|
|
32
|
+
- aiohttp==3.11.12
|
|
33
|
+
- aiosignal==1.3.2
|
|
34
|
+
- albucore==0.0.23
|
|
35
|
+
- albumentations==1.4.24
|
|
36
|
+
- alembic==1.14.1
|
|
37
|
+
- annotated-types==0.7.0
|
|
38
|
+
- anyio==4.9.0
|
|
39
|
+
- argcomplete==3.5.1
|
|
40
|
+
- attrs==25.1.0
|
|
41
|
+
- audioread==3.0.1
|
|
42
|
+
- backports-tarfile==1.2.0
|
|
43
|
+
- blinker==1.9.0
|
|
44
|
+
- build==1.2.2.post1
|
|
45
|
+
- cachetools==5.5.1
|
|
46
|
+
- certifi==2025.1.31
|
|
47
|
+
- cffi==1.17.1
|
|
48
|
+
- charset-normalizer==3.4.1
|
|
49
|
+
- click==8.1.8
|
|
50
|
+
- cloudpickle==3.1.1
|
|
51
|
+
- colorama==0.4.6
|
|
52
|
+
- coloredlogs==15.0.1
|
|
53
|
+
- colorlog==6.9.0
|
|
54
|
+
- contourpy==1.3.1
|
|
55
|
+
- cppimport==22.8.2
|
|
56
|
+
- cryptography==44.0.1
|
|
57
|
+
- cupy-cuda12x==13.3.0
|
|
58
|
+
- cycler==0.12.1
|
|
59
|
+
- dacite==1.9.2
|
|
60
|
+
- databricks-sdk==0.43.0
|
|
61
|
+
- datasets==3.3.0
|
|
62
|
+
- decorator==5.1.1
|
|
63
|
+
- deprecated==1.2.18
|
|
64
|
+
- diffusers==0.32.2
|
|
65
|
+
- dill==0.3.8
|
|
66
|
+
- distlib==0.3.9
|
|
67
|
+
- docker==7.1.0
|
|
68
|
+
- docutils==0.21.2
|
|
69
|
+
- dv-processing==1.7.9
|
|
70
|
+
- easygui==0.98.3
|
|
71
|
+
- engineering-notation==0.10.0
|
|
72
|
+
- expelliarmus==1.1.12
|
|
73
|
+
- fastrlock==0.8.3
|
|
74
|
+
- filelock==3.16.1
|
|
75
|
+
- flask==3.1.0
|
|
76
|
+
- flatbuffers==25.2.10
|
|
77
|
+
- fonttools==4.55.0
|
|
78
|
+
- frozenlist==1.5.0
|
|
79
|
+
- fsspec==2024.10.0
|
|
80
|
+
- gitdb==4.0.12
|
|
81
|
+
- gitpython==3.1.44
|
|
82
|
+
- google-auth==2.38.0
|
|
83
|
+
- graphene==3.4.3
|
|
84
|
+
- graphql-core==3.2.6
|
|
85
|
+
- graphql-relay==3.2.0
|
|
86
|
+
- greenlet==3.1.1
|
|
87
|
+
- grpcio==1.70.0
|
|
88
|
+
- gunicorn==23.0.0
|
|
89
|
+
- h11==0.14.0
|
|
90
|
+
- h5py==3.12.1
|
|
91
|
+
- hatch==1.14.0
|
|
92
|
+
- hatchling==1.27.0
|
|
93
|
+
- httpcore==1.0.7
|
|
94
|
+
- httpx==0.28.1
|
|
95
|
+
- huggingface-hub==0.28.1
|
|
96
|
+
- humanfriendly==10.0
|
|
97
|
+
- hyperlink==21.0.0
|
|
98
|
+
- id==1.5.0
|
|
99
|
+
- idna==3.10
|
|
100
|
+
- imageio==2.36.0
|
|
101
|
+
- importlib-metadata==8.5.0
|
|
102
|
+
- importrosbag==1.0.4
|
|
103
|
+
- iniconfig==2.0.0
|
|
104
|
+
- itsdangerous==2.2.0
|
|
105
|
+
- jaraco-classes==3.4.0
|
|
106
|
+
- jaraco-context==6.0.1
|
|
107
|
+
- jaraco-functools==4.1.0
|
|
108
|
+
- jeepney==0.8.0
|
|
109
|
+
- jinja2==3.1.4
|
|
110
|
+
- joblib==1.4.2
|
|
111
|
+
- juliacall==0.9.24
|
|
112
|
+
- juliapkg==0.1.16
|
|
113
|
+
- keyring==25.6.0
|
|
114
|
+
- kiwisolver==1.4.7
|
|
115
|
+
- kornia==0.7.4
|
|
116
|
+
- kornia-rs==0.1.8
|
|
117
|
+
- lazy-loader==0.4
|
|
118
|
+
- librosa==0.10.2.post1
|
|
119
|
+
- lietorch==0.6.2.post1
|
|
120
|
+
- llvmlite==0.43.0
|
|
121
|
+
- mako==1.3.9
|
|
122
|
+
- markdown==3.7
|
|
123
|
+
- markdown-it-py==3.0.0
|
|
124
|
+
- markupsafe==3.0.2
|
|
125
|
+
- matplotlib==3.9.2
|
|
126
|
+
- mdurl==0.1.2
|
|
127
|
+
- ml-dtypes==0.5.1
|
|
128
|
+
- mlflow==2.19.0
|
|
129
|
+
- mlflow-skinny==2.19.0
|
|
130
|
+
- more-itertools==10.6.0
|
|
131
|
+
- mpmath==1.3.0
|
|
132
|
+
- msgpack==1.1.0
|
|
133
|
+
- multidict==6.1.0
|
|
134
|
+
- multiprocess==0.70.16
|
|
135
|
+
- mypy==1.15.0
|
|
136
|
+
- mypy-extensions==1.0.0
|
|
137
|
+
- nanobind==2.5.0
|
|
138
|
+
- narwhals==1.34.0
|
|
139
|
+
- netron==8.2.2
|
|
140
|
+
- networkx==3.4.2
|
|
141
|
+
- nh3==0.2.20
|
|
142
|
+
- ninja==1.11.1.3
|
|
143
|
+
- nir==1.0.4
|
|
144
|
+
- nirtorch==1.0
|
|
145
|
+
- norse==1.1.0
|
|
146
|
+
- numba==0.60.0
|
|
147
|
+
- numpy==1.26.4
|
|
148
|
+
- nvidia-cublas-cu12==12.4.5.8
|
|
149
|
+
- nvidia-cuda-cupti-cu12==12.4.127
|
|
150
|
+
- nvidia-cuda-nvrtc-cu12==12.4.127
|
|
151
|
+
- nvidia-cuda-runtime-cu12==12.4.127
|
|
152
|
+
- nvidia-cudnn-cu12==9.1.0.70
|
|
153
|
+
- nvidia-cufft-cu12==11.2.1.3
|
|
154
|
+
- nvidia-curand-cu12==10.3.5.147
|
|
155
|
+
- nvidia-cusolver-cu12==11.6.1.9
|
|
156
|
+
- nvidia-cusparse-cu12==12.3.1.170
|
|
157
|
+
- nvidia-cusparselt-cu12==0.6.2
|
|
158
|
+
- nvidia-ml-py==12.570.86
|
|
159
|
+
- nvidia-modelopt==0.23.1
|
|
160
|
+
- nvidia-modelopt-core==0.23.1
|
|
161
|
+
- nvidia-nccl-cu12==2.21.5
|
|
162
|
+
- nvidia-nvjitlink-cu12==12.4.127
|
|
163
|
+
- nvidia-nvtx-cu12==12.4.127
|
|
164
|
+
- onnx==1.17.0
|
|
165
|
+
- onnx-graphsurgeon==0.5.5
|
|
166
|
+
- onnxconverter-common==1.14.0
|
|
167
|
+
- onnxmltools==1.13.0
|
|
168
|
+
- onnxruntime==1.20.0
|
|
169
|
+
- onnxruntime-gpu==1.20.1
|
|
170
|
+
- onnxscript==0.2.0
|
|
171
|
+
- opencv-python==4.10.0.84
|
|
172
|
+
- opencv-python-headless==4.11.0.86
|
|
173
|
+
- opentelemetry-api==1.30.0
|
|
174
|
+
- opentelemetry-sdk==1.30.0
|
|
175
|
+
- opentelemetry-semantic-conventions==0.51b0
|
|
176
|
+
- optuna==4.1.0
|
|
177
|
+
- packaging==24.2
|
|
178
|
+
- pandas==2.2.3
|
|
179
|
+
- pathspec==0.12.1
|
|
180
|
+
- pbr==6.1.1
|
|
181
|
+
- peft==0.14.0
|
|
182
|
+
- pexpect==4.9.0
|
|
183
|
+
- pillow==9.5.0
|
|
184
|
+
- pip==25.0.1
|
|
185
|
+
- platformdirs==4.3.6
|
|
186
|
+
- plotly==6.0.1
|
|
187
|
+
- pluggy==1.5.0
|
|
188
|
+
- plyer==2.1.0
|
|
189
|
+
- pooch==1.8.2
|
|
190
|
+
- propcache==0.2.1
|
|
191
|
+
- protobuf==3.20.2
|
|
192
|
+
- psutil==7.0.0
|
|
193
|
+
- ptyprocess==0.7.0
|
|
194
|
+
- pulp==2.9.0
|
|
195
|
+
- pyarrow==18.1.0
|
|
196
|
+
- pyasn1==0.6.1
|
|
197
|
+
- pyasn1-modules==0.4.1
|
|
198
|
+
- pybind11==2.13.6
|
|
199
|
+
- pycparser==2.22
|
|
200
|
+
- pycuda==2025.1
|
|
201
|
+
- pydantic==2.10.6
|
|
202
|
+
- pydantic-core==2.27.2
|
|
203
|
+
- pygments==2.19.1
|
|
204
|
+
- pynvml==12.0.0
|
|
205
|
+
- pyparsing==3.2.0
|
|
206
|
+
- pyproject-hooks==1.2.0
|
|
207
|
+
- pysdl2==0.9.17
|
|
208
|
+
- pysdl2-dll==2.30.10
|
|
209
|
+
- pysr==1.5.2
|
|
210
|
+
- pytest==8.3.4
|
|
211
|
+
- python-dateutil==2.9.0.post0
|
|
212
|
+
- pytools==2025.1.1
|
|
213
|
+
- pytz==2025.1
|
|
214
|
+
- pyyaml==6.0.2
|
|
215
|
+
- readme-renderer==44.0
|
|
216
|
+
- regex==2024.11.6
|
|
217
|
+
- requests==2.32.3
|
|
218
|
+
- requests-toolbelt==1.0.0
|
|
219
|
+
- rfc3986==2.0.0
|
|
220
|
+
- rich==13.9.4
|
|
221
|
+
- rsa==4.9
|
|
222
|
+
- safetensors==0.5.2
|
|
223
|
+
- scikit-image==0.24.0
|
|
224
|
+
- scikit-learn==1.6.1
|
|
225
|
+
- scipy==1.14.1
|
|
226
|
+
- screeninfo==0.8.1
|
|
227
|
+
- seaborn==0.13.2
|
|
228
|
+
- secretstorage==3.3.3
|
|
229
|
+
- semver==3.0.4
|
|
230
|
+
- shellingham==1.5.4
|
|
231
|
+
- simsimd==6.2.1
|
|
232
|
+
- six==1.16.0
|
|
233
|
+
- smmap==5.0.2
|
|
234
|
+
- sniffio==1.3.1
|
|
235
|
+
- soundfile==0.13.1
|
|
236
|
+
- soxr==0.5.0.post1
|
|
237
|
+
- sqlalchemy==2.0.38
|
|
238
|
+
- sqlparse==0.5.3
|
|
239
|
+
- stringzilla==3.11.3
|
|
240
|
+
- sympy==1.13.1
|
|
241
|
+
- tensorboard==2.18.0
|
|
242
|
+
- tensorboard-data-server==0.7.2
|
|
243
|
+
- tensorrt==10.7.0.post1
|
|
244
|
+
- tensorrt-cu12==10.7.0.post1
|
|
245
|
+
- tensorrt-cu12-bindings==10.7.0.post1
|
|
246
|
+
- tensorrt-cu12-libs==10.7.0.post1
|
|
247
|
+
- threadpoolctl==3.5.0
|
|
248
|
+
- tifffile==2024.9.20
|
|
249
|
+
- tokenizers==0.21.0
|
|
250
|
+
- tomli-w==1.2.0
|
|
251
|
+
- tomlkit==0.13.2
|
|
252
|
+
- tonic==1.6.0
|
|
253
|
+
- torch==2.6.0
|
|
254
|
+
- torch-tb-profiler==0.4.3
|
|
255
|
+
- torch-tensorrt==2.6.0
|
|
256
|
+
- torchinfo==1.8.0
|
|
257
|
+
- torchprofile==0.0.4
|
|
258
|
+
- torchvision==0.21.0
|
|
259
|
+
- tqdm==4.67.0
|
|
260
|
+
- transformers==4.48.3
|
|
261
|
+
- triton==3.2.0
|
|
262
|
+
- trove-classifiers==2025.3.19.19
|
|
263
|
+
- twine==6.1.0
|
|
264
|
+
- typing-extensions==4.12.2
|
|
265
|
+
- tzdata==2025.1
|
|
266
|
+
- urllib3==2.3.0
|
|
267
|
+
- userpath==1.9.2
|
|
268
|
+
- uv==0.6.12
|
|
269
|
+
- virtualenv==20.30.0
|
|
270
|
+
- werkzeug==3.1.3
|
|
271
|
+
- wrapt==1.17.2
|
|
272
|
+
- xxhash==3.5.0
|
|
273
|
+
- yarl==1.18.3
|
|
274
|
+
- zipp==3.21.0
|
|
275
|
+
- zstandard==0.23.0
|
|
276
|
+
prefix: /home/peterc/miniconda3/envs/autoforge
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Import scripts of the library at initialization
|
|
2
|
-
|
|
2
|
+
# TODO remove * imports, no need to have these here, user must not be able to import everything directly from pyTorchAutoForge handle
|
|
3
3
|
from .utils import *
|
|
4
4
|
from .optimization import *
|
|
5
5
|
from .model_building import *
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
from .onnx import ModelHandlerONNx
|
|
2
|
+
from .tcp import DataProcessor, pytcp_server, pytcp_requestHandler, ProcessingMode
|
|
3
|
+
from .torch import LoadModel, SaveModel, LoadDataset, SaveDataset, AutoForgeModuleSaveMode
|
|
4
|
+
from .mlflow import StartMLflowUI
|
|
5
|
+
from .matlab import TorchModelMATLABwrapper
|
|
6
|
+
#from .telegram import AutoForgeAlertSystemBot
|
|
7
|
+
|
|
8
|
+
__all__ = ['LoadModel',
|
|
9
|
+
'SaveModel',
|
|
10
|
+
'ModelHandlerONNx',
|
|
11
|
+
'LoadDataset',
|
|
12
|
+
'SaveDataset',
|
|
13
|
+
'StartMLflowUI',
|
|
14
|
+
'TorchModelMATLABwrapper',
|
|
15
|
+
'DataProcessor',
|
|
16
|
+
'pytcp_server',
|
|
17
|
+
'pytcp_requestHandler',
|
|
18
|
+
'ProcessingMode',
|
|
19
|
+
'AutoForgeModuleSaveMode']
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from pickle import NONE
|
|
2
2
|
from pyTorchAutoForge.utils.utils import GetDevice
|
|
3
|
-
from pyTorchAutoForge.model_building.
|
|
4
|
-
from pyTorchAutoForge.api.torch import
|
|
3
|
+
from pyTorchAutoForge.model_building.modelBuildingBlocks import AutoForgeModule
|
|
4
|
+
from pyTorchAutoForge.api.torch import LoadModel
|
|
5
5
|
import numpy as np
|
|
6
6
|
import torch, os
|
|
7
7
|
from torch import nn
|
|
@@ -11,7 +11,7 @@ from dataclasses import dataclass
|
|
|
11
11
|
class MatlabWrapperConfig():
|
|
12
12
|
# Default wrapper configuration
|
|
13
13
|
DEBUG_MODE: bool = False
|
|
14
|
-
device =
|
|
14
|
+
device : torch.device | str | None = None
|
|
15
15
|
input_shape_validation: list | None = None # None for no validation
|
|
16
16
|
loading_mode: str | None = None # 'traced', 'state_dict', None
|
|
17
17
|
trained_model_path: str | None = None
|
|
@@ -20,7 +20,7 @@ class MatlabWrapperConfig():
|
|
|
20
20
|
# %% MATLAB wrapper class for Torch models evaluation - 11-06-2024 # TODO: update class
|
|
21
21
|
class TorchModelMATLABwrapper():
|
|
22
22
|
'''Class to wrap a trained PyTorch model for evaluation in MATLAB'''
|
|
23
|
-
def __init__(self, trainedModel: str | nn.Module |
|
|
23
|
+
def __init__(self, trainedModel: str | nn.Module | AutoForgeModule,
|
|
24
24
|
wrapperConfig: MatlabWrapperConfig = MatlabWrapperConfig(),
|
|
25
25
|
modelArch: nn.Module | None = None) -> None:
|
|
26
26
|
|
|
@@ -31,7 +31,7 @@ class TorchModelMATLABwrapper():
|
|
|
31
31
|
|
|
32
32
|
# Initialize using configuration class
|
|
33
33
|
self.DEBUG_MODE = wrapperConfig.DEBUG_MODE
|
|
34
|
-
self.device = wrapperConfig.device
|
|
34
|
+
self.device = wrapperConfig.device if wrapperConfig.device is not None else GetDevice()
|
|
35
35
|
self.enable_warning = True # To disable warning for batch size
|
|
36
36
|
self.input_shape_validation = wrapperConfig.input_shape_validation
|
|
37
37
|
self.loading_mode = wrapperConfig.loading_mode
|
|
@@ -45,15 +45,15 @@ class TorchModelMATLABwrapper():
|
|
|
45
45
|
# raise ValueError(
|
|
46
46
|
# 'Model architecture must be provided for state_dict loading mode. Please provide modelArch as nn.Module or callable function with modelArch as output.')
|
|
47
47
|
|
|
48
|
-
if isinstance(trainedModel, (nn.Module,
|
|
48
|
+
if isinstance(trainedModel, (nn.Module, AutoForgeModule)) and self.loading_mode is None:
|
|
49
49
|
self.trainedModel = trainedModel # Assume model is already loaded and provided
|
|
50
50
|
|
|
51
|
-
elif isinstance(trainedModel, (nn.Module,
|
|
52
|
-
self.trainedModel =
|
|
51
|
+
elif isinstance(trainedModel, (nn.Module, AutoForgeModule)) and self.loading_mode == 'traced':
|
|
52
|
+
self.trainedModel = LoadModel(
|
|
53
53
|
None, self.trained_model_path, loadAsTraced=traced_loading).to(self.device)
|
|
54
54
|
|
|
55
|
-
elif isinstance(trainedModel, (nn.Module,
|
|
56
|
-
self.trainedModel =
|
|
55
|
+
elif isinstance(trainedModel, (nn.Module, AutoForgeModule)) and self.loading_mode == 'state_dict':
|
|
56
|
+
self.trainedModel = LoadModel(
|
|
57
57
|
trainedModel, self.trained_model_path, loadAsTraced=traced_loading).to(self.device)
|
|
58
58
|
else:
|
|
59
59
|
raise ValueError(
|