Skip to content

Commit 2afa79e

Browse files
finitearthmo374zCopilottimo282
authored
Refactor/interfaces (#42)
* add token count, flexible batch size and kwargs to vllm class * add testing script for implementation * fix batch size calculation * small changes * add revision test * add argument to parser * max model len to int * remove script * Change version and Release notes * changed callback behaviour and impelemented token count callback * init * small corrections * changes to prevent merge conflicts * small changes * first tests * add api_test * a lot has changed for gangsters * fix * added * removed * fix * Update promptolution/predictors/__init__.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * add testing to ci pipeline * Update action.yml * fix test dependencies in pipeline * Add further test dependencies * Refactor dependency groups * Add getting started notebook to documentation * Add workflow call trigger to docs workflow * Add CI and Docs status badges * Add temporary file for docs testing * Remove temporary file for docs testing * Update notebooks/getting_started.ipynb Co-authored-by: Timo Heiß <87521684+timo282@users.noreply.github.com> * Update notebooks/getting_started.ipynb Co-authored-by: Timo Heiß <87521684+timo282@users.noreply.github.com> * comments * end2end * added * new * more * change * update dependencies * added literals to get optimizer * added release notes --------- Co-authored-by: mo374z <schlager.mo@t-online.de> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Timo Heiß <ti-heiss@t-online.de> Co-authored-by: Timo Heiß <87521684+timo282@users.noreply.github.com>
1 parent 5d33d97 commit 2afa79e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+4417
-500
lines changed

.coverage

52 KB
Binary file not shown.

.github/actions/python-poetry/action.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,6 @@ runs:
3434
path: .venv
3535
key: ${{ runner.os }}-poetry-${{ inputs.poetry-version }}-${{ hashFiles('**/poetry.lock') }}
3636
- name: Install dependencies
37-
run: poetry install --no-interaction --no-root --only ${{ inputs.groups }}
37+
run:
38+
poetry install --no-interaction --no-root --only ${{ inputs.groups }}
3839
shell: bash

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ jobs:
2121
- name: Set up Python and Poetry
2222
uses: ./.github/actions/python-poetry
2323
with:
24-
groups: dev
24+
groups: main,dev,test
2525
- name: Run pre-commit
2626
uses: pre-commit/action@v3.0.1
27-
# - name: Run tests
28-
# run: poetry run python -m pytest
27+
- name: Run tests
28+
run: poetry run python -m pytest
2929

3030
build:
3131
runs-on: ubuntu-latest

.github/workflows/docs.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- main
7+
workflow_call:
78

89
permissions:
910
contents: write
@@ -22,6 +23,10 @@ jobs:
2223
with:
2324
groups: "docs"
2425

26+
- name: Generate notebook examples
27+
run: |
28+
poetry run jupyter nbconvert --to markdown --allow-errors --output-dir docs/examples notebooks/*.ipynb
29+
2530
- name: Deploy docs
2631
run: |
2732
poetry run mkdocs gh-deploy --force

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ dist/
99
outputs/
1010
results/
1111
poetry.lock
12+
CLAUDE.md
13+
**/CLAUDE.local.md

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
![promptolution](https://github.com/user-attachments/assets/84c050bd-61a1-4f2e-bc4e-874d9b4a69af)
2+
3+
[![CI](https://github.com/finitearth/promptolution/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/finitearth/promptolution/actions/workflows/ci.yml)
4+
[![Docs](https://github.com/finitearth/promptolution/actions/workflows/docs.yml/badge.svg?branch=main)](https://github.com/finitearth/promptolution/actions/workflows/docs.yml)
5+
26
# Promptolution
37
Promptolution is a library that provides a modular and extensible framework for implementing prompt tuning experiments. It offers a user-friendly interface to assemble the core components for various prompt optimization tasks.
48

docs/api/config.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Config
22

3-
::: promptolution.config.Config
3+
::: promptolution.config.ExperimentConfig
44
options:
55
show_root_heading: true
66
show_root_full_path: false

docs/examples/getting_started.md

Lines changed: 383 additions & 0 deletions
Large diffs are not rendered by default.

docs/release-notes.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# Release Notes
22

3+
## Release v1.4.0
4+
### What's changed
5+
#### Added features
6+
* Reworked APILLM to allow for calls to any API that follows the OpenAI API format
7+
* Added graceful failing in optimization runs, allowing to obtain results after an error
8+
* Reworked configs to ExperimentConfig, allowing to parse any attributes
9+
10+
### Further Changes:
11+
* Reworked getting started notebook
12+
* Added tests for the entire package, covering roughly 80% of the codebase
13+
* Reworked dependency and import structure to allow the usage of a subset of the package
14+
315
## Release v1.3.2
416
### What's changed
517
#### Added features

mkdocs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ nav:
5353
- Tasks: api/tasks.md
5454
- Callbacks: api/callbacks.md
5555
- Config: api/config.md
56+
- Tutorials:
57+
- Getting Started: examples/getting_started.md
5658

5759
markdown_extensions:
5860
- pymdownx.highlight:

0 commit comments

Comments
 (0)