Enable summarization by subsets and groups #2084
This file contains hidden or 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
| name: Test Code Examples | |
| on: | |
| pull_request: | |
| paths: | |
| - 'examples/*' | |
| - 'tests/examples/*.py' | |
| - '.github/workflows/examples_tests.yml' | |
| release: | |
| types: [published] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.event.pull_request.number || github.ref_name }} | |
| cancel-in-progress: true | |
| jobs: | |
| examples: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| env: | |
| OS: ubuntu-latest | |
| UNITXT_DEFAULT_VERBOSITY: error | |
| DATASETS_VERBOSITY: error | |
| HF_HUB_VERBOSITY: error | |
| HF_DATASETS_DISABLE_PROGRESS_BARS: "True" | |
| HF_HUB_DOWNLOAD_TIMEOUT: 60 | |
| HF_HUB_ETAG_TIMEOUT: 60 | |
| TQDM_DISABLE: "True" | |
| WML_URL: ${{ secrets.WML_URL }} | |
| WML_PROJECT_ID: ${{ secrets.WML_PROJECT_ID }} | |
| WML_APIKEY: ${{ secrets.WML_APIKEY }} | |
| GENAI_KEY: ${{ secrets.GENAI_KEY }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| - name: Install Dependencies | |
| run: bash utils/install.sh | |
| - uses: ./.github/actions/install-internal-pip | |
| with: | |
| ssh-private-key: ${{ secrets.LLMEVALKIT_SSH_KEY }} | |
| - name: Hugging Face Login | |
| run: | | |
| for i in {1..5}; do | |
| huggingface-cli login --token ${{ secrets.UNITXT_READ_HUGGINGFACE_HUB_FOR_TESTS }} && break || sleep $((2 ** i)); | |
| done | |
| - name: Run Tests | |
| run: python -m unittest discover -s tests/examples -p "test_*.py" |