Skip to content

Commit

Permalink
Merge branch 'main' into intro-abc-conn
Browse files Browse the repository at this point in the history
  • Loading branch information
panh99 authored Sep 25, 2024
2 parents 1d72648 + 7058583 commit 249afba
Show file tree
Hide file tree
Showing 25 changed files with 6,300 additions and 2,760 deletions.
1 change: 1 addition & 0 deletions .github/workflows/_docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ jobs:
attempt_delay: 9000 # 9 secs
with: |
pull: true
sbom: true
platforms: ${{ matrix.platform.docker }}
context: "{{defaultContext}}:${{ inputs.file-dir }}"
outputs: type=image,name=${{ inputs.namespace-repository }},push-by-digest=true,name-canonical=true,push=true
Expand Down
79 changes: 79 additions & 0 deletions .github/workflows/update_translations.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Translations

on:
schedule:
- cron: '0 0 * * *' # Runs every day at midnight
workflow_dispatch: # Allows to manually trigger the workflow

jobs:
update-and-pr:
runs-on: ubuntu-22.04
permissions:
contents: write
pull-requests: write
env:
branch-name: auto-update-trans-text
name: Update text
steps:
- uses: actions/checkout@v4

- name: Bootstrap
uses: ./.github/actions/bootstrap
with:
python-version: '3.10'

- name: Install dependencies
run: |
python -m poetry install
pip install sphinx==7.3.7
- name: Install pandoc
uses: nikeee/setup-pandoc@v1

- name: Update text and translations for all locales
run: |
cd doc
make update-text
for langDir in locales/*; do
if [ -d "$langDir" ]; then
lang=$(basename $langDir)
echo "Updating language $lang"
make update-lang lang=$lang
fi
done
- name: Commit changes
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add doc/locales
git commit -m "Update text and language files"
continue-on-error: true

- name: Calculate diff # Even without doc changes the update-lang command will generate 228 additions and 60 deletions, so we only want to open a PR when there is more
id: calculate_diff
run: |
additions=$(git diff --numstat HEAD^1 | awk '{s+=$1} END {print s}')
deletions=$(git diff --numstat HEAD^1 | awk '{s+=$2} END {print s}')
echo "Additions: $additions"
echo "Deletions: $deletions"
echo "additions=$additions" >> $GITHUB_OUTPUT
echo "deletions=$deletions" >> $GITHUB_OUTPUT
- name: Push changes
if: steps.calculate_diff.outputs.additions > 228 && steps.calculate_diff.outputs.deletions > 60
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: '${{ env.branch-name }}'

- name: Create Pull Request
if: steps.calculate_diff.outputs.additions > 228 && steps.calculate_diff.outputs.deletions > 60
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: '${{ env.branch-name }}'
delete-branch: true
title: 'docs(framework:skip) Update source texts for translations (automated)'
body: 'This PR is auto-generated to update text and language files.'
draft: false
4 changes: 2 additions & 2 deletions benchmarks/flowertune-llm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ As the first step, please register for a Flower account on [flower.ai/login](htt
Then, create a new Python environment and install Flower.

> [!TIP]
> We recommend using `pyenv` and the `virtualenv` plugin to create your environment. Other manager such as Conda would likely work too. Check the [documentation](https://flower.ai/docs/framework/how-to-install-flower.html) for alternative ways of installing Flower.
> We recommend using `pyenv` with the `virtualenv` plugin to create your environment. Other managers, such as Conda, will likely work as well. Check the [documentation](https://flower.ai/docs/framework/how-to-install-flower.html) for alternative ways to install Flower.
```shell
pip install flwr
```

On the new environment, create a new Flower project using the `FlowerTune` template. You will be prompted for a name to give to your project, your username, and for your choice of LLM challenge:
In the new environment, create a new Flower project using the `FlowerTune` template. You will be prompted for a name to give to your project, your username, and for your choice of LLM challenge:
```shell
flwr new --framework=FlowerTune
```
Expand Down
3 changes: 3 additions & 0 deletions benchmarks/flowertune-llm/evaluation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ The default template generated by `flwr new` (see the [Project Creation Instruct
|:----------:|:-----:|:---------:|:--------------:|:---------------:|:-----:|
| Pass@1 (%) | 31.60 | 23.78 | 28.57 | 25.47 | 27.36 |

> [!NOTE]
> In the LLM Leaderboard, we rank the submissions based on the **average** value derived from different evaluation datasets for each challenge.

## Make submission on FlowerTune LLM Leaderboard

Expand Down
2 changes: 1 addition & 1 deletion dev/build-docker-image-matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def tag_latest_ubuntu_with_flwr_version(image: BaseImage) -> List[str]:
ubuntu_base_images = generate_base_images(
flwr_version,
SUPPORTED_PYTHON_VERSIONS,
[Distro(DistroName.UBUNTU, "22.04")],
[Distro(DistroName.UBUNTU, "24.04")],
)
# alpine base images for the latest supported python version
alpine_base_images = generate_base_images(
Expand Down
Loading

0 comments on commit 249afba

Please sign in to comment.