Simplify update metadata job (#22811)
* Simplify update metadata job * Match more branch names * Install all what is necessary * Install all what is necessary * Forgot the dev * Install less stuff * This syntax?
This commit is contained in:
21
.github/workflows/update_metdata.yml
vendored
21
.github/workflows/update_metdata.yml
vendored
@@ -4,7 +4,7 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- update_transformers_metadata
|
- update_transformers_metadata*
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build_and_package:
|
build_and_package:
|
||||||
@@ -16,25 +16,12 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Load cached virtual environment
|
|
||||||
uses: actions/cache@v2
|
|
||||||
id: cache
|
|
||||||
with:
|
|
||||||
path: ~/venv/
|
|
||||||
key: v3-metadata-${{ hashFiles('setup.py') }}
|
|
||||||
|
|
||||||
- name: Create virtual environment on cache miss
|
|
||||||
if: steps.cache.outputs.cache-hit != 'true'
|
|
||||||
run: |
|
|
||||||
python -m venv ~/venv && . ~/venv/bin/activate
|
|
||||||
pip install --upgrade pip
|
|
||||||
|
|
||||||
- name: Setup environment
|
- name: Setup environment
|
||||||
run: |
|
run: |
|
||||||
. ~/venv/bin/activate
|
pip install --upgrade pip
|
||||||
pip install git+https://github.com/huggingface/transformers#egg=transformers[dev]
|
pip install datasets pandas
|
||||||
|
pip install .[torch,tf,flax]
|
||||||
|
|
||||||
- name: Update metadata
|
- name: Update metadata
|
||||||
run: |
|
run: |
|
||||||
. ~/venv/bin/activate
|
|
||||||
python utils/update_metadata.py --token ${{ secrets.SYLVAIN_HF_TOKEN }} --commit_sha ${{ github.sha }}
|
python utils/update_metadata.py --token ${{ secrets.SYLVAIN_HF_TOKEN }} --commit_sha ${{ github.sha }}
|
||||||
|
|||||||
Reference in New Issue
Block a user