mirror of
https://github.com/wassname/moral-maps.git
synced 2026-10-05 13:00:26 +08:00
The zone names (Latin America, African-Islamic, ...) were nailed to their hull's top vertex and bypassed the label allocator, so they landed in crowded spots while open space sat nearby. Now every label -- country, model star, zone name, steer -- goes through a single adjustText call (force repulsion off the dots and each other, leader lines), and each zone label is seeded at its hull's OUTWARD-most vertex so it starts in the sparse margin. Also widen the family-colour hue spacing (grok now near-black, clear of gpt blue; llama/gemini/gemma separated). textalloc stays for the compass/range insets for now. Co-Authored-By: Claudypoo <288921227+claudypoo@users.noreply.github.com>
48 lines
1.5 KiB
TOML
48 lines
1.5 KiB
TOML
[project]
|
|
name = "tiny-mfv"
|
|
version = "0.1.0"
|
|
description = "Tiny moral-foundations vignettes eval (Clifford 2015 classic + paraphrase configs) for steering checkpoints."
|
|
requires-python = ">=3.11"
|
|
dependencies = [
|
|
"transformers>=5.7",
|
|
"torch",
|
|
"pandas",
|
|
"loguru",
|
|
"tqdm",
|
|
"tabulate",
|
|
"numpy",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
# tinymfv.maps (culture-map + range viz) only; `import tinymfv` and the evals stay headless,
|
|
# numeric-only consumers (steering-lite) skip this. Install with `pip install tiny-mfv[maps]`.
|
|
maps = [
|
|
"matplotlib>=3.8",
|
|
"textalloc>=1.2.3", # non-overlapping label placement on the maps
|
|
"shapely>=2.0", # union of per-country discs into one merged zone region
|
|
"adjusttext>=1.3",
|
|
]
|
|
# tinymfv.read_api (sampling readout for logprob-less API models) only. Install with
|
|
# `pip install tiny-mfv[api]`. The local logprob reader (read.py) needs none of this.
|
|
api = [
|
|
# robust OpenRouter calls (stamina backoff on 429/provider/upstream/malformed errors) --
|
|
# wassname's wrapper, so retry/rate-limit handling doesn't diverge from the rest of the stack.
|
|
"openrouter-wrapper @ git+https://github.com/wassname/openrouter_wrapper",
|
|
"python-dotenv",
|
|
]
|
|
|
|
[dependency-groups]
|
|
dev = [
|
|
"scipy>=1.17.1",
|
|
]
|
|
|
|
[build-system]
|
|
requires = ["hatchling"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[tool.hatch.metadata]
|
|
allow-direct-references = true # the api extra pulls openrouter_wrapper straight from git
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
packages = ["src/tinymfv"]
|