Update transformers metadata (#14724)

* Wip on metadata update

* Most of the script

* Add a job to auto-update the transformers metadata

* Style
This commit is contained in:
Sylvain Gugger
2021-12-13 11:46:03 -05:00
committed by GitHub
parent c3cd88a9ba
commit 64e92ed224
2 changed files with 264 additions and 0 deletions

36
.github/workflows/update_metdata.yml vendored Normal file
View File

@@ -0,0 +1,36 @@
name: Build documentation
on:
push:
branches:
- master
- update_transformers_metadata
jobs:
build_and_package:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v2
- name: Loading cache.
uses: actions/cache@v2
id: cache
with:
path: ~/.cache/pip
key: v1-metadata
restore-keys: |
v1-metadata-${{ hashFiles('setup.py') }}
v1-metadata
- name: Setup environment
run: |
pip install git+https://github.com/huggingface/transformers#egg=transformers[dev]
- name: Update metadata
run: |
python utils/update_metadata.py --token ${{ secrets.SYLVAIN_HF_TOKEN }} --commit_sha ${{ github.sha }}