YAML · 1294 bytes Raw Blame History
1 # Consumer-side pre-commit config — plug this into your repo's
2 # ``.pre-commit-config.yaml`` to gate the adapter on every commit.
3 #
4 # Rev pinning: sway hasn't tagged a release yet (pre-v0.1.0). Pin to a
5 # specific commit SHA rather than ``HEAD`` so the gate's behavior
6 # doesn't drift under you on upstream changes. Bump the SHA
7 # deliberately when you want to pick up new probes. After v0.1.0
8 # ships you'll switch to ``rev: v0.1.0`` and forget about it.
9
10 repos:
11 - repo: https://github.com/tenseleyFlow/sway
12 # Pin to a specific commit — update deliberately when you want
13 # upstream changes. Replace with a tag like ``v0.1.0`` once sway
14 # publishes its first release.
15 rev: 2ecd9a0c9d65a9b9576a185597c88f41444f9646
16 hooks:
17 # Recommended: ``sway-gate`` uses the sway install on your PATH.
18 # Fastest path; assumes you've ``pip install 'dlm-sway[hf]'``.
19 - id: sway-gate
20 args: ["examples/precommit-example/sway.yaml", "--threshold=0.0"]
21
22 # Alternative — uncomment if you don't have sway installed
23 # system-wide. Pre-commit will build a fresh venv and install
24 # sway + torch + transformers (~5 GB) on first run.
25 #
26 # - id: sway-gate-isolated
27 # args: ["examples/precommit-example/sway.yaml", "--threshold=0.0"]
28