-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2e77e02
commit d35829e
Showing
9 changed files
with
311 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Update Open LLM Leaderboard | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 0 * * *" | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
update_open_llm_leaderboard: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install requirements | ||
run: | | ||
pip install --upgrade pip | ||
pip install pandas huggingface-hub | ||
- name: Update Open LLM Leaderboard | ||
env: | ||
HF_TOKEN: ${{ secrets.HF_TOKEN }} | ||
run: | | ||
python llm_perf/update_open_llm_leaderboard.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import subprocess | ||
|
||
import pandas as pd | ||
from huggingface_hub import create_repo, upload_file | ||
|
||
scrapping_script = """ | ||
git clone https://github.com/Weyaxi/scrape-open-llm-leaderboard.git | ||
pip install -r scrape-open-llm-leaderboard/requirements.txt | ||
python scrape-open-llm-leaderboard/main.py | ||
rm -rf scrape-open-llm-leaderboard | ||
""" | ||
|
||
|
||
def run_scrapper(): | ||
subprocess.run(scrapping_script, shell=True) | ||
|
||
|
||
def main(): | ||
run_scrapper() | ||
|
||
open_llm_leaderboard = pd.read_csv("open-llm-leaderboard.csv") | ||
|
||
if len(open_llm_leaderboard) > 0: | ||
create_repo( | ||
repo_id="optimum-benchmark/open-llm-leaderboard", | ||
repo_type="dataset", | ||
exist_ok=True, | ||
private=False, | ||
) | ||
upload_file( | ||
repo_id="optimum-benchmark/open-llm-leaderboard", | ||
commit_message="Update open LLM leaderboard", | ||
path_or_fileobj="open-llm-leaderboard.csv", | ||
path_in_repo="open-llm-leaderboard.csv", | ||
repo_type="dataset", | ||
) | ||
else: | ||
raise ValueError("No models found") | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
Oops, something went wrong.