-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
155 lines (140 loc) · 4.78 KB
/
Copy pathpyproject.toml
File metadata and controls
155 lines (140 loc) · 4.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[project]
name = "pyTorchAutoForge"
description='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 a bash script to configure conda-based development environments.'
readme = "README.md"
requires-python = ">=3.10"
dynamic = ["version"]
license = {text = "MIT"}
authors = [
{ name = "Pietro Califano (PC)", email = "petercalifano.gs@gmail.com" }
]
dependencies = [
"torch-tb-profiler",
"scikit-learn<=1.6.1",
"dacite",
"scipy",
"numpy",
"onnx",
"onnxscript",
"onnxruntime",
"inputimeout",
"optuna",
"mlflow<=3.4",
"kornia",
"albumentations",
"pytest<=8.3.5",
"mypy",
"seaborn",
"matplotlib<=3.10.0",
"colorama",
"msgpack",
"torchinfo",
"torch>=2.7,<2.12; platform_machine == 'x86_64'", # Only for x86_64. Jetson requires nvidia version
"torchvision; platform_machine == 'x86_64'", # Only for x86_64. Jetson requires nvidia version
"norse; platform_machine == 'x86_64'",
"tonic; platform_machine == 'x86_64'",
"expelliarmus; platform_machine == 'x86_64'",
"statsmodels"
]
# "lietorch; platform_machine == 'x86_64'"
classifiers=[
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.10',
'License :: OSI Approved :: MIT License',
'Operating System :: POSIX :: Linux',
]
# pyproject.toml (if using PEP 621)
[project.optional-dependencies]
cuda_all = [
"pynvml; platform_machine == 'x86_64'",
]
test = [
"coverage[toml]",
"pytest-cov",
]
docs = [
"sphinx",
"pydata-sphinx-theme",
"myst-parser",
"sphinx-autoapi",
"sphinx-copybutton",
]
[tool.hatch.build.targets.wheel]
packages = ["pyTorchAutoForge"]
# pytest configuration
[tool.pytest.ini_options]
testpaths = ["tests/*"]
python_files = ["test*.py", "test_*.py", "*_test.py"]
python_functions = ["test_*", "*test", "test*", "Test*"]
addopts = """--ignore=lib/
--maxfail=10
-raxs
--disable-warnings
"""
console_output_style = "count"
markers = [
"unit: fast test with no external service, large dataset, GPU, or long-running export requirement",
"integration: test spanning multiple subsystems or external-style runtime behavior",
"slow: test intentionally excluded from default runs unless --run-slow is passed",
"gpu: test requiring a usable CUDA runtime, excluded unless --run-gpu is passed",
"visual: plotting or visual-inspection-oriented test, excluded unless --run-visual is passed",
"export: model export or runtime-serialization test",
]
# Specify folders to ignore
norecursedirs = ["*deprecated*", "*data", "*cache", "**/site-packages", "dist", "build"]
collect_ignore = ["**/*deprecated*"]
# Adding additional pytest configurations if necessary
# For example, you could set configuration for logging
log_cli_level = "INFO" # Ensure log level is a string for compatibility
log_file_level = "DEBUG" # Adding log file level for more detailed logs
# Adding configuration for test coverage
[tool.coverage.run]
branch = true
source = ["pyTorchAutoForge"]
omit = ["tests/*"] # Excludes tests from coverage analysis
[tool.coverage.report]
show_missing = true
[tool.coverage.html]
directory = "coverage_html_report"
#mypy configuration
[tool.mypy]
files = ["pyTorchAutoForge", "tests"]
ignore_missing_imports = true # Ignore type errors from external libraries
exclude = [
"site-packages/.*",
".venv/.*",
"env/.*",
"dist/.*",
"build/.*",
"deprecated/.*",
"cache/.*",
"data/.*"
]
warn_unused_ignores = true
warn_redundant_casts = true
warn_return_any = true
warn_unreachable = true
disallow_untyped_defs = false # Enforce type checking on all function definitions
disallow_untyped_decorators = true # Ensure decorators are typed
strict = false
cache_dir = ".mypy_cache"
allow_redefinition = true
warn_unused_configs = true
show_error_codes = true
show_column_numbers = true
check_untyped_defs = true
follow_imports = "normal"
local_partial_types = true
enable_error_code = "possibly-undefined"
# Versioning settings with hatch and hatch-vcs
[tool.hatch.version]
source = "vcs"
raw-options = { local_scheme = "no-local-version" }
[tool.hatch.build.hooks.vcs]
version-file = "_version.py"
[tool.hatch.build.targets.sdist]
only-include = ["pyTorchAutoForge", "conda_install.sh", "environment.yml", "examples/example_*", "README.md", "LICENSE", "pyproject.toml", "_version.py"]