2024-02-16 09:39:22 +08:00
|
|
|
[build-system]
|
|
|
|
requires = ["pdm-backend"]
|
|
|
|
build-backend = "pdm.backend"
|
|
|
|
|
|
|
|
[project]
|
|
|
|
name = "timm"
|
|
|
|
authors = [
|
|
|
|
{name = "Ross Wightman", email = "ross@huggingface.co"},
|
|
|
|
]
|
|
|
|
description = "PyTorch Image Models"
|
|
|
|
readme = "README.md"
|
|
|
|
requires-python = ">=3.8"
|
|
|
|
keywords = ["pytorch", "image-classification"]
|
|
|
|
license = {text = "Apache-2.0"}
|
|
|
|
classifiers = [
|
2024-04-11 23:55:27 +08:00
|
|
|
'Development Status :: 5 - Production/Stable',
|
2024-02-16 09:39:22 +08:00
|
|
|
'Intended Audience :: Education',
|
|
|
|
'Intended Audience :: Science/Research',
|
|
|
|
'License :: OSI Approved :: Apache Software License',
|
|
|
|
'Programming Language :: Python :: 3.8',
|
|
|
|
'Programming Language :: Python :: 3.9',
|
|
|
|
'Programming Language :: Python :: 3.10',
|
|
|
|
'Programming Language :: Python :: 3.11',
|
|
|
|
'Programming Language :: Python :: 3.12',
|
|
|
|
'Topic :: Scientific/Engineering',
|
|
|
|
'Topic :: Scientific/Engineering :: Artificial Intelligence',
|
|
|
|
'Topic :: Software Development',
|
|
|
|
'Topic :: Software Development :: Libraries',
|
|
|
|
'Topic :: Software Development :: Libraries :: Python Modules',
|
|
|
|
]
|
|
|
|
dependencies = [
|
|
|
|
'torch',
|
|
|
|
'torchvision',
|
|
|
|
'pyyaml',
|
|
|
|
'huggingface_hub',
|
|
|
|
'safetensors',
|
|
|
|
]
|
|
|
|
dynamic = ["version"]
|
|
|
|
|
|
|
|
[project.urls]
|
|
|
|
homepage = "https://github.com/huggingface/pytorch-image-models"
|
|
|
|
documentation = "https://huggingface.co/docs/timm/en/index"
|
|
|
|
repository = "https://github.com/huggingface/pytorch-image-models"
|
|
|
|
|
|
|
|
[tool.pdm.dev-dependencies]
|
|
|
|
test = [
|
|
|
|
'pytest',
|
|
|
|
'pytest-timeout',
|
|
|
|
'pytest-xdist',
|
|
|
|
'pytest-forked',
|
|
|
|
'expecttest',
|
|
|
|
]
|
|
|
|
|
|
|
|
[tool.pdm.version]
|
|
|
|
source = "file"
|
|
|
|
path = "timm/version.py"
|
|
|
|
|
Add pytest-cov, requirements-dev, pyproject.toml
When tests finish, a report should be printed that shows the code
coverage of timm. This should give us a better idea where we should work
on test coverage.
I have tested this locally (on a subset of tests) and it worked.
Since the number of test dependencies was getting quite high, I created
a requirements-dev.txt and moved them there. GH action and
CONTRIBUTING.md are adjusted accordingly.
Furthermore, instead of extending the pytest invocation, I created a
pyproject.toml and added the coverage options there. For completeness, I
also added the black settings that come closest to the style of timm.
LMK if this is not desired.
For now, the coverage is only reported but not enforced. I.e. when a PR
is created that adds uncovered lines, CI will still succeed. We could
think about adding codecov or something like that, but it can be
annoying sometimes and the service was flaky for me in the past.
2023-02-23 21:11:03 +08:00
|
|
|
[tool.pytest.ini_options]
|
2024-02-17 01:04:00 +08:00
|
|
|
testpaths = ['tests']
|
|
|
|
markers = [
|
|
|
|
"base: marker for model tests using the basic setup",
|
|
|
|
"cfg: marker for model tests checking the config",
|
|
|
|
"torchscript: marker for model tests using torchscript",
|
|
|
|
"features: marker for model tests checking feature extraction",
|
|
|
|
"fxforward: marker for model tests using torch fx (only forward)",
|
|
|
|
"fxbackward: marker for model tests using torch fx (only backward)",
|
|
|
|
]
|