saddlefit 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- saddlefit-0.1.0/.gitignore +220 -0
- saddlefit-0.1.0/CHANGELOG.md +39 -0
- saddlefit-0.1.0/LICENSE +201 -0
- saddlefit-0.1.0/PKG-INFO +162 -0
- saddlefit-0.1.0/README.md +131 -0
- saddlefit-0.1.0/pyproject.toml +136 -0
- saddlefit-0.1.0/schemas/.gitkeep +0 -0
- saddlefit-0.1.0/schemas/doctor-record.schema.json +82 -0
- saddlefit-0.1.0/schemas/harness-store.schema.json +16 -0
- saddlefit-0.1.0/schemas/loop-config.schema.json +179 -0
- saddlefit-0.1.0/schemas/run-event.schema.json +451 -0
- saddlefit-0.1.0/schemas/run-summary.schema.json +256 -0
- saddlefit-0.1.0/schemas/saddlefit-config.schema.json +371 -0
- saddlefit-0.1.0/schemas/sealed-task.schema.json +16 -0
- saddlefit-0.1.0/schemas/suite-lock.schema.json +116 -0
- saddlefit-0.1.0/schemas/task-meta.schema.json +114 -0
- saddlefit-0.1.0/src/saddlefit/__init__.py +10 -0
- saddlefit-0.1.0/src/saddlefit/__main__.py +3 -0
- saddlefit-0.1.0/src/saddlefit/cli.py +254 -0
- saddlefit-0.1.0/src/saddlefit/compact.py +127 -0
- saddlefit-0.1.0/src/saddlefit/config.py +170 -0
- saddlefit-0.1.0/src/saddlefit/context/__init__.py +1 -0
- saddlefit-0.1.0/src/saddlefit/context/assembly.py +238 -0
- saddlefit-0.1.0/src/saddlefit/doctor.py +273 -0
- saddlefit-0.1.0/src/saddlefit/errors.py +27 -0
- saddlefit-0.1.0/src/saddlefit/eval/__init__.py +1 -0
- saddlefit-0.1.0/src/saddlefit/eval/evaluator.py +256 -0
- saddlefit-0.1.0/src/saddlefit/eval/leak_guard.py +176 -0
- saddlefit-0.1.0/src/saddlefit/eval/records.py +17 -0
- saddlefit-0.1.0/src/saddlefit/eval/sealed.py +157 -0
- saddlefit-0.1.0/src/saddlefit/eval/tamper.py +88 -0
- saddlefit-0.1.0/src/saddlefit/eval/taxonomy.py +94 -0
- saddlefit-0.1.0/src/saddlefit/export/__init__.py +1 -0
- saddlefit-0.1.0/src/saddlefit/harness/__init__.py +1 -0
- saddlefit-0.1.0/src/saddlefit/harness/allowlist.py +29 -0
- saddlefit-0.1.0/src/saddlefit/harness/loop_config.py +130 -0
- saddlefit-0.1.0/src/saddlefit/harness/store.py +285 -0
- saddlefit-0.1.0/src/saddlefit/logs.py +169 -0
- saddlefit-0.1.0/src/saddlefit/loops/__init__.py +1 -0
- saddlefit-0.1.0/src/saddlefit/loops/baseline.py +291 -0
- saddlefit-0.1.0/src/saddlefit/loops/run_record.py +89 -0
- saddlefit-0.1.0/src/saddlefit/loops/workspace.py +72 -0
- saddlefit-0.1.0/src/saddlefit/project.py +286 -0
- saddlefit-0.1.0/src/saddlefit/providers/__init__.py +1 -0
- saddlefit-0.1.0/src/saddlefit/providers/base.py +94 -0
- saddlefit-0.1.0/src/saddlefit/providers/fake.py +93 -0
- saddlefit-0.1.0/src/saddlefit/providers/openai_compat.py +274 -0
- saddlefit-0.1.0/src/saddlefit/providers/parsing.py +238 -0
- saddlefit-0.1.0/src/saddlefit/providers/retry.py +39 -0
- saddlefit-0.1.0/src/saddlefit/py.typed +0 -0
- saddlefit-0.1.0/src/saddlefit/reports/__init__.py +1 -0
- saddlefit-0.1.0/src/saddlefit/reports/baseline.py +110 -0
- saddlefit-0.1.0/src/saddlefit/sandbox/__init__.py +1 -0
- saddlefit-0.1.0/src/saddlefit/sandbox/container.py +312 -0
- saddlefit-0.1.0/src/saddlefit/schema_registry.py +25 -0
- saddlefit-0.1.0/src/saddlefit/starter_playbook/__init__.py +1 -0
- saddlefit-0.1.0/src/saddlefit/storage/__init__.py +1 -0
- saddlefit-0.1.0/src/saddlefit/storage/migrations/__init__.py +55 -0
- saddlefit-0.1.0/src/saddlefit/storage/runs.py +257 -0
- saddlefit-0.1.0/src/saddlefit/student/__init__.py +1 -0
- saddlefit-0.1.0/src/saddlefit/student/loop.py +281 -0
- saddlefit-0.1.0/src/saddlefit/tasks/__init__.py +1 -0
- saddlefit-0.1.0/src/saddlefit/tasks/mining.py +351 -0
- saddlefit-0.1.0/src/saddlefit/tasks/models.py +131 -0
- saddlefit-0.1.0/src/saddlefit/tasks/sealing.py +243 -0
- saddlefit-0.1.0/src/saddlefit/tasks/splits.py +91 -0
- saddlefit-0.1.0/src/saddlefit/tasks/suite.py +208 -0
- saddlefit-0.1.0/src/saddlefit/tools/__init__.py +1 -0
- saddlefit-0.1.0/src/saddlefit/tools/builtin.py +280 -0
- saddlefit-0.1.0/src/saddlefit/tutor/__init__.py +1 -0
- saddlefit-0.1.0/src/saddlefit/tutor/prompts/.gitkeep +0 -0
- saddlefit-0.1.0/src/saddlefit/yamlio.py +44 -0
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py.cover
|
|
50
|
+
*.lcov
|
|
51
|
+
.hypothesis/
|
|
52
|
+
.pytest_cache/
|
|
53
|
+
cover/
|
|
54
|
+
|
|
55
|
+
# Translations
|
|
56
|
+
*.mo
|
|
57
|
+
*.pot
|
|
58
|
+
|
|
59
|
+
# Django stuff:
|
|
60
|
+
*.log
|
|
61
|
+
local_settings.py
|
|
62
|
+
db.sqlite3
|
|
63
|
+
db.sqlite3-journal
|
|
64
|
+
|
|
65
|
+
# Flask stuff:
|
|
66
|
+
instance/
|
|
67
|
+
.webassets-cache
|
|
68
|
+
|
|
69
|
+
# Scrapy stuff:
|
|
70
|
+
.scrapy
|
|
71
|
+
|
|
72
|
+
# Sphinx documentation
|
|
73
|
+
docs/_build/
|
|
74
|
+
|
|
75
|
+
# PyBuilder
|
|
76
|
+
.pybuilder/
|
|
77
|
+
target/
|
|
78
|
+
|
|
79
|
+
# Jupyter Notebook
|
|
80
|
+
.ipynb_checkpoints
|
|
81
|
+
|
|
82
|
+
# IPython
|
|
83
|
+
profile_default/
|
|
84
|
+
ipython_config.py
|
|
85
|
+
|
|
86
|
+
# pyenv
|
|
87
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
88
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
89
|
+
# .python-version
|
|
90
|
+
|
|
91
|
+
# pipenv
|
|
92
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
93
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
94
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
95
|
+
# install all needed dependencies.
|
|
96
|
+
# Pipfile.lock
|
|
97
|
+
|
|
98
|
+
# uv
|
|
99
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
100
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
101
|
+
# commonly ignored for libraries.
|
|
102
|
+
# uv.lock
|
|
103
|
+
|
|
104
|
+
# poetry
|
|
105
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
106
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
107
|
+
# commonly ignored for libraries.
|
|
108
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
109
|
+
# poetry.lock
|
|
110
|
+
# poetry.toml
|
|
111
|
+
|
|
112
|
+
# pdm
|
|
113
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
114
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
115
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
116
|
+
# pdm.lock
|
|
117
|
+
# pdm.toml
|
|
118
|
+
.pdm-python
|
|
119
|
+
.pdm-build/
|
|
120
|
+
|
|
121
|
+
# pixi
|
|
122
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
123
|
+
# pixi.lock
|
|
124
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
125
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
126
|
+
.pixi/*
|
|
127
|
+
!.pixi/config.toml
|
|
128
|
+
|
|
129
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
130
|
+
__pypackages__/
|
|
131
|
+
|
|
132
|
+
# Celery stuff
|
|
133
|
+
celerybeat-schedule*
|
|
134
|
+
celerybeat.pid
|
|
135
|
+
|
|
136
|
+
# Redis
|
|
137
|
+
*.rdb
|
|
138
|
+
*.aof
|
|
139
|
+
*.pid
|
|
140
|
+
|
|
141
|
+
# RabbitMQ
|
|
142
|
+
mnesia/
|
|
143
|
+
rabbitmq/
|
|
144
|
+
rabbitmq-data/
|
|
145
|
+
|
|
146
|
+
# ActiveMQ
|
|
147
|
+
activemq-data/
|
|
148
|
+
|
|
149
|
+
# SageMath parsed files
|
|
150
|
+
*.sage.py
|
|
151
|
+
|
|
152
|
+
# Environments
|
|
153
|
+
.env
|
|
154
|
+
.envrc
|
|
155
|
+
.venv
|
|
156
|
+
env/
|
|
157
|
+
venv/
|
|
158
|
+
ENV/
|
|
159
|
+
env.bak/
|
|
160
|
+
venv.bak/
|
|
161
|
+
|
|
162
|
+
# Spyder project settings
|
|
163
|
+
.spyderproject
|
|
164
|
+
.spyproject
|
|
165
|
+
|
|
166
|
+
# Rope project settings
|
|
167
|
+
.ropeproject
|
|
168
|
+
|
|
169
|
+
# mkdocs/Zensical documentation
|
|
170
|
+
/site
|
|
171
|
+
|
|
172
|
+
# mypy
|
|
173
|
+
.mypy_cache/
|
|
174
|
+
.dmypy.json
|
|
175
|
+
dmypy.json
|
|
176
|
+
|
|
177
|
+
# Pyre type checker
|
|
178
|
+
.pyre/
|
|
179
|
+
|
|
180
|
+
# pytype static type analyzer
|
|
181
|
+
.pytype/
|
|
182
|
+
|
|
183
|
+
# Cython debug symbols
|
|
184
|
+
cython_debug/
|
|
185
|
+
|
|
186
|
+
# PyCharm
|
|
187
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
188
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
189
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
190
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
191
|
+
# .idea/
|
|
192
|
+
|
|
193
|
+
# Abstra
|
|
194
|
+
# Abstra is an AI-powered process automation framework.
|
|
195
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
196
|
+
# Learn more at https://abstra.io/docs
|
|
197
|
+
.abstra/
|
|
198
|
+
|
|
199
|
+
# Visual Studio Code
|
|
200
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore that
|
|
201
|
+
# can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
202
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer, you
|
|
203
|
+
# could uncomment the following to ignore the entire vscode folder
|
|
204
|
+
# .vscode/
|
|
205
|
+
# Temporary file for partial code execution
|
|
206
|
+
tempCodeRunnerFile.py
|
|
207
|
+
|
|
208
|
+
# Ruff stuff:
|
|
209
|
+
.ruff_cache/
|
|
210
|
+
|
|
211
|
+
# PyPI configuration file
|
|
212
|
+
.pypirc
|
|
213
|
+
|
|
214
|
+
# Marimo
|
|
215
|
+
marimo/_static/
|
|
216
|
+
marimo/_lsp/
|
|
217
|
+
__marimo__/
|
|
218
|
+
|
|
219
|
+
# Streamlit
|
|
220
|
+
.streamlit/secrets.toml
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.0 (2026-10-21)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **cli:** add baseline and report ([#82](https://github.com/padobrik/saddlefit/issues/82)) ([5a90709](https://github.com/padobrik/saddlefit/commit/5a907093174ca2dfc10abf39d2260e0ad68030b6))
|
|
9
|
+
* **cli:** add doctor with speed, tool-call probes and tier ([#77](https://github.com/padobrik/saddlefit/issues/77)) ([93e9409](https://github.com/padobrik/saddlefit/commit/93e940903454f54b872cf8c5227d5ce916b2cc1b))
|
|
10
|
+
* **cli:** add init and tasks mine, list and show ([#79](https://github.com/padobrik/saddlefit/issues/79)) ([d2c5ba5](https://github.com/padobrik/saddlefit/commit/d2c5ba5b04eef2f118d846b67170e1b9989ca5eb))
|
|
11
|
+
* **config:** add saddlefit.yaml model and loader ([#55](https://github.com/padobrik/saddlefit/issues/55)) ([1a9c31a](https://github.com/padobrik/saddlefit/commit/1a9c31ad843aaa4b9932806910793e15a9d634b7))
|
|
12
|
+
* **context:** assemble the harness context within budget ([#71](https://github.com/padobrik/saddlefit/issues/71)) ([4d741b5](https://github.com/padobrik/saddlefit/commit/4d741b561414ee48b055db4bc7b8d468a4d05beb))
|
|
13
|
+
* **eval:** add failure taxonomy and tamper detection ([#64](https://github.com/padobrik/saddlefit/issues/64)) ([0a7c3b4](https://github.com/padobrik/saddlefit/commit/0a7c3b46c592d6b1f38561129606b789a7ae133b))
|
|
14
|
+
* **eval:** add leak guard that aborts on canaries ([#65](https://github.com/padobrik/saddlefit/issues/65)) ([91ede13](https://github.com/padobrik/saddlefit/commit/91ede13b4efb16b9ab24efa5fafdf329dd287d9b))
|
|
15
|
+
* **eval:** add the evaluator with tamper checks ([#75](https://github.com/padobrik/saddlefit/issues/75)) ([e9b4297](https://github.com/padobrik/saddlefit/commit/e9b4297896f0bc7eecf669ac745588604157bc00))
|
|
16
|
+
* **harness:** add git-backed harness store ([#74](https://github.com/padobrik/saddlefit/issues/74)) ([29005fd](https://github.com/padobrik/saddlefit/commit/29005fd84106418ffb0656addc295b66c40a78dc))
|
|
17
|
+
* **harness:** add loop.yaml schema, clamping and allowlist ([#67](https://github.com/padobrik/saddlefit/issues/67)) ([fdf8a94](https://github.com/padobrik/saddlefit/commit/fdf8a94bdb4ed141dc0be8cdf10b0181483ce306))
|
|
18
|
+
* **logs:** add JSON-line logging with secret redaction ([#58](https://github.com/padobrik/saddlefit/issues/58)) ([22f9594](https://github.com/padobrik/saddlefit/commit/22f95944725a36a7023f9056b4dd22d8e782ae8b))
|
|
19
|
+
* **providers:** add ModelClient protocol and JSON tool parsing ([#57](https://github.com/padobrik/saddlefit/issues/57)) ([2cbf36c](https://github.com/padobrik/saddlefit/commit/2cbf36c9bbb5a334103f32911d9d9171c10dcc9e))
|
|
20
|
+
* **providers:** add OpenAI-compatible student provider ([#60](https://github.com/padobrik/saddlefit/issues/60)) ([79eb478](https://github.com/padobrik/saddlefit/commit/79eb478f3a259fbfcbe8fedca7ca5d2d68ecfb89))
|
|
21
|
+
* **providers:** add retries and scripted fake provider ([#59](https://github.com/padobrik/saddlefit/issues/59)) ([0a40318](https://github.com/padobrik/saddlefit/commit/0a40318aa4b9c00593c8ba84ba1405153aad917e))
|
|
22
|
+
* **providers:** pass reasoning effort to the runner ([#80](https://github.com/padobrik/saddlefit/issues/80)) ([e41765b](https://github.com/padobrik/saddlefit/commit/e41765bc7178fc9cadbf6cdf6639da80b904f6ff))
|
|
23
|
+
* **sandbox:** add container lifecycle with B11 limits ([#61](https://github.com/padobrik/saddlefit/issues/61)) ([2714dab](https://github.com/padobrik/saddlefit/commit/2714dabdf377cd40c846307f0213e06db45072a4))
|
|
24
|
+
* **storage:** add run records and schema migrations ([#66](https://github.com/padobrik/saddlefit/issues/66)) ([1f0a37b](https://github.com/padobrik/saddlefit/commit/1f0a37b5ec994004c67aeab750981cc1ae9b15ea))
|
|
25
|
+
* **student:** add the agent loop with finish gate and loop detection ([#76](https://github.com/padobrik/saddlefit/issues/76)) ([d713721](https://github.com/padobrik/saddlefit/commit/d7137210f4f4178fdddb2cce4f80fa83945cc9a6))
|
|
26
|
+
* **tasks:** add deterministic splits and the suite lock ([#62](https://github.com/padobrik/saddlefit/issues/62)) ([8002fd5](https://github.com/padobrik/saddlefit/commit/8002fd55e339d2444607d7d05a2a1205fdc5298e))
|
|
27
|
+
* **tasks:** add sealed store, canaries and import boundary ([#63](https://github.com/padobrik/saddlefit/issues/63)) ([1e61e84](https://github.com/padobrik/saddlefit/commit/1e61e84de678b901b348128577fb10566707f55e))
|
|
28
|
+
* **tasks:** mine viable tasks from git history ([#69](https://github.com/padobrik/saddlefit/issues/69)) ([8719e13](https://github.com/padobrik/saddlefit/commit/8719e1311522a39e2d04291f49a87a6776e2d49a))
|
|
29
|
+
* **tools:** add student tools that run in the sandbox ([#70](https://github.com/padobrik/saddlefit/issues/70)) ([306eedb](https://github.com/padobrik/saddlefit/commit/306eedbe3873f8e0fd84faa1e27b09a81b017fd5))
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
### Documentation
|
|
33
|
+
|
|
34
|
+
* add build specification ([1f9c25f](https://github.com/padobrik/saddlefit/commit/1f9c25f49fe4f300bbf34ef87f5ad6b012b45d34))
|
|
35
|
+
* add contributor, conduct and security docs ([6e8812a](https://github.com/padobrik/saddlefit/commit/6e8812a86976c43a690aff1c08a46108886f341a))
|
|
36
|
+
* add readme, architecture, ADR process and notes ([1cb2581](https://github.com/padobrik/saddlefit/commit/1cb25816ade20b1d0795a214732124666a9ea9b7))
|
|
37
|
+
* add the Saddlefit logo to the README ([#81](https://github.com/padobrik/saddlefit/issues/81)) ([b2a27da](https://github.com/padobrik/saddlefit/commit/b2a27daf00c50812587be2396a1ab733ee9f12e4))
|
|
38
|
+
* **adr:** define what reading sealed data means for evaluation ([#78](https://github.com/padobrik/saddlefit/issues/78)) ([b13b7af](https://github.com/padobrik/saddlefit/commit/b13b7afe854233f588cfe43250dbfc49313ac69c))
|
|
39
|
+
* **readme:** add loop and landscape diagrams ([#68](https://github.com/padobrik/saddlefit/issues/68)) ([f56be57](https://github.com/padobrik/saddlefit/commit/f56be57b2940471848843df6e5e88a78c4e49dd7))
|
saddlefit-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
saddlefit-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: saddlefit
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A self-improving harness that fits itself to your compact local model
|
|
5
|
+
Project-URL: Homepage, https://github.com/padobrik/saddlefit
|
|
6
|
+
Project-URL: Issues, https://github.com/padobrik/saddlefit/issues
|
|
7
|
+
Project-URL: Changelog, https://github.com/padobrik/saddlefit/blob/main/CHANGELOG.md
|
|
8
|
+
Author: padobrik
|
|
9
|
+
License-Expression: Apache-2.0
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: agents,compact-models,harness,llm,local-llm,ollama
|
|
12
|
+
Classifier: Development Status :: 2 - Pre-Alpha
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
20
|
+
Classifier: Topic :: Software Development
|
|
21
|
+
Classifier: Typing :: Typed
|
|
22
|
+
Requires-Python: >=3.12
|
|
23
|
+
Requires-Dist: anthropic>=1.15
|
|
24
|
+
Requires-Dist: docker>=7.1
|
|
25
|
+
Requires-Dist: openai>=3.35
|
|
26
|
+
Requires-Dist: pydantic>=2.11
|
|
27
|
+
Requires-Dist: python-ulid>=3.0
|
|
28
|
+
Requires-Dist: pyyaml>=6.0.2
|
|
29
|
+
Requires-Dist: typer>=0.16
|
|
30
|
+
Description-Content-Type: text/markdown
|
|
31
|
+
|
|
32
|
+
<h1>
|
|
33
|
+
<picture>
|
|
34
|
+
<source media="(prefers-color-scheme: dark)" srcset="docs/logo/saddlefit-dark.svg">
|
|
35
|
+
<img alt="Saddlefit" src="docs/logo/saddlefit-light.svg" width="300">
|
|
36
|
+
</picture>
|
|
37
|
+
</h1>
|
|
38
|
+
|
|
39
|
+
[](https://github.com/padobrik/saddlefit/actions/workflows/ci.yml)
|
|
40
|
+
[](https://codecov.io/gh/padobrik/saddlefit)
|
|
41
|
+
[](https://github.com/padobrik/saddlefit/releases)
|
|
42
|
+
[](LICENSE)
|
|
43
|
+
|
|
44
|
+
Saddlefit fits an agent's harness to one compact model, on your own tasks. It adds what
|
|
45
|
+
fixes failures, drops what stops helping, and proves each change on tasks the tutor never saw.
|
|
46
|
+
|
|
47
|
+
The model's weights never change; only the files around it do: system prompt, skills, tool
|
|
48
|
+
guidance, tool scripts, loop settings, reasoning mode and an `EXPERIENCE.md` of lessons.
|
|
49
|
+
|
|
50
|
+
> **Status:** pre-alpha. Built milestone by milestone; see the
|
|
51
|
+
> [milestones](https://github.com/padobrik/saddlefit/milestones) and [the spec](docs/SPEC.md).
|
|
52
|
+
|
|
53
|
+
## Three loops
|
|
54
|
+
|
|
55
|
+
<picture>
|
|
56
|
+
<source media="(prefers-color-scheme: dark)" srcset="docs/diagrams/three-loops-dark.svg">
|
|
57
|
+
<img alt="Three loops: the fast loop during a task, the middle loop overnight, the slow loop that improves the tutor itself" src="docs/diagrams/three-loops-light.svg" width="760">
|
|
58
|
+
</picture>
|
|
59
|
+
|
|
60
|
+
- **Fast — during a task.** When the task's own check fails, the student probes a few harness
|
|
61
|
+
variants locally and keeps what passes; the finding goes on probation in a journal.
|
|
62
|
+
- **Middle — overnight.** A tutor diagnoses training failures and proposes one change at a
|
|
63
|
+
time; it is accepted only if it wins on repeated runs over held-out tasks, and pruned by
|
|
64
|
+
ablation once it stops paying for its context.
|
|
65
|
+
- **Slow — every few weeks.** Statistics on accepted changes become a ranked playbook, gated by
|
|
66
|
+
an A/B test, until a compact local tutor can take over.
|
|
67
|
+
|
|
68
|
+
<details>
|
|
69
|
+
<summary>The fast loop in detail</summary>
|
|
70
|
+
<br>
|
|
71
|
+
|
|
72
|
+
<picture>
|
|
73
|
+
<source media="(prefers-color-scheme: dark)" srcset="docs/diagrams/fast-loop-dark.svg">
|
|
74
|
+
<img alt="Fast loop: a failed check triggers local probes, and a change that helps stays on probation in the journal" src="docs/diagrams/fast-loop-light.svg" width="760">
|
|
75
|
+
</picture>
|
|
76
|
+
|
|
77
|
+
</details>
|
|
78
|
+
|
|
79
|
+
<details>
|
|
80
|
+
<summary>The middle loop in detail</summary>
|
|
81
|
+
<br>
|
|
82
|
+
|
|
83
|
+
<picture>
|
|
84
|
+
<source media="(prefers-color-scheme: dark)" srcset="docs/diagrams/middle-loop-dark.svg">
|
|
85
|
+
<img alt="Middle loop: a change is accepted only if it wins on the training batch and again on held-out tasks" src="docs/diagrams/middle-loop-light.svg" width="760">
|
|
86
|
+
</picture>
|
|
87
|
+
|
|
88
|
+
</details>
|
|
89
|
+
|
|
90
|
+
<details>
|
|
91
|
+
<summary>The slow loop in detail</summary>
|
|
92
|
+
<br>
|
|
93
|
+
|
|
94
|
+
<picture>
|
|
95
|
+
<source media="(prefers-color-scheme: dark)" srcset="docs/diagrams/slow-loop-dark.svg">
|
|
96
|
+
<img alt="Slow loop: a new playbook must beat the old one in an A/B run before the tutor uses it, and a shadow tutor takes over once it is as good as the cloud one" src="docs/diagrams/slow-loop-light.svg" width="760">
|
|
97
|
+
</picture>
|
|
98
|
+
|
|
99
|
+
</details>
|
|
100
|
+
|
|
101
|
+
## What counts as a compact model
|
|
102
|
+
|
|
103
|
+
An open-weight model that runs on one consumer machine and meets all four conditions
|
|
104
|
+
(`saddlefit doctor` checks them):
|
|
105
|
+
|
|
106
|
+
1. **Memory** — at 4-bit, weights plus a 32k-token context fit in 24 GB or less.
|
|
107
|
+
2. **Active size** — at most about 10B parameters active per token (a 30B-A3B MoE qualifies).
|
|
108
|
+
3. **Speed** — roughly 20 tokens per second or more on the target machine.
|
|
109
|
+
4. **Tool use** — reliable tool calls, natively or through constrained JSON output.
|
|
110
|
+
|
|
111
|
+
| Tier | What it is | Typical hardware |
|
|
112
|
+
| --- | --- | --- |
|
|
113
|
+
| S | dense, 1–4B | 8–16 GB laptops, CPU only |
|
|
114
|
+
| M | dense, 4–10B, or a looped model | 16–18 GB Macs, GPUs with 8–12 GB |
|
|
115
|
+
| L | MoE, up to ~35B total and ~5B active | 32–36 GB Macs, 24 GB GPUs |
|
|
116
|
+
|
|
117
|
+
## Quickstart
|
|
118
|
+
|
|
119
|
+
Requires Python 3.12+, Docker and a local model runner such as [Ollama](https://ollama.com).
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
uv tool install saddlefit
|
|
123
|
+
cd your-python-project
|
|
124
|
+
saddlefit init --model qwen3:8b
|
|
125
|
+
saddlefit doctor
|
|
126
|
+
saddlefit tasks mine
|
|
127
|
+
saddlefit baseline
|
|
128
|
+
saddlefit fit
|
|
129
|
+
saddlefit report
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Every command also accepts `--json`.
|
|
133
|
+
|
|
134
|
+
## Where it comes from
|
|
135
|
+
|
|
136
|
+
The middle loop follows AutoSaddler; the fast loop and the improver that improves itself
|
|
137
|
+
follow Harness². What Saddlefit adds is the focus on one compact local model, measured on your
|
|
138
|
+
own tasks, with a harness that stays small.
|
|
139
|
+
|
|
140
|
+
<picture>
|
|
141
|
+
<source media="(prefers-color-scheme: dark)" srcset="docs/diagrams/origins-dark.svg">
|
|
142
|
+
<img alt="Ideas from AutoSaddler and Harness², and what Saddlefit adds" src="docs/diagrams/origins-light.svg" width="760">
|
|
143
|
+
</picture>
|
|
144
|
+
|
|
145
|
+
<picture>
|
|
146
|
+
<source media="(prefers-color-scheme: dark)" srcset="docs/diagrams/landscape-dark.svg">
|
|
147
|
+
<img alt="Map of related approaches by when the harness improves and who executes; Saddlefit learns ahead of time for a small local model" src="docs/diagrams/landscape-light.svg" width="760">
|
|
148
|
+
</picture>
|
|
149
|
+
|
|
150
|
+
See [the spec, Part D](docs/SPEC.md#part-d--background) for sources and a fuller comparison.
|
|
151
|
+
|
|
152
|
+
## Documentation
|
|
153
|
+
|
|
154
|
+
- [Specification](docs/SPEC.md) — the build contract
|
|
155
|
+
- [Architecture](docs/architecture.md)
|
|
156
|
+
- [Architecture decision records](docs/adr/)
|
|
157
|
+
- [Contributing](CONTRIBUTING.md)
|
|
158
|
+
- [Security policy](SECURITY.md)
|
|
159
|
+
|
|
160
|
+
## License
|
|
161
|
+
|
|
162
|
+
[Apache-2.0](LICENSE)
|