mirror of
https://github.com/elder-plinius/OBLITERATUS.git
synced 2026-08-17 16:37:30 +02:00
152 lines
4.1 KiB
TOML
152 lines
4.1 KiB
TOML
[build-system]
|
|
requires = ["setuptools==80.9.0", "wheel==0.45.1"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[project]
|
|
name = "obliteratus"
|
|
version = "0.1.2"
|
|
description = "Master Ablation Suite for HuggingFace transformers"
|
|
readme = "README.md"
|
|
requires-python = ">=3.10"
|
|
license = "AGPL-3.0-or-later"
|
|
license-files = ["LICENSE"]
|
|
keywords = ["abliteration", "mechanistic-interpretability", "refusal-removal", "llm", "transformers", "alignment"]
|
|
classifiers = [
|
|
"Development Status :: 4 - Beta",
|
|
"Intended Audience :: Science/Research",
|
|
"Programming Language :: Python :: 3.10",
|
|
"Programming Language :: Python :: 3.11",
|
|
"Programming Language :: Python :: 3.12",
|
|
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
|
]
|
|
|
|
dependencies = [
|
|
"torch>=2.0",
|
|
"transformers>=4.40",
|
|
"datasets>=2.14",
|
|
"accelerate>=0.24",
|
|
"safetensors>=0.4",
|
|
"pyyaml>=6.0",
|
|
"rich>=13.0",
|
|
"matplotlib>=3.7",
|
|
"seaborn>=0.12",
|
|
"pandas>=2.0",
|
|
"numpy>=1.24",
|
|
"scikit-learn>=1.3",
|
|
"tqdm>=4.64",
|
|
"bitsandbytes>=0.46.1",
|
|
]
|
|
|
|
[project.urls]
|
|
"Homepage" = "https://github.com/elder-plinius/OBLITERATUS"
|
|
"Repository" = "https://github.com/elder-plinius/OBLITERATUS"
|
|
"Bug Tracker" = "https://github.com/elder-plinius/OBLITERATUS/issues"
|
|
|
|
[project.optional-dependencies]
|
|
dev = [
|
|
"build==1.2.2.post1",
|
|
"hypothesis==6.165.3",
|
|
"mypy==1.13.0",
|
|
"pytest==9.1.1",
|
|
"pytest-cov==7.1.0",
|
|
"ruff==0.16.2",
|
|
]
|
|
spaces = ["gradio>=6.7,<7.0"]
|
|
|
|
[dependency-groups]
|
|
ci = [
|
|
"build==1.2.2.post1",
|
|
"pip-licenses==5.5.5",
|
|
"twine==7.0.0",
|
|
]
|
|
quality = [
|
|
"mutmut==3.7.0",
|
|
]
|
|
mlx = [
|
|
"mlx==0.32.0; sys_platform == 'darwin' and platform_machine == 'arm64'",
|
|
"mlx-lm==0.31.3; sys_platform == 'darwin' and platform_machine == 'arm64'",
|
|
]
|
|
|
|
[project.scripts]
|
|
obliteratus = "obliteratus.cli:main"
|
|
|
|
[tool.setuptools]
|
|
# The local UI launcher imports the Hugging Face Spaces application module.
|
|
# Include that top-level module in wheels as well as editable/source installs.
|
|
py-modules = ["app"]
|
|
|
|
[tool.setuptools.packages.find]
|
|
include = ["obliteratus*"]
|
|
|
|
[tool.setuptools.package-data]
|
|
obliteratus = ["py.typed"]
|
|
|
|
[tool.ruff]
|
|
line-length = 100
|
|
target-version = "py310"
|
|
|
|
[tool.ruff.lint]
|
|
select = ["F"]
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["tests"]
|
|
addopts = [
|
|
"--strict-config",
|
|
"--strict-markers",
|
|
"--cov=obliteratus",
|
|
"--cov-report=term-missing",
|
|
"--cov-fail-under=60",
|
|
]
|
|
filterwarnings = [
|
|
"error",
|
|
]
|
|
markers = [
|
|
"cpu: deterministic tests supported by the mandatory CPU-only gate",
|
|
"integration: offline integration tests spanning multiple components",
|
|
"slow: tests excluded from the fast pull-request gate because of runtime",
|
|
"gpu: tests that require a CUDA-capable runner",
|
|
"mps: tests that require Apple Metal Performance Shaders",
|
|
"mlx: tests that require Apple MLX",
|
|
"network: tests that access external network resources",
|
|
"download: tests that download model or dataset artifacts",
|
|
"remote: tests that require a remote execution provider or credentials",
|
|
"operator_ui: tests that require the optional UI runtime",
|
|
]
|
|
|
|
[tool.mutmut]
|
|
source_paths = ["obliteratus/", "scripts/"]
|
|
only_mutate = [
|
|
"obliteratus/config.py",
|
|
"obliteratus/analysis/numerical_contracts.py",
|
|
"obliteratus/runtime_contracts.py",
|
|
"obliteratus/persistence_contracts.py",
|
|
"obliteratus/remote_contracts.py",
|
|
"scripts/check_coverage_thresholds.py",
|
|
]
|
|
pytest_add_cli_args = ["--no-cov", "-q"]
|
|
pytest_add_cli_args_test_selection = [
|
|
"tests/test_config.py",
|
|
"tests/test_config_properties.py",
|
|
"tests/test_coverage_thresholds.py",
|
|
"tests/test_numerical_contracts.py",
|
|
"tests/test_persistence_contracts.py",
|
|
"tests/test_remote_contracts.py",
|
|
"tests/test_runtime_contracts.py",
|
|
]
|
|
mutate_only_covered_lines = true
|
|
on_dependency_change = "rerun"
|
|
|
|
[tool.uv]
|
|
constraint-dependencies = ["pillow>=12.2.0"]
|
|
exclude-newer = "3 days"
|
|
|
|
[tool.uv.sources]
|
|
torch = [
|
|
{ index = "pytorch-cpu", marker = "sys_platform == 'linux' or sys_platform == 'win32'" },
|
|
]
|
|
|
|
[[tool.uv.index]]
|
|
name = "pytorch-cpu"
|
|
url = "https://download.pytorch.org/whl/cpu"
|
|
explicit = true
|