fastsft 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.
- fastsft-0.1.0/.env.example +1 -0
- fastsft-0.1.0/.gitattributes +2 -0
- fastsft-0.1.0/.github/CODEOWNERS +4 -0
- fastsft-0.1.0/.github/dependabot.yml +13 -0
- fastsft-0.1.0/.github/workflows/build.yml +20 -0
- fastsft-0.1.0/.github/workflows/codeql.yml +33 -0
- fastsft-0.1.0/.github/workflows/lint.yml +16 -0
- fastsft-0.1.0/.github/workflows/publish.yml +25 -0
- fastsft-0.1.0/.github/workflows/test.yml +17 -0
- fastsft-0.1.0/.github/workflows/typecheck.yml +17 -0
- fastsft-0.1.0/.gitignore +13 -0
- fastsft-0.1.0/.python-version +1 -0
- fastsft-0.1.0/LICENSE +21 -0
- fastsft-0.1.0/PKG-INFO +544 -0
- fastsft-0.1.0/README.md +517 -0
- fastsft-0.1.0/TUTORIAL.md +275 -0
- fastsft-0.1.0/data_generation_tutorial.md +459 -0
- fastsft-0.1.0/evaluation_tutorial.md +265 -0
- fastsft-0.1.0/pyproject.toml +144 -0
- fastsft-0.1.0/src/fastsft/__init__.py +3 -0
- fastsft-0.1.0/src/fastsft/constants.py +36 -0
- fastsft-0.1.0/src/fastsft/data/__init__.py +0 -0
- fastsft-0.1.0/src/fastsft/data/config.py +34 -0
- fastsft-0.1.0/src/fastsft/data/constants.py +33 -0
- fastsft-0.1.0/src/fastsft/data/prompt_generator.py +97 -0
- fastsft-0.1.0/src/fastsft/data/refiner.py +72 -0
- fastsft-0.1.0/src/fastsft/data/response_generator.py +21 -0
- fastsft-0.1.0/src/fastsft/data/viewer.py +93 -0
- fastsft-0.1.0/src/fastsft/device.py +53 -0
- fastsft-0.1.0/src/fastsft/eval/__init__.py +7 -0
- fastsft-0.1.0/src/fastsft/eval/config.py +40 -0
- fastsft-0.1.0/src/fastsft/eval/constants.py +53 -0
- fastsft-0.1.0/src/fastsft/eval/embeddings.py +44 -0
- fastsft-0.1.0/src/fastsft/eval/evaluator.py +243 -0
- fastsft-0.1.0/src/fastsft/eval/inference.py +129 -0
- fastsft-0.1.0/src/fastsft/eval/inference_viewer.py +83 -0
- fastsft-0.1.0/src/fastsft/eval/prompt_set.py +120 -0
- fastsft-0.1.0/src/fastsft/eval/results.py +221 -0
- fastsft-0.1.0/src/fastsft/eval/results_viewer.py +153 -0
- fastsft-0.1.0/src/fastsft/eval/run.py +252 -0
- fastsft-0.1.0/src/fastsft/findings.py +21 -0
- fastsft-0.1.0/src/fastsft/findings_view.py +30 -0
- fastsft-0.1.0/src/fastsft/helper.py +121 -0
- fastsft-0.1.0/src/fastsft/main.py +344 -0
- fastsft-0.1.0/src/fastsft/model/__init__.py +0 -0
- fastsft-0.1.0/src/fastsft/model/_logging.py +21 -0
- fastsft-0.1.0/src/fastsft/model/base.py +154 -0
- fastsft-0.1.0/src/fastsft/model/constants.py +41 -0
- fastsft-0.1.0/src/fastsft/model/guide.py +53 -0
- fastsft-0.1.0/src/fastsft/model/judge.py +123 -0
- fastsft-0.1.0/src/fastsft/pipeline.py +105 -0
- fastsft-0.1.0/src/fastsft/progress.py +39 -0
- fastsft-0.1.0/src/fastsft/py.typed +0 -0
- fastsft-0.1.0/src/fastsft/stages/__init__.py +0 -0
- fastsft-0.1.0/src/fastsft/stages/base.py +53 -0
- fastsft-0.1.0/src/fastsft/stages/constants.py +11 -0
- fastsft-0.1.0/src/fastsft/stages/data_formatter.py +77 -0
- fastsft-0.1.0/src/fastsft/stages/data_generator.py +154 -0
- fastsft-0.1.0/src/fastsft/stages/fine_tuner.py +161 -0
- fastsft-0.1.0/src/fastsft/training/__init__.py +0 -0
- fastsft-0.1.0/src/fastsft/training/config.py +67 -0
- fastsft-0.1.0/src/fastsft/training/constants.py +59 -0
- fastsft-0.1.0/src/fastsft/training/heuristic.py +300 -0
- fastsft-0.1.0/src/fastsft/training/local_trainer.py +56 -0
- fastsft-0.1.0/src/fastsft/training/modal_app.py +79 -0
- fastsft-0.1.0/src/fastsft/training/stats.py +246 -0
- fastsft-0.1.0/src/fastsft/training/stats_viewer.py +181 -0
- fastsft-0.1.0/src/fastsft/training/trainer.py +234 -0
- fastsft-0.1.0/src/fastsft/validation_checks.py +62 -0
- fastsft-0.1.0/src/fastsft/warnings_filter.py +48 -0
- fastsft-0.1.0/tests/conftest.py +152 -0
- fastsft-0.1.0/tests/data/test_constants.py +59 -0
- fastsft-0.1.0/tests/data/test_prompt_generator.py +181 -0
- fastsft-0.1.0/tests/data/test_refiner.py +183 -0
- fastsft-0.1.0/tests/eval/test_constants.py +73 -0
- fastsft-0.1.0/tests/eval/test_embeddings.py +169 -0
- fastsft-0.1.0/tests/eval/test_evaluator.py +396 -0
- fastsft-0.1.0/tests/eval/test_inference.py +374 -0
- fastsft-0.1.0/tests/eval/test_prompt_set.py +99 -0
- fastsft-0.1.0/tests/eval/test_results.py +256 -0
- fastsft-0.1.0/tests/eval/test_run.py +303 -0
- fastsft-0.1.0/tests/model/conftest.py +23 -0
- fastsft-0.1.0/tests/model/test_base.py +248 -0
- fastsft-0.1.0/tests/model/test_constants.py +73 -0
- fastsft-0.1.0/tests/model/test_guide.py +79 -0
- fastsft-0.1.0/tests/model/test_judge.py +137 -0
- fastsft-0.1.0/tests/stages/test_base.py +67 -0
- fastsft-0.1.0/tests/stages/test_constants.py +28 -0
- fastsft-0.1.0/tests/stages/test_data_formatter.py +119 -0
- fastsft-0.1.0/tests/stages/test_data_generator.py +155 -0
- fastsft-0.1.0/tests/stages/test_fine_tuner.py +100 -0
- fastsft-0.1.0/tests/test_constants.py +67 -0
- fastsft-0.1.0/tests/test_e2e_live.py +206 -0
- fastsft-0.1.0/tests/test_fake_conformance.py +58 -0
- fastsft-0.1.0/tests/test_findings_view.py +53 -0
- fastsft-0.1.0/tests/test_helper.py +194 -0
- fastsft-0.1.0/tests/test_imports.py +35 -0
- fastsft-0.1.0/tests/test_main.py +150 -0
- fastsft-0.1.0/tests/test_pipeline.py +184 -0
- fastsft-0.1.0/tests/test_validation_checks.py +172 -0
- fastsft-0.1.0/tests/training/test_constants.py +97 -0
- fastsft-0.1.0/tests/training/test_heuristic.py +125 -0
- fastsft-0.1.0/tests/training/test_stats.py +219 -0
- fastsft-0.1.0/training_tutorial.md +239 -0
- fastsft-0.1.0/uv.lock +3215 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
OPENROUTER_API_KEY=sk-or-your-key-here
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
# Project dependencies, pinned via uv.lock.
|
|
4
|
+
- package-ecosystem: "uv"
|
|
5
|
+
directory: "/"
|
|
6
|
+
schedule:
|
|
7
|
+
interval: "weekly"
|
|
8
|
+
|
|
9
|
+
# The workflow actions themselves (actions/checkout, astral-sh/setup-uv, ...).
|
|
10
|
+
- package-ecosystem: "github-actions"
|
|
11
|
+
directory: "/"
|
|
12
|
+
schedule:
|
|
13
|
+
interval: "weekly"
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
name: Build
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
build:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v4
|
|
13
|
+
- uses: astral-sh/setup-uv@v5
|
|
14
|
+
# Builds the sdist + wheel (dynamic version resolved from
|
|
15
|
+
# src/fastsft/__init__.py via hatchling) -- catches packaging
|
|
16
|
+
# regressions before the actual PyPI publish, which this does NOT do.
|
|
17
|
+
- run: uv build
|
|
18
|
+
# Validates package metadata (README rendering, classifiers, etc.)
|
|
19
|
+
# without uploading anywhere.
|
|
20
|
+
- run: uvx twine check dist/*
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
name: CodeQL
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
schedule:
|
|
9
|
+
# Weekly scan catches newly-disclosed vulnerability patterns even when
|
|
10
|
+
# nothing in the repo changed.
|
|
11
|
+
- cron: "0 6 * * 1"
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
analyze:
|
|
15
|
+
name: Analyze (python)
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
permissions:
|
|
18
|
+
security-events: write
|
|
19
|
+
packages: read
|
|
20
|
+
actions: read
|
|
21
|
+
contents: read
|
|
22
|
+
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@v4
|
|
25
|
+
|
|
26
|
+
- uses: github/codeql-action/init@v3
|
|
27
|
+
with:
|
|
28
|
+
languages: python
|
|
29
|
+
build-mode: none
|
|
30
|
+
|
|
31
|
+
- uses: github/codeql-action/analyze@v3
|
|
32
|
+
with:
|
|
33
|
+
category: "/language:python"
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
name: Lint
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
ruff:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v4
|
|
13
|
+
- uses: astral-sh/setup-uv@v5
|
|
14
|
+
# --only-group dev installs just ruff (pinned in pyproject.toml), not the
|
|
15
|
+
# project's ML dependencies -- keeps the lint job fast and self-contained.
|
|
16
|
+
- run: uv run --only-group dev ruff check .
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
publish:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v4
|
|
15
|
+
|
|
16
|
+
- uses: astral-sh/setup-uv@v3
|
|
17
|
+
- uses: actions/setup-python@v5
|
|
18
|
+
with:
|
|
19
|
+
python-version: "3.12"
|
|
20
|
+
|
|
21
|
+
- run: uv build
|
|
22
|
+
|
|
23
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
24
|
+
with:
|
|
25
|
+
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
name: Tests
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
pytest:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v4
|
|
13
|
+
- uses: astral-sh/setup-uv@v5
|
|
14
|
+
# Bare `uv run` syncs the default groups (incl. dev -> pytest) plus the
|
|
15
|
+
# project itself -- tests import fastsft directly. Live tests (real
|
|
16
|
+
# OpenRouter calls / local training) stay skipped -- no --run-live here.
|
|
17
|
+
- run: uv run pytest -v --tb=short
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
name: Type Check
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
mypy:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v4
|
|
13
|
+
- uses: astral-sh/setup-uv@v5
|
|
14
|
+
# --only-group dev installs just mypy, mirroring lint.yml. [tool.mypy]'s
|
|
15
|
+
# ignore_missing_imports=true means the local-training/evaluation ML
|
|
16
|
+
# extras aren't needed to type-check.
|
|
17
|
+
- run: uv run --only-group dev mypy
|
fastsft-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.12
|
fastsft-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Aniruddha Das
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|