mirror of
https://github.com/huggingface/peft.git
synced 2025-10-20 15:33:48 +08:00
FEAT: Add GH action to deploy method comparison app (#2625)
* FEAT Add GH action to deploy method comparison app * Add to git credentials * Different approach * More fixes * Fix for requirements * Another approach * Bah * Change trigger to changes in method_comparison/ Manual trigger still possible * Update method_comparison/README.md * Satisfy Zizmor
This commit is contained in:
42
.github/workflows/deploy_method_comparison_app.yml
vendored
Normal file
42
.github/workflows/deploy_method_comparison_app.yml
vendored
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
name: Deploy "method_comparison" Gradio to Spaces
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
paths:
|
||||||
|
- "method_comparison/**"
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: {}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0 # full history needed for subtree
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
|
- name: Authenticate via ~/.netrc
|
||||||
|
env:
|
||||||
|
HF_TOKEN: ${{ secrets.PEFT_INTERNAL_REPO_READ_WRITE }}
|
||||||
|
run: |
|
||||||
|
# netrc needs BOTH login and password entries
|
||||||
|
printf "machine huggingface.co\nlogin hf\npassword ${HF_TOKEN}\n" >> ~/.netrc
|
||||||
|
chmod 600 ~/.netrc
|
||||||
|
|
||||||
|
- name: Deploy method_comparison app to HF Spaces
|
||||||
|
run: |
|
||||||
|
cd method_comparison
|
||||||
|
git init
|
||||||
|
# Spaces expect requirements.txt
|
||||||
|
mv requirements-app.txt requirements.txt
|
||||||
|
git config user.name "github-actions[bot]"
|
||||||
|
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
|
git remote add gradio-app https://huggingface.co/spaces/peft-internal-testing/PEFT-method-comparison
|
||||||
|
git add .
|
||||||
|
git commit -m "🚀 Deploy method comparison app from GH action"
|
||||||
|
git push -f gradio-app HEAD:main
|
@ -1,7 +1,17 @@
|
|||||||
|
---
|
||||||
|
title: PEFT Method Comparison
|
||||||
|
sdk: gradio
|
||||||
|
app_file: app.py
|
||||||
|
pinned: false
|
||||||
|
emoji: ⚖️
|
||||||
|
---
|
||||||
|
|
||||||
# Comparison of PEFT Methods
|
# Comparison of PEFT Methods
|
||||||
|
|
||||||
The goal of this project is to provide replicable experiments that produce outcomes allowing us to compare different PEFT methods with one another. This gives you more information to make an informed decision about which methods best fit your use case and what trade-offs to expect.
|
The goal of this project is to provide replicable experiments that produce outcomes allowing us to compare different PEFT methods with one another. This gives you more information to make an informed decision about which methods best fit your use case and what trade-offs to expect.
|
||||||
|
|
||||||
|
Visit our [Gradio Space](https://huggingface.co/spaces/peft-internal-testing/PEFT-method-comparison) to check the results.
|
||||||
|
|
||||||
## Community Contributions
|
## Community Contributions
|
||||||
|
|
||||||
We envision the PEFT method comparison project as an ongoing endeavor with heavy involvement from the community. As maintainers, it is impossible for us to know all the perfect hyperparameters for each method or to predict all the use cases that PEFT users may have. As a consequence, community contributions are very welcome.
|
We envision the PEFT method comparison project as an ongoing endeavor with heavy involvement from the community. As maintainers, it is impossible for us to know all the perfect hyperparameters for each method or to predict all the use cases that PEFT users may have. As a consequence, community contributions are very welcome.
|
||||||
@ -89,7 +99,9 @@ After adding the dataset, ensure it functions correctly and produces meaningful
|
|||||||
|
|
||||||
## Result dashboard
|
## Result dashboard
|
||||||
|
|
||||||
For convenience, we included a [Gradio](https://www.gradio.app/) app that shows the results of the experiments. It allows you to filter down the task and base model and show the experiment results for this selection. Give it a try!
|
For convenience, we included a [Gradio](https://www.gradio.app/) app that shows the results of the experiments. It allows you to filter down the task and base model and show the experiment results for this selection. Give it a try [here](https://huggingface.co/spaces/peft-internal-testing/PEFT-method-comparison).
|
||||||
|
|
||||||
|
### Local deployment
|
||||||
|
|
||||||
This app requires additional packages to be installed, please install the packages listed in `requirements-app.txt`, e.g. via:
|
This app requires additional packages to be installed, please install the packages listed in `requirements-app.txt`, e.g. via:
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user