Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
194 lines (175 loc) · 4.74 KB
/
Copy pathpyproject.toml
File metadata and controls
194 lines (175 loc) · 4.74 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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
[build-system]
requires = ["hatchling", "versioningit"]
build-backend = "hatchling.build"
[project]
name = "madengine"
dynamic = ["version"]
authors = [
{ name="Advanced Micro Devices", email="mad.support@amd.com" },
]
description = "MAD Engine is a set of interfaces to run various AI models from public MAD."
readme = "README.md"
requires-python = ">=3.8"
dependencies = [
"pandas",
"GitPython",
"jsondiff",
"sqlalchemy",
"paramiko",
"tqdm",
"typing-extensions",
"pymongo",
"toml",
"typer>=0.9.0",
"rich>=13.0.0",
"click>=8.0.0",
"jinja2>=3.0.0",
"pyyaml>=6.0",
"hydra-core>=1.3",
"omegaconf>=2.3",
"kubernetes>=28.0.0",
"pytest>=7.0",
"pytest-cov",
"pytest-xdist",
"pytest-timeout",
"pytest-mock",
"pytest-asyncio",
"black>=21.0.0",
"flake8",
"mypy>=0.910",
"isort",
"pre-commit",
]
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
[project.optional-dependencies]
# Host-side trace analysis for `madengine report tracelens`. Kept optional
# because TraceLens pins protobuf>=6.31 and xprof, which can conflict with other
# packages in a shared environment.
tracelens = [
"TraceLens @ git+https://github.com/AMD-AGI/TraceLens.git@6f9bcdbf6cc9911eb650de57b345917ea4d31a17",
]
[project.scripts]
madengine = "madengine.cli.app:cli_main"
[project.urls]
Homepage = "https://github.com/ROCm/madengine"
Issues = "https://github.com/ROCm/madengine/issues"
[tool.hatch.metadata]
# The tracelens extra installs TraceLens from git; hatchling rejects such direct
# references during metadata generation unless they are allowed here.
allow-direct-references = true
[tool.hatch.build.targets.wheel]
# scripts/ is listed in .gitignore (to exclude external MAD project scripts/ dirs during dev).
# artifacts bypasses VCS exclusion without risk of duplicate-file errors from force-include.
# configs/ Hydra groups must ship in the wheel for --config compose.
artifacts = [
"src/madengine/scripts/**",
"src/madengine/configs/**",
]
[tool.hatch.version]
source = "versioningit"
[tool.versioningit.vcs]
method = "git"
default-tag = "v2.0.0"
[tool.versioningit.tag2version]
regex = "v(?P<version>.*)"
[tool.versioningit.format]
distance = "{base_version}.post{distance}+{vcs}{rev}"
dirty = "{base_version}+d{build_date:%Y%m%d}"
distance-dirty = "{base_version}.post{distance}+{vcs}{rev}.d{build_date:%Y%m%d}"
# Code formatting and linting configuration
[tool.black]
line-length = 88
target-version = ['py38', 'py39', 'py310', 'py311']
include = '\.pyi?$'
extend-exclude = '''
/(
# directories
\.eggs
| \.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| build
| dist
)/
'''
[tool.isort]
profile = "black"
multi_line_output = 3
line_length = 88
known_first_party = ["madengine"]
known_third_party = ["pytest", "pandas", "numpy", "sqlalchemy"]
[tool.mypy]
python_version = "3.8"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = false
disallow_incomplete_defs = false
check_untyped_defs = true
disallow_untyped_decorators = false
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
warn_unreachable = true
strict_equality = true
[[tool.mypy.overrides]]
module = [
"paramiko.*",
"pymongo.*",
"toml.*",
"jsondiff.*",
"git.*",
"kubernetes.*",
"yaml.*",
]
ignore_missing_imports = true
[tool.pytest.ini_options]
testpaths = ["tests/unit", "tests/integration", "tests/e2e"]
pythonpath = ["src"]
addopts = "-v --tb=short -ra --strict-markers -W default"
minversion = "7.0"
filterwarnings = [
"ignore::DeprecationWarning",
"ignore::PendingDeprecationWarning",
]
markers = [
"unit: Fast unit tests (no external dependencies)",
"integration: Integration tests (may be slower, test multiple components)",
"e2e: End-to-end tests (require full environment, Docker, may be very slow)",
"slow: Slow tests (can be skipped with -m \"not slow\")",
"gpu: Tests that require GPU hardware",
"amd: Tests specific to AMD GPUs",
"nvidia: Tests specific to NVIDIA GPUs",
"cpu: Tests for CPU-only execution",
"requires_docker: Tests that require Docker daemon",
"requires_models: Tests that require model fixtures",
]
[tool.coverage.run]
source = ["src/madengine"]
omit = [
"*/tests/*",
"*/test_*",
"*/__pycache__/*",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"if self.debug:",
"if settings.DEBUG",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"if __name__ == .__main__.:",
"class .*\\bProtocol\\):",
"@(abc\\.)?abstractmethod",
]
[tool.bandit]
exclude_dirs = ["tests", "venv", "build", "dist", ".git"]
skips = ["B101"] # Skip assert_used (used in tests)