microsoft/hve-core
Publicmirrored from https://github.com/microsoft/hve-coreAvailable
scripts/evals/moderation/pyproject.toml
49lines · modecode
| 1 | [project] |
| 2 | name = "hve-core-moderation" |
| 3 | version = "1.0.0" |
| 4 | description = "Content moderation tooling for eval input/output screening" |
| 5 | requires-python = ">=3.11" |
| 6 | dependencies = [ |
| 7 | "detoxify==0.5.2", |
| 8 | "torch==2.12.0", |
| 9 | "transformers>=4.40,<5", |
| 10 | ] |
| 11 | |
| 12 | # Resolve torch from the CPU-only wheel index. This eval is a CPU-bound |
| 13 | # Detoxify toxicity classifier with no GPU code path, so the default PyPI |
| 14 | # torch wheel's nvidia-*-cu12 CUDA runtime dependencies are unnecessary. |
| 15 | [[tool.uv.index]] |
| 16 | name = "pytorch-cpu" |
| 17 | url = "https://download.pytorch.org/whl/cpu" |
| 18 | explicit = true |
| 19 | |
| 20 | [tool.uv.sources] |
| 21 | torch = { index = "pytorch-cpu" } |
| 22 | |
| 23 | [tool.ruff] |
| 24 | line-length = 120 |
| 25 | target-version = "py311" |
| 26 | |
| 27 | [tool.ruff.lint] |
| 28 | select = ["E", "F", "I", "W"] |
| 29 | ignore = [] |
| 30 | |
| 31 | [tool.pytest.ini_options] |
| 32 | testpaths = ["tests"] |
| 33 | python_files = ["test_*.py", "fuzz_harness.py"] |
| 34 | addopts = [ |
| 35 | "-v", |
| 36 | "--strict-markers", |
| 37 | "--tb=short", |
| 38 | ] |
| 39 | |
| 40 | [dependency-groups] |
| 41 | dev = [ |
| 42 | "pytest>=8.0", |
| 43 | "pytest-cov>=7.0", |
| 44 | "pytest-mock>=3.14", |
| 45 | "ruff>=0.6", |
| 46 | ] |
| 47 | fuzz = [ |
| 48 | "atheris>=3.0", |
| 49 | ] |
| 50 | |