mirror of
https://github.com/elder-plinius/OBLITERATUS.git
synced 2026-12-05 18:44:41 +01:00
205 lines
6.6 KiB
TOML
205 lines
6.6 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.4"
|
|
description = "Master Ablation Suite for HuggingFace transformers"
|
|
readme = "README.md"
|
|
requires-python = ">=3.11"
|
|
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.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",
|
|
"pillow>=13.0,<14",
|
|
"filelock>=4.2.1,<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",
|
|
]
|
|
# Optional local MCP stdio server (issue #209). Narrow bounded pin: the server
|
|
# is written against the MCP Python SDK v2 API (MCPServer). Regenerate uv.lock
|
|
# with the repo's pinned uv after changing this pin.
|
|
mcp = ["mcp>=2.2,<2.3"]
|
|
quantization = ["bitsandbytes>=0.46.1"]
|
|
recovery = ["peft==0.21.2", "torch>=2.3", "transformers>=4.53.1"]
|
|
qwen-hybrid = [
|
|
"transformers>=5.8",
|
|
"flash-linear-attention>=0.5.2",
|
|
"causal-conv1d>=1.7.0",
|
|
]
|
|
spaces = ["gradio @ https://raw.githubusercontent.com/elder-plinius/OBLITERATUS/752c539911baaae466529934ed854f86fd7fa527/vendor/gradio/gradio-6.31.0%2Bobliteratus.1-py3-none-any.whl#sha256=32801c603a8379c6e1a6d8df00dda87362ede31ff0865a6dbd08206ac9333970"]
|
|
|
|
[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", "recovery_data/*.json", "recovery_data/*.jsonl", "recovery_data/*.md"]
|
|
"obliteratus.strategies" = ["data/*.json"]
|
|
"obliteratus.concepts" = ["schema/*.json", "field_data/*.json", "packs/*/manifest.yaml", "packs/*/DATASET_CARD.md"]
|
|
"obliteratus.recipes" = [
|
|
"schema/*.json", "data/*.json", "data/margins/*.json", "data/profiles/*.json", "data/confirmations/*/*.json",
|
|
"data/promotion-evidence/*/*.json", "data/evidence/*/*.json",
|
|
]
|
|
|
|
[tool.setuptools.data-files]
|
|
"share/doc/obliteratus" = ["docs/*.md", "docs/index.html"]
|
|
"share/doc/obliteratus/examples" = [
|
|
"examples/vocab_surgery_config.yaml", "examples/vocab_surgery_recipe.json",
|
|
"examples/vocab_surgery_target_responses.jsonl", "examples/vocab_surgery_control_responses.jsonl",
|
|
]
|
|
|
|
[tool.ruff]
|
|
line-length = 100
|
|
target-version = "py311"
|
|
|
|
[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",
|
|
"gloo: multi-process torch.distributed Gloo tests; run concurrently in pr-core",
|
|
"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]
|
|
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
|