adaptron 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.
- adaptron-0.1.0/.gitignore +211 -0
- adaptron-0.1.0/LICENSE +21 -0
- adaptron-0.1.0/PKG-INFO +333 -0
- adaptron-0.1.0/README.md +232 -0
- adaptron-0.1.0/adaptron/__init__.py +2 -0
- adaptron-0.1.0/adaptron/api/__init__.py +1 -0
- adaptron-0.1.0/adaptron/api/main.py +40 -0
- adaptron-0.1.0/adaptron/api/routes/__init__.py +1 -0
- adaptron-0.1.0/adaptron/api/routes/connectors.py +38 -0
- adaptron-0.1.0/adaptron/api/routes/pipelines.py +45 -0
- adaptron-0.1.0/adaptron/api/routes/playground.py +147 -0
- adaptron-0.1.0/adaptron/api/routes/schedules.py +49 -0
- adaptron-0.1.0/adaptron/api/routes/wizard.py +43 -0
- adaptron-0.1.0/adaptron/cli/__init__.py +1 -0
- adaptron-0.1.0/adaptron/cli/main.py +256 -0
- adaptron-0.1.0/adaptron/connectors/__init__.py +1 -0
- adaptron-0.1.0/adaptron/connectors/augmenter.py +126 -0
- adaptron-0.1.0/adaptron/connectors/base.py +28 -0
- adaptron-0.1.0/adaptron/connectors/bigquery.py +144 -0
- adaptron-0.1.0/adaptron/connectors/cassandra.py +152 -0
- adaptron-0.1.0/adaptron/connectors/cleaner.py +159 -0
- adaptron-0.1.0/adaptron/connectors/credentials.py +88 -0
- adaptron-0.1.0/adaptron/connectors/dynamodb.py +144 -0
- adaptron-0.1.0/adaptron/connectors/elasticsearch.py +146 -0
- adaptron-0.1.0/adaptron/connectors/kafka.py +135 -0
- adaptron-0.1.0/adaptron/connectors/manager.py +97 -0
- adaptron-0.1.0/adaptron/connectors/models.py +55 -0
- adaptron-0.1.0/adaptron/connectors/mongodb.py +131 -0
- adaptron-0.1.0/adaptron/connectors/mssql.py +204 -0
- adaptron-0.1.0/adaptron/connectors/mysql.py +198 -0
- adaptron-0.1.0/adaptron/connectors/oracle.py +200 -0
- adaptron-0.1.0/adaptron/connectors/postgresql.py +197 -0
- adaptron-0.1.0/adaptron/connectors/redis_conn.py +169 -0
- adaptron-0.1.0/adaptron/connectors/redshift.py +213 -0
- adaptron-0.1.0/adaptron/connectors/rest_api.py +137 -0
- adaptron-0.1.0/adaptron/connectors/s3.py +194 -0
- adaptron-0.1.0/adaptron/connectors/scheduler.py +106 -0
- adaptron-0.1.0/adaptron/connectors/snowflake.py +176 -0
- adaptron-0.1.0/adaptron/connectors/sqlite.py +189 -0
- adaptron-0.1.0/adaptron/connectors/stream.py +36 -0
- adaptron-0.1.0/adaptron/core/__init__.py +1 -0
- adaptron-0.1.0/adaptron/core/config.py +167 -0
- adaptron-0.1.0/adaptron/core/events.py +37 -0
- adaptron-0.1.0/adaptron/core/factory.py +117 -0
- adaptron-0.1.0/adaptron/core/pipeline.py +90 -0
- adaptron-0.1.0/adaptron/core/registry.py +54 -0
- adaptron-0.1.0/adaptron/deploy/__init__.py +1 -0
- adaptron-0.1.0/adaptron/deploy/base.py +19 -0
- adaptron-0.1.0/adaptron/deploy/gguf.py +51 -0
- adaptron-0.1.0/adaptron/deploy/huggingface.py +60 -0
- adaptron-0.1.0/adaptron/deploy/ollama.py +76 -0
- adaptron-0.1.0/adaptron/evaluate/__init__.py +1 -0
- adaptron-0.1.0/adaptron/evaluate/base.py +11 -0
- adaptron-0.1.0/adaptron/evaluate/domain.py +31 -0
- adaptron-0.1.0/adaptron/ingest/__init__.py +1 -0
- adaptron-0.1.0/adaptron/ingest/base.py +13 -0
- adaptron-0.1.0/adaptron/ingest/csv_ingester.py +45 -0
- adaptron-0.1.0/adaptron/ingest/docx.py +32 -0
- adaptron-0.1.0/adaptron/ingest/models.py +33 -0
- adaptron-0.1.0/adaptron/ingest/pdf.py +33 -0
- adaptron-0.1.0/adaptron/ingest/sql.py +62 -0
- adaptron-0.1.0/adaptron/playground/__init__.py +1 -0
- adaptron-0.1.0/adaptron/playground/engine.py +185 -0
- adaptron-0.1.0/adaptron/rag/__init__.py +1 -0
- adaptron-0.1.0/adaptron/rag/indexer.py +25 -0
- adaptron-0.1.0/adaptron/rag/retriever.py +30 -0
- adaptron-0.1.0/adaptron/synthesize/__init__.py +1 -0
- adaptron-0.1.0/adaptron/synthesize/auto.py +52 -0
- adaptron-0.1.0/adaptron/synthesize/base.py +11 -0
- adaptron-0.1.0/adaptron/synthesize/chat.py +44 -0
- adaptron-0.1.0/adaptron/synthesize/corpus.py +23 -0
- adaptron-0.1.0/adaptron/synthesize/detector.py +187 -0
- adaptron-0.1.0/adaptron/synthesize/dpo.py +42 -0
- adaptron-0.1.0/adaptron/synthesize/instruction.py +34 -0
- adaptron-0.1.0/adaptron/synthesize/qa.py +34 -0
- adaptron-0.1.0/adaptron/synthesize/text2sql.py +54 -0
- adaptron-0.1.0/adaptron/synthesize/validator.py +106 -0
- adaptron-0.1.0/adaptron/train/__init__.py +1 -0
- adaptron-0.1.0/adaptron/train/alignment.py +100 -0
- adaptron-0.1.0/adaptron/train/base.py +17 -0
- adaptron-0.1.0/adaptron/train/cpt.py +118 -0
- adaptron-0.1.0/adaptron/train/distill.py +158 -0
- adaptron-0.1.0/adaptron/train/full_ft.py +113 -0
- adaptron-0.1.0/adaptron/train/models.py +37 -0
- adaptron-0.1.0/adaptron/train/qlora.py +213 -0
- adaptron-0.1.0/adaptron/understand/__init__.py +1 -0
- adaptron-0.1.0/adaptron/understand/base.py +11 -0
- adaptron-0.1.0/adaptron/understand/chunker.py +84 -0
- adaptron-0.1.0/adaptron/understand/entities.py +36 -0
- adaptron-0.1.0/adaptron/understand/models.py +38 -0
- adaptron-0.1.0/adaptron/understand/quality.py +47 -0
- adaptron-0.1.0/adaptron/understand/schema.py +89 -0
- adaptron-0.1.0/docs/plans/2026-03-07-adaptron-design.md +295 -0
- adaptron-0.1.0/docs/plans/2026-03-07-adaptron-implementation.md +1088 -0
- adaptron-0.1.0/docs/plans/2026-03-07-playground-design.md +69 -0
- adaptron-0.1.0/docs/plans/2026-03-07-universal-data-connector-design.md +441 -0
- adaptron-0.1.0/docs/plans/2026-03-07-universal-data-connector-implementation.md +1893 -0
- adaptron-0.1.0/pyproject.toml +102 -0
- adaptron-0.1.0/tests/__init__.py +0 -0
- adaptron-0.1.0/tests/api/__init__.py +0 -0
- adaptron-0.1.0/tests/api/test_api.py +28 -0
- adaptron-0.1.0/tests/api/test_connectors.py +35 -0
- adaptron-0.1.0/tests/api/test_playground.py +56 -0
- adaptron-0.1.0/tests/api/test_schedules.py +28 -0
- adaptron-0.1.0/tests/cli/__init__.py +0 -0
- adaptron-0.1.0/tests/cli/test_cli.py +23 -0
- adaptron-0.1.0/tests/cli/test_connect.py +30 -0
- adaptron-0.1.0/tests/cli/test_schedule.py +17 -0
- adaptron-0.1.0/tests/connectors/__init__.py +0 -0
- adaptron-0.1.0/tests/connectors/test_augmenter.py +22 -0
- adaptron-0.1.0/tests/connectors/test_base.py +33 -0
- adaptron-0.1.0/tests/connectors/test_bigquery.py +130 -0
- adaptron-0.1.0/tests/connectors/test_cassandra.py +132 -0
- adaptron-0.1.0/tests/connectors/test_cleaner.py +68 -0
- adaptron-0.1.0/tests/connectors/test_credentials.py +99 -0
- adaptron-0.1.0/tests/connectors/test_dynamodb.py +109 -0
- adaptron-0.1.0/tests/connectors/test_elasticsearch.py +120 -0
- adaptron-0.1.0/tests/connectors/test_kafka.py +68 -0
- adaptron-0.1.0/tests/connectors/test_manager.py +66 -0
- adaptron-0.1.0/tests/connectors/test_models.py +75 -0
- adaptron-0.1.0/tests/connectors/test_mongodb.py +131 -0
- adaptron-0.1.0/tests/connectors/test_mssql.py +34 -0
- adaptron-0.1.0/tests/connectors/test_mysql.py +34 -0
- adaptron-0.1.0/tests/connectors/test_oracle.py +34 -0
- adaptron-0.1.0/tests/connectors/test_pipeline_integration.py +25 -0
- adaptron-0.1.0/tests/connectors/test_postgresql.py +153 -0
- adaptron-0.1.0/tests/connectors/test_redis_conn.py +92 -0
- adaptron-0.1.0/tests/connectors/test_redshift.py +37 -0
- adaptron-0.1.0/tests/connectors/test_rest_api.py +93 -0
- adaptron-0.1.0/tests/connectors/test_s3.py +107 -0
- adaptron-0.1.0/tests/connectors/test_scheduler.py +49 -0
- adaptron-0.1.0/tests/connectors/test_snowflake.py +119 -0
- adaptron-0.1.0/tests/connectors/test_sqlite.py +110 -0
- adaptron-0.1.0/tests/connectors/test_stream.py +34 -0
- adaptron-0.1.0/tests/core/__init__.py +0 -0
- adaptron-0.1.0/tests/core/test_config.py +58 -0
- adaptron-0.1.0/tests/core/test_events.py +34 -0
- adaptron-0.1.0/tests/core/test_factory.py +32 -0
- adaptron-0.1.0/tests/core/test_pipeline.py +58 -0
- adaptron-0.1.0/tests/core/test_registry.py +63 -0
- adaptron-0.1.0/tests/deploy/__init__.py +0 -0
- adaptron-0.1.0/tests/deploy/test_huggingface.py +78 -0
- adaptron-0.1.0/tests/deploy/test_ollama.py +19 -0
- adaptron-0.1.0/tests/evaluate/__init__.py +0 -0
- adaptron-0.1.0/tests/evaluate/test_domain.py +19 -0
- adaptron-0.1.0/tests/ingest/__init__.py +0 -0
- adaptron-0.1.0/tests/ingest/test_base.py +21 -0
- adaptron-0.1.0/tests/ingest/test_csv_ingester.py +36 -0
- adaptron-0.1.0/tests/ingest/test_docx.py +40 -0
- adaptron-0.1.0/tests/ingest/test_pdf.py +36 -0
- adaptron-0.1.0/tests/ingest/test_sql.py +33 -0
- adaptron-0.1.0/tests/integration/__init__.py +0 -0
- adaptron-0.1.0/tests/integration/test_connector_e2e.py +90 -0
- adaptron-0.1.0/tests/integration/test_pipeline_e2e.py +167 -0
- adaptron-0.1.0/tests/playground/__init__.py +0 -0
- adaptron-0.1.0/tests/playground/test_engine.py +87 -0
- adaptron-0.1.0/tests/rag/__init__.py +0 -0
- adaptron-0.1.0/tests/rag/test_rag.py +23 -0
- adaptron-0.1.0/tests/synthesize/__init__.py +0 -0
- adaptron-0.1.0/tests/synthesize/test_auto.py +38 -0
- adaptron-0.1.0/tests/synthesize/test_chat.py +26 -0
- adaptron-0.1.0/tests/synthesize/test_corpus.py +22 -0
- adaptron-0.1.0/tests/synthesize/test_detector.py +149 -0
- adaptron-0.1.0/tests/synthesize/test_dpo.py +25 -0
- adaptron-0.1.0/tests/synthesize/test_instruction.py +23 -0
- adaptron-0.1.0/tests/synthesize/test_qa.py +23 -0
- adaptron-0.1.0/tests/synthesize/test_text2sql.py +33 -0
- adaptron-0.1.0/tests/synthesize/test_validator.py +53 -0
- adaptron-0.1.0/tests/train/__init__.py +0 -0
- adaptron-0.1.0/tests/train/test_alignment.py +70 -0
- adaptron-0.1.0/tests/train/test_base.py +16 -0
- adaptron-0.1.0/tests/train/test_cpt.py +64 -0
- adaptron-0.1.0/tests/train/test_distill.py +86 -0
- adaptron-0.1.0/tests/train/test_full_ft.py +63 -0
- adaptron-0.1.0/tests/train/test_qlora.py +23 -0
- adaptron-0.1.0/tests/understand/__init__.py +0 -0
- adaptron-0.1.0/tests/understand/test_chunker.py +33 -0
- adaptron-0.1.0/tests/understand/test_entities.py +22 -0
- adaptron-0.1.0/tests/understand/test_quality.py +24 -0
- adaptron-0.1.0/tests/understand/test_schema.py +90 -0
- adaptron-0.1.0/web/app/dashboard/page.tsx +15 -0
- adaptron-0.1.0/web/app/globals.css +10 -0
- adaptron-0.1.0/web/app/layout.tsx +15 -0
- adaptron-0.1.0/web/app/page.tsx +28 -0
- adaptron-0.1.0/web/app/playground/page.tsx +285 -0
- adaptron-0.1.0/web/app/wizard/page.tsx +237 -0
- adaptron-0.1.0/web/next.config.js +12 -0
- adaptron-0.1.0/web/package-lock.json +1620 -0
- adaptron-0.1.0/web/package.json +24 -0
- adaptron-0.1.0/web/postcss.config.js +6 -0
- adaptron-0.1.0/web/tailwind.config.ts +22 -0
- adaptron-0.1.0/web/tsconfig.json +21 -0
|
@@ -0,0 +1,211 @@
|
|
|
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
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
.pybuilder/
|
|
76
|
+
target/
|
|
77
|
+
|
|
78
|
+
# Jupyter Notebook
|
|
79
|
+
.ipynb_checkpoints
|
|
80
|
+
|
|
81
|
+
# IPython
|
|
82
|
+
profile_default/
|
|
83
|
+
ipython_config.py
|
|
84
|
+
|
|
85
|
+
# pyenv
|
|
86
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
87
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
88
|
+
# .python-version
|
|
89
|
+
|
|
90
|
+
# pipenv
|
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
92
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
94
|
+
# install all needed dependencies.
|
|
95
|
+
#Pipfile.lock
|
|
96
|
+
|
|
97
|
+
# UV
|
|
98
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
99
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
100
|
+
# commonly ignored for libraries.
|
|
101
|
+
#uv.lock
|
|
102
|
+
|
|
103
|
+
# poetry
|
|
104
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
105
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
106
|
+
# commonly ignored for libraries.
|
|
107
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
108
|
+
#poetry.lock
|
|
109
|
+
#poetry.toml
|
|
110
|
+
|
|
111
|
+
# pdm
|
|
112
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
113
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
114
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
115
|
+
#pdm.lock
|
|
116
|
+
#pdm.toml
|
|
117
|
+
.pdm-python
|
|
118
|
+
.pdm-build/
|
|
119
|
+
|
|
120
|
+
# pixi
|
|
121
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
122
|
+
#pixi.lock
|
|
123
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
124
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
125
|
+
.pixi
|
|
126
|
+
|
|
127
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
128
|
+
__pypackages__/
|
|
129
|
+
|
|
130
|
+
# Celery stuff
|
|
131
|
+
celerybeat-schedule
|
|
132
|
+
celerybeat.pid
|
|
133
|
+
|
|
134
|
+
# SageMath parsed files
|
|
135
|
+
*.sage.py
|
|
136
|
+
|
|
137
|
+
# Environments
|
|
138
|
+
.env
|
|
139
|
+
.envrc
|
|
140
|
+
.venv
|
|
141
|
+
env/
|
|
142
|
+
venv/
|
|
143
|
+
ENV/
|
|
144
|
+
env.bak/
|
|
145
|
+
venv.bak/
|
|
146
|
+
|
|
147
|
+
# Spyder project settings
|
|
148
|
+
.spyderproject
|
|
149
|
+
.spyproject
|
|
150
|
+
|
|
151
|
+
# Rope project settings
|
|
152
|
+
.ropeproject
|
|
153
|
+
|
|
154
|
+
# mkdocs documentation
|
|
155
|
+
/site
|
|
156
|
+
|
|
157
|
+
# mypy
|
|
158
|
+
.mypy_cache/
|
|
159
|
+
.dmypy.json
|
|
160
|
+
dmypy.json
|
|
161
|
+
|
|
162
|
+
# Pyre type checker
|
|
163
|
+
.pyre/
|
|
164
|
+
|
|
165
|
+
# pytype static type analyzer
|
|
166
|
+
.pytype/
|
|
167
|
+
|
|
168
|
+
# Cython debug symbols
|
|
169
|
+
cython_debug/
|
|
170
|
+
|
|
171
|
+
# PyCharm
|
|
172
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
173
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
174
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
175
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
176
|
+
.idea/
|
|
177
|
+
|
|
178
|
+
# Abstra
|
|
179
|
+
# Abstra is an AI-powered process automation framework.
|
|
180
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
181
|
+
# Learn more at https://abstra.io/docs
|
|
182
|
+
.abstra/
|
|
183
|
+
|
|
184
|
+
# Visual Studio Code
|
|
185
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
186
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
187
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
188
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
189
|
+
# .vscode/
|
|
190
|
+
|
|
191
|
+
# Ruff stuff:
|
|
192
|
+
.ruff_cache/
|
|
193
|
+
|
|
194
|
+
# PyPI configuration file
|
|
195
|
+
.pypirc
|
|
196
|
+
|
|
197
|
+
# Cursor
|
|
198
|
+
# Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
|
|
199
|
+
# exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
|
|
200
|
+
# refer to https://docs.cursor.com/context/ignore-files
|
|
201
|
+
.cursorignore
|
|
202
|
+
.cursorindexingignore
|
|
203
|
+
|
|
204
|
+
# Marimo
|
|
205
|
+
marimo/_static/
|
|
206
|
+
marimo/_lsp/
|
|
207
|
+
__marimo__/
|
|
208
|
+
|
|
209
|
+
# Node.js
|
|
210
|
+
node_modules/
|
|
211
|
+
.next/
|
adaptron-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 GIS-DHSIT
|
|
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.
|
adaptron-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: adaptron
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: End-to-end LLM Fine-tuning Framework
|
|
5
|
+
Project-URL: Homepage, https://github.com/MuthuSubramanian/Adaptron
|
|
6
|
+
Project-URL: Repository, https://github.com/MuthuSubramanian/Adaptron
|
|
7
|
+
Project-URL: Bug Tracker, https://github.com/MuthuSubramanian/Adaptron/issues
|
|
8
|
+
Author: Muthu Subramanian G
|
|
9
|
+
License-Expression: MIT
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: fine-tuning,llm,machine-learning,nlp,training,transformers
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Intended Audience :: Science/Research
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
21
|
+
Requires-Python: >=3.11
|
|
22
|
+
Requires-Dist: pydantic>=2.0
|
|
23
|
+
Requires-Dist: pyyaml>=6.0
|
|
24
|
+
Requires-Dist: rich>=13.0
|
|
25
|
+
Requires-Dist: typer>=0.12
|
|
26
|
+
Provides-Extra: all
|
|
27
|
+
Requires-Dist: accelerate>=0.28; extra == 'all'
|
|
28
|
+
Requires-Dist: apscheduler>=3.10; extra == 'all'
|
|
29
|
+
Requires-Dist: bitsandbytes>=0.43; extra == 'all'
|
|
30
|
+
Requires-Dist: boto3>=1.34; extra == 'all'
|
|
31
|
+
Requires-Dist: cassandra-driver>=3.29; extra == 'all'
|
|
32
|
+
Requires-Dist: chromadb>=0.5; extra == 'all'
|
|
33
|
+
Requires-Dist: confluent-kafka>=2.3; extra == 'all'
|
|
34
|
+
Requires-Dist: datasets>=2.18; extra == 'all'
|
|
35
|
+
Requires-Dist: elasticsearch>=8.12; extra == 'all'
|
|
36
|
+
Requires-Dist: fastapi>=0.110; extra == 'all'
|
|
37
|
+
Requires-Dist: google-cloud-bigquery>=3.17; extra == 'all'
|
|
38
|
+
Requires-Dist: httpx>=0.27; extra == 'all'
|
|
39
|
+
Requires-Dist: huggingface-hub>=0.22; extra == 'all'
|
|
40
|
+
Requires-Dist: langchain-community>=0.2; extra == 'all'
|
|
41
|
+
Requires-Dist: openpyxl>=3.1; extra == 'all'
|
|
42
|
+
Requires-Dist: pandas>=2.2; extra == 'all'
|
|
43
|
+
Requires-Dist: peft>=0.10; extra == 'all'
|
|
44
|
+
Requires-Dist: pymongo>=4.6; extra == 'all'
|
|
45
|
+
Requires-Dist: pypdf>=4.0; extra == 'all'
|
|
46
|
+
Requires-Dist: python-docx>=1.1; extra == 'all'
|
|
47
|
+
Requires-Dist: redis>=5.0; extra == 'all'
|
|
48
|
+
Requires-Dist: sentence-transformers>=2.6; extra == 'all'
|
|
49
|
+
Requires-Dist: snowflake-connector-python>=3.7; extra == 'all'
|
|
50
|
+
Requires-Dist: spacy>=3.7; extra == 'all'
|
|
51
|
+
Requires-Dist: sqlalchemy>=2.0; extra == 'all'
|
|
52
|
+
Requires-Dist: torch>=2.1; extra == 'all'
|
|
53
|
+
Requires-Dist: transformers>=4.40; extra == 'all'
|
|
54
|
+
Requires-Dist: trl>=0.8; extra == 'all'
|
|
55
|
+
Requires-Dist: uvicorn>=0.29; extra == 'all'
|
|
56
|
+
Requires-Dist: websockets>=12.0; extra == 'all'
|
|
57
|
+
Provides-Extra: api
|
|
58
|
+
Requires-Dist: fastapi>=0.110; extra == 'api'
|
|
59
|
+
Requires-Dist: uvicorn>=0.29; extra == 'api'
|
|
60
|
+
Requires-Dist: websockets>=12.0; extra == 'api'
|
|
61
|
+
Provides-Extra: connectors
|
|
62
|
+
Requires-Dist: apscheduler>=3.10; extra == 'connectors'
|
|
63
|
+
Requires-Dist: boto3>=1.34; extra == 'connectors'
|
|
64
|
+
Requires-Dist: cassandra-driver>=3.29; extra == 'connectors'
|
|
65
|
+
Requires-Dist: confluent-kafka>=2.3; extra == 'connectors'
|
|
66
|
+
Requires-Dist: elasticsearch>=8.12; extra == 'connectors'
|
|
67
|
+
Requires-Dist: google-cloud-bigquery>=3.17; extra == 'connectors'
|
|
68
|
+
Requires-Dist: httpx>=0.27; extra == 'connectors'
|
|
69
|
+
Requires-Dist: pymongo>=4.6; extra == 'connectors'
|
|
70
|
+
Requires-Dist: redis>=5.0; extra == 'connectors'
|
|
71
|
+
Requires-Dist: snowflake-connector-python>=3.7; extra == 'connectors'
|
|
72
|
+
Provides-Extra: deploy
|
|
73
|
+
Requires-Dist: huggingface-hub>=0.22; extra == 'deploy'
|
|
74
|
+
Provides-Extra: dev
|
|
75
|
+
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
|
|
76
|
+
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
|
|
77
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
78
|
+
Requires-Dist: ruff>=0.3; extra == 'dev'
|
|
79
|
+
Provides-Extra: ingest
|
|
80
|
+
Requires-Dist: langchain-community>=0.2; extra == 'ingest'
|
|
81
|
+
Requires-Dist: openpyxl>=3.1; extra == 'ingest'
|
|
82
|
+
Requires-Dist: pandas>=2.2; extra == 'ingest'
|
|
83
|
+
Requires-Dist: pypdf>=4.0; extra == 'ingest'
|
|
84
|
+
Requires-Dist: python-docx>=1.1; extra == 'ingest'
|
|
85
|
+
Requires-Dist: sqlalchemy>=2.0; extra == 'ingest'
|
|
86
|
+
Provides-Extra: rag
|
|
87
|
+
Requires-Dist: chromadb>=0.5; extra == 'rag'
|
|
88
|
+
Requires-Dist: sentence-transformers>=2.6; extra == 'rag'
|
|
89
|
+
Provides-Extra: train
|
|
90
|
+
Requires-Dist: accelerate>=0.28; extra == 'train'
|
|
91
|
+
Requires-Dist: bitsandbytes>=0.43; extra == 'train'
|
|
92
|
+
Requires-Dist: datasets>=2.18; extra == 'train'
|
|
93
|
+
Requires-Dist: peft>=0.10; extra == 'train'
|
|
94
|
+
Requires-Dist: torch>=2.1; extra == 'train'
|
|
95
|
+
Requires-Dist: transformers>=4.40; extra == 'train'
|
|
96
|
+
Requires-Dist: trl>=0.8; extra == 'train'
|
|
97
|
+
Provides-Extra: understand
|
|
98
|
+
Requires-Dist: sentence-transformers>=2.6; extra == 'understand'
|
|
99
|
+
Requires-Dist: spacy>=3.7; extra == 'understand'
|
|
100
|
+
Description-Content-Type: text/markdown
|
|
101
|
+
|
|
102
|
+
# Adaptron
|
|
103
|
+
|
|
104
|
+
**End-to-end LLM Fine-tuning Framework**
|
|
105
|
+
|
|
106
|
+
<!-- Badges placeholder -->
|
|
107
|
+
<!--  -->
|
|
108
|
+
<!--  -->
|
|
109
|
+
<!--  -->
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## Overview
|
|
114
|
+
|
|
115
|
+
Adaptron is a plugin-based framework that takes you from raw documents to a deployed, fine-tuned language model. It orchestrates six pipeline stages -- **Ingest, Understand, Synthesize, Train, Evaluate, Deploy** -- and exposes the entire workflow through a Python API, a CLI, a FastAPI backend, and a Next.js web UI.
|
|
116
|
+
|
|
117
|
+
## Features
|
|
118
|
+
|
|
119
|
+
- **Multi-format ingestion** -- PDF, DOCX, CSV, and SQL data sources
|
|
120
|
+
- **Semantic understanding** -- chunking, entity extraction, quality scoring, schema inference
|
|
121
|
+
- **Instruction synthesis** -- template-based training data generation
|
|
122
|
+
- **Multiple training strategies** -- QLoRA (Unsloth+PEFT), Full Fine-Tuning, Continual Pre-Training, Distillation, DPO alignment
|
|
123
|
+
- **Domain evaluation** -- automated scoring of fine-tuned models
|
|
124
|
+
- **One-click deployment** -- Ollama, GGUF export, HuggingFace Hub push
|
|
125
|
+
- **Training Strategy Wizard** -- answers seven questions, picks the best training mode and base model automatically
|
|
126
|
+
- **Playground** -- chat with deployed models, compare outputs side-by-side, toggle RAG augmentation
|
|
127
|
+
- **Plugin system** -- register custom ingesters, trainers, deployers, or any stage component
|
|
128
|
+
- **Event-driven pipeline** -- real-time progress via EventBus and WebSocket
|
|
129
|
+
|
|
130
|
+
## Quick Start
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
# Install with all optional dependencies
|
|
134
|
+
pip install -e ".[all]"
|
|
135
|
+
|
|
136
|
+
# Initialize a project
|
|
137
|
+
adaptron init --project-dir my-project
|
|
138
|
+
cd my-project
|
|
139
|
+
|
|
140
|
+
# Edit adaptron.yaml, then run the pipeline
|
|
141
|
+
adaptron run
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
## Installation
|
|
145
|
+
|
|
146
|
+
Requires **Python 3.11+**.
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
# Core only (config, CLI, pipeline orchestrator)
|
|
150
|
+
pip install -e .
|
|
151
|
+
|
|
152
|
+
# With specific extras
|
|
153
|
+
pip install -e ".[train]" # torch, transformers, PEFT, TRL, bitsandbytes
|
|
154
|
+
pip install -e ".[ingest]" # pypdf, python-docx, pandas, sqlalchemy
|
|
155
|
+
pip install -e ".[understand]" # spacy, sentence-transformers
|
|
156
|
+
pip install -e ".[rag]" # chromadb, sentence-transformers
|
|
157
|
+
pip install -e ".[api]" # fastapi, uvicorn, websockets
|
|
158
|
+
pip install -e ".[deploy]" # huggingface-hub
|
|
159
|
+
|
|
160
|
+
# Everything
|
|
161
|
+
pip install -e ".[all]"
|
|
162
|
+
|
|
163
|
+
# Development (pytest, ruff, coverage)
|
|
164
|
+
pip install -e ".[dev]"
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
## Usage
|
|
168
|
+
|
|
169
|
+
### Python API
|
|
170
|
+
|
|
171
|
+
```python
|
|
172
|
+
from adaptron.core.config import PipelineConfig, WizardAnswers
|
|
173
|
+
|
|
174
|
+
# Let the wizard pick the best strategy
|
|
175
|
+
answers = WizardAnswers(
|
|
176
|
+
primary_goal="qa_docs",
|
|
177
|
+
data_sources=["docs"],
|
|
178
|
+
data_freshness="static",
|
|
179
|
+
hardware="mid",
|
|
180
|
+
timeline="medium",
|
|
181
|
+
accuracy="professional",
|
|
182
|
+
model_size="small",
|
|
183
|
+
)
|
|
184
|
+
config = PipelineConfig.from_wizard(answers)
|
|
185
|
+
|
|
186
|
+
print(config.base_model) # e.g. Qwen/Qwen2.5-7B-Instruct
|
|
187
|
+
print(config.training_modes) # e.g. ['qlora', 'rag']
|
|
188
|
+
|
|
189
|
+
# Or load from YAML
|
|
190
|
+
config = PipelineConfig.from_yaml("adaptron.yaml")
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
### CLI Commands
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
adaptron version # Show version
|
|
197
|
+
adaptron init # Create adaptron.yaml with defaults
|
|
198
|
+
adaptron run # Execute the pipeline
|
|
199
|
+
adaptron wizard # Interactive training strategy wizard
|
|
200
|
+
adaptron playground # Chat with a finetuned model via Ollama
|
|
201
|
+
adaptron playground --rag # Chat with RAG context augmentation
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
### Web UI
|
|
205
|
+
|
|
206
|
+
```bash
|
|
207
|
+
# Start the FastAPI backend
|
|
208
|
+
uvicorn adaptron.api.main:create_app --factory --reload
|
|
209
|
+
|
|
210
|
+
# In a separate terminal, start the Next.js frontend
|
|
211
|
+
cd web && npm install && npm run dev
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
Then open [http://localhost:3000](http://localhost:3000) to access the Wizard, Dashboard, and Playground.
|
|
215
|
+
|
|
216
|
+
## Architecture
|
|
217
|
+
|
|
218
|
+
```
|
|
219
|
+
adaptron.yaml
|
|
220
|
+
|
|
|
221
|
+
v
|
|
222
|
+
+-------+ +------------+ +------------+ +-------+ +----------+ +--------+
|
|
223
|
+
|Ingest | ->| Understand | ->| Synthesize | ->| Train | ->| Evaluate | ->| Deploy |
|
|
224
|
+
+-------+ +------------+ +------------+ +-------+ +----------+ +--------+
|
|
225
|
+
PDF,DOCX Chunker, Instruction QLoRA, Domain Ollama,
|
|
226
|
+
CSV,SQL Entities, templates FullFT, scoring GGUF,
|
|
227
|
+
Quality, CPT,DPO, HF Hub
|
|
228
|
+
Schema Distill
|
|
229
|
+
|
|
230
|
+
All stages are plugins registered in the global PluginRegistry.
|
|
231
|
+
The PipelineOrchestrator runs them sequentially, emitting events
|
|
232
|
+
via EventBus that the WebSocket API streams to the frontend.
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
## Plugin System
|
|
236
|
+
|
|
237
|
+
Every pipeline component is a plugin. Register your own with the `@register_plugin` decorator:
|
|
238
|
+
|
|
239
|
+
```python
|
|
240
|
+
from adaptron.core.registry import register_plugin
|
|
241
|
+
from adaptron.ingest.base import BaseIngester
|
|
242
|
+
from adaptron.ingest.models import DataSource, RawDocument
|
|
243
|
+
|
|
244
|
+
@register_plugin("ingester", "my_custom")
|
|
245
|
+
class MyCustomIngester(BaseIngester):
|
|
246
|
+
def ingest(self, source: DataSource) -> list[RawDocument]:
|
|
247
|
+
# Your custom ingestion logic
|
|
248
|
+
...
|
|
249
|
+
|
|
250
|
+
def supported_types(self) -> list[str]:
|
|
251
|
+
return ["my_custom"]
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
Retrieve plugins at runtime:
|
|
255
|
+
|
|
256
|
+
```python
|
|
257
|
+
from adaptron.core.registry import global_registry
|
|
258
|
+
|
|
259
|
+
ingester_cls = global_registry.get("ingest", "my_custom")
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
## Pipeline Stages
|
|
263
|
+
|
|
264
|
+
| Stage | Module | Plugins | Description |
|
|
265
|
+
|-------|--------|---------|-------------|
|
|
266
|
+
| **Ingest** | `adaptron.ingest` | `pdf`, `docx`, `csv`, `sql` | Extract text and metadata from data sources |
|
|
267
|
+
| **Understand** | `adaptron.understand` | `chunker`, `entities`, `quality`, `schema` | Semantic chunking, entity extraction, quality scoring, schema inference |
|
|
268
|
+
| **Synthesize** | `adaptron.synthesize` | `instruction` | Generate instruction-response training pairs from chunks |
|
|
269
|
+
| **Train** | `adaptron.train` | `qlora`, `full_ft`, `cpt`, `distill`, `alignment` (DPO) | Fine-tune or align the base model |
|
|
270
|
+
| **Evaluate** | `adaptron.evaluate` | `domain` | Score model outputs against domain-specific criteria |
|
|
271
|
+
| **Deploy** | `adaptron.deploy` | `ollama`, `gguf`, `huggingface` | Export and deploy the fine-tuned model |
|
|
272
|
+
|
|
273
|
+
## Playground
|
|
274
|
+
|
|
275
|
+
The playground lets you interact with deployed models:
|
|
276
|
+
|
|
277
|
+
- **Chat mode** -- streaming conversation with any Ollama-hosted model
|
|
278
|
+
- **RAG toggle** -- augment prompts with relevant context from ChromaDB
|
|
279
|
+
- **Comparison mode** -- send the same prompt to two models side-by-side (web UI)
|
|
280
|
+
- **CLI access** -- `adaptron playground --model adaptron-mymodel --rag`
|
|
281
|
+
|
|
282
|
+
## Configuration
|
|
283
|
+
|
|
284
|
+
Adaptron uses a YAML configuration file (`adaptron.yaml`):
|
|
285
|
+
|
|
286
|
+
```yaml
|
|
287
|
+
# Wizard answers -- drive automatic strategy selection
|
|
288
|
+
wizard:
|
|
289
|
+
primary_goal: qa_docs # qa_docs | erp_edw | report_gen | specialist
|
|
290
|
+
data_sources:
|
|
291
|
+
- docs # docs | erp | edw
|
|
292
|
+
data_freshness: static # static | monthly | daily | realtime
|
|
293
|
+
hardware: mid # low | mid | high | cloud
|
|
294
|
+
timeline: medium # fast | medium | long | unlimited
|
|
295
|
+
accuracy: professional # professional | enterprise | mission
|
|
296
|
+
model_size: small # tiny | small | medium | large
|
|
297
|
+
|
|
298
|
+
# Manual overrides
|
|
299
|
+
overrides:
|
|
300
|
+
epochs: 3
|
|
301
|
+
learning_rate: 0.0002
|
|
302
|
+
batch_size: 4
|
|
303
|
+
lora_rank: 64
|
|
304
|
+
max_seq_length: 2048
|
|
305
|
+
quantization: Q4_K_M
|
|
306
|
+
|
|
307
|
+
data:
|
|
308
|
+
input_dir: ./data
|
|
309
|
+
output_dir: ./output
|
|
310
|
+
|
|
311
|
+
deploy:
|
|
312
|
+
targets:
|
|
313
|
+
- gguf
|
|
314
|
+
- ollama
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
## Development
|
|
318
|
+
|
|
319
|
+
```bash
|
|
320
|
+
# Clone and install in dev mode
|
|
321
|
+
git clone <repo-url> && cd Adaptron
|
|
322
|
+
pip install -e ".[all,dev]"
|
|
323
|
+
|
|
324
|
+
# Run the test suite
|
|
325
|
+
pytest --tb=short -q
|
|
326
|
+
|
|
327
|
+
# Lint
|
|
328
|
+
ruff check adaptron/ tests/
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
## License
|
|
332
|
+
|
|
333
|
+
MIT License. See [LICENSE](LICENSE) for details.
|