diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index c3e45cd..1f779dc 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -1,9 +1,6 @@ name: CICD on: - push: - branches: - - main workflow_dispatch: jobs: @@ -11,8 +8,20 @@ jobs: name: Run Tests, Pre-Commits, and Build Python package uses: ./.github/workflows/ci.yml - check-version: + check-branch: needs: build + name: Check Branch + runs-on: ubuntu-latest + steps: + - name: Fail if branch is not main + run: | + if [[ "${{ github.ref }}" != "refs/heads/main" ]]; then + echo "This workflow can only be run on the main branch." + exit 1 + fi + + check-version: + needs: check-branch runs-on: ubuntu-latest permissions: contents: read @@ -64,6 +73,18 @@ jobs: git tag -a v${{ needs.check-version.outputs.version }} -m "Release v${{ needs.check-version.outputs.version }}" git push origin v${{ needs.check-version.outputs.version }} + - name: Set release notes file path + id: release-notes + run: echo "RELEASE_NOTES_PATH=./docs/release-notes/v${{ needs.check-version.outputs.version }}.md" >> $GITHUB_ENV + + - name: Check if release notes file exists + id: check-release-notes + run: | + if [ ! -f "$RELEASE_NOTES_PATH" ]; then + echo "Error: Release notes file does not exist at path: $RELEASE_NOTES_PATH" + exit 1 + fi + - name: Create GitHub Release uses: actions/create-release@v1 env: @@ -71,9 +92,15 @@ jobs: with: tag_name: v${{ needs.check-version.outputs.version }} release_name: Release v${{ needs.check-version.outputs.version }} + body_path: ${{ env.RELEASE_NOTES_PATH }} draft: false prerelease: false + create-docs: + needs: create-release + name: Create and Deploy Documentation + uses: ./.github/workflows/docs.yml + publish-to-pypi: needs: [build, check-version, create-release] name: Publish Python package to PyPI diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index f848a97..0a7d111 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,10 +1,8 @@ name: Docs on: - push: - branches: - - main workflow_call: + workflow_dispatch: permissions: contents: write @@ -15,6 +13,13 @@ jobs: runs-on: ubuntu-latest steps: + - name: Fail if branch is not main + run: | + if [[ "${{ github.ref }}" != "refs/heads/main" ]]; then + echo "This workflow can only be run on the main branch." + exit 1 + fi + - name: Checkout uses: actions/checkout@v3 diff --git a/docs/release-notes.md b/docs/release-notes.md index 41aaf04..77d26c7 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -1,170 +1,2 @@ -# Release Notes - -## Release v1.4.0 -### What's changed -#### Added features -* Reworked APILLM to allow for calls to any API that follows the OpenAI API format -* Added graceful failing in optimization runs, allowing to obtain results after an error -* Reworked configs to ExperimentConfig, allowing to parse any attributes - -### Further Changes: -* Reworked getting started notebook -* Added tests for the entire package, covering roughly 80% of the codebase -* Reworked dependency and import structure to allow the usage of a subset of the package - -**Full Changelog**: [here](https://github.com/finitearth/promptolution/compare/v1.3.2...v1.4.0) - -## Release v1.3.2 -### What's changed -#### Added features -* Allow for configuration and evaluation of system prompts in all LLM-Classes -* CSV Callback is now FileOutputCallback and able to write Parquet files -* Fixed LLM-Call templates in VLLM -* refined OPRO-implementation to be closer to the paper - -**Full Changelog**: [here](https://github.com/finitearth/promptolution/compare/v1.3.1...v1.3.2) - -## Release v1.3.1 -### What's changed -#### Added features -* new features for the VLLM Wrapper (accept seeding to ensure reproducibility) -* fixes in the "MarkerBasedClassificator" -* fixes in prompt creation and task description handling -* generalize the Classificator -* add verbosity and callback handling in EvoPromptGA -* add timestamp to the callback -* removed datasets from repo -* changed task creation (now by default with a dataset) - -**Full Changelog**: [here](https://github.com/finitearth/promptolution/compare/v1.3.0...v1.3.1) - -## Release v1.3.0 -### What's changed -#### Added features -* new features for the VLLM Wrapper (automatic batch size determination, accepting kwargs) -* allow callbacks to terminate optimization run -* add token count functionality -* renamed "Classificator"-Predictor to "FirstOccurenceClassificator" -* introduced "MarkerBasedClassifcator" -* automatic task description creation -* use task description in prompt creation -* implement CSV callbacks - -**Full Changelog**: [here](https://github.com/finitearth/promptolution/compare/v1.2.0...v1.3.0) - -## Release v1.2.0 -### What's changed -#### Added features -* New LLM wrapper: VLLM for local inference with batches - -**Full Changelog**: [here](https://github.com/finitearth/promptolution/compare/v1.1.1...v1.2.0) - -## Release v1.1.1 -### What's Changed -#### Further Changes: -- deleted poetry.lock -- updated transformers dependency: bumped from 4.46.3 to 4.48.0 - -**Full Changelog**: [here](https://github.com/finitearth/promptolution/compare/v1.1.0...v1.1.1) - -## Release v1.1.0 -### What's changed -#### Added features -* Enable reading tasks from a pandas dataframe - -#### Further Changes: -* deleted experiment files from the repo folders (logs, configs, etc.) -* improved opros meta-prompt -* added support for python versions from 3.9 onwards (previously 3.11) - -**Full Changelog**: [here](https://github.com/finitearth/promptolution/compare/v1.0.1...v1.1.0) - -## Release v1.0.1 -### What's changed -#### Added features -- - -#### Further Changes: -* fixed release notes - -**Full Changelog**: [here](https://github.com/finitearth/promptolution/compare/v1.0.0...v1.0.1) - -## Release v1.0.0 -### What's changed -#### Added Features: -* exemplar selection module, classes for exemplar selection (Random and RandomSearch) -* helper functions: run_experiment, run_optimization and run_evaluation - -#### Further Changes: -* removed deepinfra helper functions as langchain-community libary is now working as intended -* added license -* added release notes :) - -**Full Changelog**: [here](https://github.com/finitearth/promptolution/compare/v0.2.0...v1.0.0) - -## Release v0.2.0 - -### What's Changed -#### Added Features: -* Prompt creation utility function -* Prompt variation utility function -* New optimizer: OPro (see [arXiv paper](https://arxiv.org/abs/2309.03409)) - -#### Further Changes: -* Workflows for automated build, deployment & release -* New documentation page appearance -* Additional Docstrings & Formatting - -**Full Changelog**: [here](https://github.com/finitearth/promptolution/compare/v0.1.1...v0.2.0) - -## Release v0.1.1 (2) - -### What's Changed - -#### Added features: -\- - -#### Further changes: -* Added workflows for automated build, deployment, release and doc creation -* Updated pre-commits -* Added docstrings and formatting -* Updated readme -* Updated docs - -**Full Changelog**: [here](https://github.com/finitearth/promptolution/compare/0.1.1...v0.1.1) - -## Release v0.1.1 - -### What's Changed - -#### Features added: -\- - -#### Further changes: -* Loosen restrictive python version requirements (^3.11 instead of ~3.11) -* Add documentation pages -* Update README - -**Full Changelog**: [here](https://github.com/finitearth/promptolution/compare/0.1.0...0.1.1) - -## Release v0.1.0 - -*First release* - -### What's Changed - -#### Added Features: -* Base classes for tasks, LLMs, predictors, and optimizers -* Classification task -* API LLMs from OpenAI, Anthropic, and DeepInfra -* Local LLM -* optimizer EvoPrompt GA and EvoPrompt DE (see [arXiv paper](https://arxiv.org/abs/2309.08532)) - -#### Further changes: -* Added example classification datasets used in the [EvoPrompt paper](https://arxiv.org/abs/2309.08532) -* Added dummy classes for testing -* Added example scripts and configs for experiments -* Added experiment results and evaluation notebooks - -**Full Changelog**: [here](https://github.com/finitearth/promptolution/commits/0.1.0) +Welcome to the release notes of Promptolution! Please find the release notes for the corresponding versions of the library in the menu to your left. diff --git a/docs/release-notes/v0.1.0.md b/docs/release-notes/v0.1.0.md new file mode 100644 index 0000000..eca666a --- /dev/null +++ b/docs/release-notes/v0.1.0.md @@ -0,0 +1,20 @@ +## Release v0.1.0 + +*First release* + +### What's Changed + +#### Added Features: +* Base classes for tasks, LLMs, predictors, and optimizers +* Classification task +* API LLMs from OpenAI, Anthropic, and DeepInfra +* Local LLM +* optimizer EvoPrompt GA and EvoPrompt DE (see [arXiv paper](https://arxiv.org/abs/2309.08532)) + +#### Further changes: +* Added example classification datasets used in the [EvoPrompt paper](https://arxiv.org/abs/2309.08532) +* Added dummy classes for testing +* Added example scripts and configs for experiments +* Added experiment results and evaluation notebooks + +**Full Changelog**: [here](https://github.com/finitearth/promptolution/commits/0.1.0) diff --git a/docs/release-notes/v0.1.1.md b/docs/release-notes/v0.1.1.md new file mode 100644 index 0000000..5ac4903 --- /dev/null +++ b/docs/release-notes/v0.1.1.md @@ -0,0 +1,13 @@ +## Release v0.1.1 + +### What's Changed + +#### Features added: +\- + +#### Further changes: +* Loosen restrictive python version requirements (^3.11 instead of ~3.11) +* Add documentation pages +* Update README + +**Full Changelog**: [here](https://github.com/finitearth/promptolution/compare/0.1.0...0.1.1) diff --git a/docs/release-notes/v0.1.1b.md b/docs/release-notes/v0.1.1b.md new file mode 100644 index 0000000..3e9de2b --- /dev/null +++ b/docs/release-notes/v0.1.1b.md @@ -0,0 +1,15 @@ +## Release v0.1.1 (2) + +### What's Changed + +#### Added features: +\- + +#### Further changes: +* Added workflows for automated build, deployment, release and doc creation +* Updated pre-commits +* Added docstrings and formatting +* Updated readme +* Updated docs + +**Full Changelog**: [here](https://github.com/finitearth/promptolution/compare/0.1.1...v0.1.1) diff --git a/docs/release-notes/v0.2.0.md b/docs/release-notes/v0.2.0.md new file mode 100644 index 0000000..effd671 --- /dev/null +++ b/docs/release-notes/v0.2.0.md @@ -0,0 +1,14 @@ +## Release v0.2.0 + +### What's Changed +#### Added Features: +* Prompt creation utility function +* Prompt variation utility function +* New optimizer: OPro (see [arXiv paper](https://arxiv.org/abs/2309.03409)) + +#### Further Changes: +* Workflows for automated build, deployment & release +* New documentation page appearance +* Additional Docstrings & Formatting + +**Full Changelog**: [here](https://github.com/finitearth/promptolution/compare/v0.1.1...v0.2.0) diff --git a/docs/release-notes/v1.0.0.md b/docs/release-notes/v1.0.0.md new file mode 100644 index 0000000..498415e --- /dev/null +++ b/docs/release-notes/v1.0.0.md @@ -0,0 +1,12 @@ +## Release v1.0.0 +### What's changed +#### Added Features: +* exemplar selection module, classes for exemplar selection (Random and RandomSearch) +* helper functions: run_experiment, run_optimization and run_evaluation + +#### Further Changes: +* removed deepinfra helper functions as langchain-community libary is now working as intended +* added license +* added release notes :) + +**Full Changelog**: [here](https://github.com/finitearth/promptolution/compare/v0.2.0...v1.0.0) diff --git a/docs/release-notes/v1.0.1.md b/docs/release-notes/v1.0.1.md new file mode 100644 index 0000000..859a2cb --- /dev/null +++ b/docs/release-notes/v1.0.1.md @@ -0,0 +1,9 @@ +## Release v1.0.1 +### What's changed +#### Added features +- + +#### Further Changes: +* fixed release notes + +**Full Changelog**: [here](https://github.com/finitearth/promptolution/compare/v1.0.0...v1.0.1) diff --git a/docs/release-notes/v1.1.0.md b/docs/release-notes/v1.1.0.md new file mode 100644 index 0000000..ae95c6e --- /dev/null +++ b/docs/release-notes/v1.1.0.md @@ -0,0 +1,11 @@ +## Release v1.1.0 +### What's changed +#### Added features +* Enable reading tasks from a pandas dataframe + +#### Further Changes: +* deleted experiment files from the repo folders (logs, configs, etc.) +* improved opros meta-prompt +* added support for python versions from 3.9 onwards (previously 3.11) + +**Full Changelog**: [here](https://github.com/finitearth/promptolution/compare/v1.0.1...v1.1.0) diff --git a/docs/release-notes/v1.1.1.md b/docs/release-notes/v1.1.1.md new file mode 100644 index 0000000..3c7e707 --- /dev/null +++ b/docs/release-notes/v1.1.1.md @@ -0,0 +1,8 @@ +## Release v1.1.1 +### What's Changed +#### Further Changes: +- deleted poetry.lock +- updated transformers dependency: bumped from 4.46.3 to 4.48.0 + +**Full Changelog**: [here](https://github.com/finitearth/promptolution/compare/v1.1.0...v1.1.1) + diff --git a/docs/release-notes/v1.2.0.md b/docs/release-notes/v1.2.0.md new file mode 100644 index 0000000..b8c47c5 --- /dev/null +++ b/docs/release-notes/v1.2.0.md @@ -0,0 +1,6 @@ +## Release v1.2.0 +### What's changed +#### Added features +* New LLM wrapper: VLLM for local inference with batches + +**Full Changelog**: [here](https://github.com/finitearth/promptolution/compare/v1.1.1...v1.2.0) diff --git a/docs/release-notes/v1.3.0.md b/docs/release-notes/v1.3.0.md new file mode 100644 index 0000000..ea6c6ad --- /dev/null +++ b/docs/release-notes/v1.3.0.md @@ -0,0 +1,13 @@ +## Release v1.3.0 +### What's changed +#### Added features +* new features for the VLLM Wrapper (automatic batch size determination, accepting kwargs) +* allow callbacks to terminate optimization run +* add token count functionality +* renamed "Classificator"-Predictor to "FirstOccurenceClassificator" +* introduced "MarkerBasedClassificator" +* automatic task description creation +* use task description in prompt creation +* implement CSV callbacks + +**Full Changelog**: [here](https://github.com/finitearth/promptolution/compare/v1.2.0...v1.3.0) diff --git a/docs/release-notes/v1.3.1.md b/docs/release-notes/v1.3.1.md new file mode 100644 index 0000000..b711161 --- /dev/null +++ b/docs/release-notes/v1.3.1.md @@ -0,0 +1,13 @@ +## Release v1.3.1 +### What's changed +#### Added features +* new features for the VLLM Wrapper (accept seeding to ensure reproducibility) +* fixes in the "MarkerBasedClassificator" +* fixes in prompt creation and task description handling +* generalize the Classificator +* add verbosity and callback handling in EvoPromptGA +* add timestamp to the callback +* removed datasets from repo +* changed task creation (now by default with a dataset) + +**Full Changelog**: [here](https://github.com/finitearth/promptolution/compare/v1.3.0...v1.3.1) diff --git a/docs/release-notes/v1.3.2.md b/docs/release-notes/v1.3.2.md new file mode 100644 index 0000000..a1ab0ed --- /dev/null +++ b/docs/release-notes/v1.3.2.md @@ -0,0 +1,9 @@ +## Release v1.3.2 +### What's changed +#### Added features +* Allow for configuration and evaluation of system prompts in all LLM-Classes +* CSV Callback is now FileOutputCallback and able to write Parquet files +* Fixed LLM-Call templates in VLLM +* refined OPRO-implementation to be closer to the paper + +**Full Changelog**: [here](https://github.com/finitearth/promptolution/compare/v1.3.1...v1.3.2) diff --git a/docs/release-notes/v1.4.0.md b/docs/release-notes/v1.4.0.md new file mode 100644 index 0000000..e439ded --- /dev/null +++ b/docs/release-notes/v1.4.0.md @@ -0,0 +1,13 @@ +## Release v1.4.0 +### What's changed +#### Added features +* Reworked APILLM to allow for calls to any API that follows the OpenAI API format +* Added graceful failing in optimization runs, allowing to obtain results after an error +* Reworked configs to ExperimentConfig, allowing to parse any attributes + +### Further Changes: +* Reworked getting started notebook +* Added tests for the entire package, covering roughly 80% of the codebase +* Reworked dependency and import structure to allow the usage of a subset of the package + +**Full Changelog**: [here](https://github.com/finitearth/promptolution/compare/v1.3.2...v1.4.0) diff --git a/docs/release-notes/vX.X.X.md b/docs/release-notes/vX.X.X.md new file mode 100644 index 0000000..526829d --- /dev/null +++ b/docs/release-notes/vX.X.X.md @@ -0,0 +1,11 @@ +## Release vX.X.X +### What's changed + +#### Added features: +* + +#### Further changes: +* + +**Full Changelog**: [here](https://github.com/finitearth/promptolution/compare/W.W.W...vX.X.X) + diff --git a/mkdocs.yml b/mkdocs.yml index d9e7ee3..a26607d 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -45,7 +45,21 @@ plugins: nav: - Home: index.md - - Release Notes: release-notes.md + - Release Notes: + - Overview: release-notes.md + - v1.4.0: release-notes/v1.4.0.md + - v1.3.2: release-notes/v1.3.2.md + - v1.3.1: release-notes/v1.3.1.md + - v1.3.0: release-notes/v1.3.0.md + - v1.2.0: release-notes/v1.2.0.md + - v1.1.1: release-notes/v1.1.1.md + - v1.1.0: release-notes/v1.1.0.md + - v1.0.1: release-notes/v1.0.1.md + - v1.0.0: release-notes/v1.0.0.md + - v0.2.0: release-notes/v0.2.0.md + - v0.1.1b: release-notes/v0.1.1b.md + - v0.1.1: release-notes/v0.1.1.md + - v0.1.0: release-notes/v0.1.0.md - API Reference: - LLMs: api/llms.md - Optimizers: api/optimizers.md