mirror of
https://github.com/elder-plinius/OBLITERATUS.git
synced 2026-09-21 17:00:50 +02:00
Exact setuptools/wheel pins block platform-specific backend patches and make isolated pip installs fail on Android/Termux Python. Keep a setuptools lower bound only, drop the unused wheel backend pin, keep requirements.txt aligned with core package deps, and install the Spaces extra in Docker instead of pulling bitsandbytes by default. Android/Termux is still not a supported runtime; the new platform note documents host wheels, ANDROID_API_LEVEL, and --no-build-isolation so pip does not isolate a second setuptools or compile manylinux-only extensions.
186 lines
5.3 KiB
TOML
186 lines
5.3 KiB
TOML
[build-system]
|
|
# Lower bound only. Exact backend pins block platform-specific setuptools patches.
|
|
# A separate wheel package is not required for the PEP 517 backend.
|
|
requires = ["setuptools>=80.9.0"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[project]
|
|
name = "obliteratus"
|
|
version = "0.1.3"
|
|
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",
|
|
"optuna>=4.9,<5",
|
|
]
|
|
|
|
[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",
|
|
"jsonschema==4.25.1",
|
|
"mypy==1.13.0",
|
|
"pytest==9.1.1",
|
|
"pytest-cov==7.1.0",
|
|
"ruff==0.16.2",
|
|
]
|
|
quantization = ["bitsandbytes>=0.46.1"]
|
|
qwen-hybrid = [
|
|
"transformers>=5.8",
|
|
"flash-linear-attention>=0.5.2",
|
|
"causal-conv1d>=1.7.0",
|
|
]
|
|
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=75",
|
|
]
|
|
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.coverage.run]
|
|
patch = ["subprocess"]
|
|
|
|
[tool.mutmut]
|
|
source_paths = ["obliteratus/", "scripts/"]
|
|
only_mutate = [
|
|
"obliteratus/config.py",
|
|
"obliteratus/analysis/numerical_contracts.py",
|
|
"obliteratus/analysis/whitened_svd.py",
|
|
"obliteratus/runtime_contracts.py",
|
|
"obliteratus/persistence_contracts.py",
|
|
"obliteratus/remote_contracts.py",
|
|
"obliteratus/service_contracts.py",
|
|
"obliteratus/tourney_contracts.py",
|
|
"obliteratus/evaluation/lm_eval_integration.py",
|
|
"scripts/check_coverage_thresholds.py",
|
|
]
|
|
required_mutation_targets = [
|
|
"obliteratus/analysis/numerical_contracts.py",
|
|
"obliteratus/analysis/whitened_svd.py",
|
|
"obliteratus/persistence_contracts.py",
|
|
"obliteratus/runtime_contracts.py",
|
|
"obliteratus/service_contracts.py",
|
|
"obliteratus/tourney_contracts.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_bestiary_contracts.py",
|
|
"tests/test_coverage_thresholds.py",
|
|
"tests/test_projection_math_contracts.py",
|
|
"tests/test_lm_eval_reporting_contracts.py",
|
|
"tests/test_models_client_contracts.py",
|
|
"tests/test_numerical_contracts.py",
|
|
"tests/test_checkpoint_atomicity.py",
|
|
"tests/test_persistence_contracts.py",
|
|
"tests/test_persistence_pipeline.py",
|
|
"tests/test_remote_contracts.py",
|
|
"tests/test_runtime_contracts.py",
|
|
"tests/test_tourney_contracts.py",
|
|
"tests/test_watchtower_contracts.py",
|
|
"tests/test_whitened_svd_oracles.py",
|
|
]
|
|
mutate_only_covered_lines = true
|
|
timeout_constant = 2.0
|
|
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
|