From 31914ceb74b8cf515a0aed6fbeabba320537aa87 Mon Sep 17 00:00:00 2001 From: Noah Hollmann Date: Tue, 30 Dec 2025 09:22:40 +0100 Subject: [PATCH 1/3] Integrate first-party compatibility checks into CI --- .github/workflows/ci.yml | 61 ++++++++++++++++ .../workflows/first_party_compatibility.yml | 70 ------------------- 2 files changed, 61 insertions(+), 70 deletions(-) delete mode 100644 .github/workflows/first_party_compatibility.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7c6f1ed50..024616fa0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -223,3 +223,64 @@ jobs: # skip cpu based tests that were run separately TABPFN_EXCLUDE_DEVICES: "cpu,cpu:0,mps" run: uv run --no-sync pytest tests/ + + test_first_party_packages: + name: Test ${{ matrix.repo-name }} + needs: + - test_gpu + - test_compatibility + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + repo-name: + - tabpfn-extensions + - tabpfn-time-series + env: + TABPFN_MODEL_CACHE_DIR: ${{ github.workspace }}/model_cache + HF_TOKEN: ${{ vars.TABPFN_2_5_HF_TOKEN }} + + steps: + - name: Checkout TabPFN at current ref + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + with: + path: TabPFN + + - name: Checkout ${{ matrix.repo-name }} + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + with: + repository: PriorLabs/${{ matrix.repo-name }} + path: ${{ matrix.repo-name }} + + - name: Set up Python + uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 + with: + python-version: "3.13" + + - name: Set up uv + uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7.1.6 + + - name: Restore model cache + id: restore-model-cache + uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 + with: + path: ${{ github.workspace }}/model_cache + key: model-cache-${{ hashFiles('model_cache/**') }} + restore-keys: | + model-cache- + enableCrossOsArchive: true + # We don't save the model cache in this workflow as the main CI workflow already + # saves it. + + - name: Download models from Hugging Face + run: | + cd TabPFN + uv run python scripts/download_all_models.py + cd .. + + - name: Install dependencies and run tests + env: + FAST_TEST_MODE: 1 # Configures -extensions to run a smaller set of tests. + run: | + cd ${{ matrix.repo-name }} + uv run --with ../TabPFN --all-extras pytest -m "not uses_tabpfn_client" diff --git a/.github/workflows/first_party_compatibility.yml b/.github/workflows/first_party_compatibility.yml deleted file mode 100644 index 63598aa5e..000000000 --- a/.github/workflows/first_party_compatibility.yml +++ /dev/null @@ -1,70 +0,0 @@ -# Checks that our first-party packages that depend on TabPFN work correctly. -name: First Party Compatibility -on: - pull_request: - push: - branches: [main] - workflow_dispatch: - -concurrency: - group: compatibility-${{ github.ref }} - cancel-in-progress: true - -jobs: - test_first_party_packages: - name: Test ${{ matrix.repo-name }} - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - repo-name: - - tabpfn-extensions - - tabpfn-time-series - env: - TABPFN_MODEL_CACHE_DIR: ${{ github.workspace }}/model_cache - HF_TOKEN: ${{ vars.TABPFN_2_5_HF_TOKEN }} - - steps: - - name: Checkout TabPFN at current ref - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - with: - path: TabPFN - - - name: Checkout ${{ matrix.repo-name }} - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - with: - repository: PriorLabs/${{ matrix.repo-name }} - path: ${{ matrix.repo-name }} - - - name: Set up Python - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 - with: - python-version: "3.13" - - - name: Set up uv - uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7.1.6 - - - name: Restore model cache - id: restore-model-cache - uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 - with: - path: ${{ github.workspace }}/model_cache - key: model-cache-${{ hashFiles('model_cache/**') }} - restore-keys: | - model-cache- - enableCrossOsArchive: true - # We don't save the model cache in this workflow as the main CI workflow already - # saves it. - - - name: Download models from Hugging Face - run: | - cd TabPFN - uv run python scripts/download_all_models.py - cd .. - - - name: Install dependencies and run tests - env: - FAST_TEST_MODE: 1 # Configures -extensions to run a smaller set of tests. - run: | - cd ${{ matrix.repo-name }} - uv run --with ../TabPFN --all-extras pytest -m "not uses_tabpfn_client" From 81a3e3186d6bd1527214068b7a0fe76142c91efa Mon Sep 17 00:00:00 2001 From: Noah Hollmann Date: Wed, 31 Dec 2025 10:41:45 +0100 Subject: [PATCH 2/3] Refactor GPU testing workflow in CI configuration --- .github/workflows/ci.yml | 106 ++++++++++++++++++++------------------- 1 file changed, 55 insertions(+), 51 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 024616fa0..a41c53fd5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -174,61 +174,12 @@ jobs: run: uv run --no-sync pytest tests/ # ------------------------------------------------------------------- - # GPU: To save compute we only want to execute this workflow once - # a CPU workflow has passed. Hence, this workflow depends on the - # ubuntu-latest 3.14 workflow above. + # First Party Packages # ------------------------------------------------------------------- - test_gpu: - name: Test on GPU - needs: test_ubuntu_latest_314 - - strategy: - fail-fast: false - matrix: - include: - - python-version: "3.9" - dependency-set: lowest-direct - - python-version: "3.14" - dependency-set: highest - - runs-on: ubuntu-22.04-4core-gpu - env: - TABPFN_MODEL_CACHE_DIR: ${{ github.workspace }}/model_cache - HF_TOKEN: ${{ vars.TABPFN_2_5_HF_TOKEN }} - - steps: - - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 - with: - python-version: ${{ matrix.python-version }} - architecture: x64 - - - name: Install uv - uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7.1.6 - with: - enable-cache: true - - - name: Install dependencies - run: uv sync --group ci --resolution ${{ matrix.dependency-set }} - - - *restore-model-cache - - *download-models - - *save-model-cache - - - name: Run GPU Test Suite - env: - CUDA_VISIBLE_DEVICES: "0" - # skip cpu based tests that were run separately - TABPFN_EXCLUDE_DEVICES: "cpu,cpu:0,mps" - run: uv run --no-sync pytest tests/ test_first_party_packages: name: Test ${{ matrix.repo-name }} - needs: - - test_gpu - - test_compatibility + needs: check_python_linting runs-on: ubuntu-latest strategy: fail-fast: false @@ -284,3 +235,56 @@ jobs: run: | cd ${{ matrix.repo-name }} uv run --with ../TabPFN --all-extras pytest -m "not uses_tabpfn_client" + + # ------------------------------------------------------------------- + # GPU: To save compute we only want to execute this workflow once + # a CPU workflow has passed. Hence, this workflow depends on the + # ubuntu-latest 3.14 workflow above. + # ------------------------------------------------------------------- + test_gpu: + name: Test on GPU + needs: + - test_ubuntu_latest_314 + - test_first_party_packages + + strategy: + fail-fast: false + matrix: + include: + - python-version: "3.9" + dependency-set: lowest-direct + - python-version: "3.14" + dependency-set: highest + + runs-on: ubuntu-22.04-4core-gpu + env: + TABPFN_MODEL_CACHE_DIR: ${{ github.workspace }}/model_cache + HF_TOKEN: ${{ vars.TABPFN_2_5_HF_TOKEN }} + + steps: + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 + with: + python-version: ${{ matrix.python-version }} + architecture: x64 + + - name: Install uv + uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7.1.6 + with: + enable-cache: true + + - name: Install dependencies + run: uv sync --group ci --resolution ${{ matrix.dependency-set }} + + - *restore-model-cache + - *download-models + - *save-model-cache + + - name: Run GPU Test Suite + env: + CUDA_VISIBLE_DEVICES: "0" + # skip cpu based tests that were run separately + TABPFN_EXCLUDE_DEVICES: "cpu,cpu:0,mps" + run: uv run --no-sync pytest tests/ From c806fd599a2f8b2b1d5fe11ca0d597676b78552b Mon Sep 17 00:00:00 2001 From: Noah Hollmann Date: Thu, 8 Jan 2026 10:18:37 +0100 Subject: [PATCH 3/3] Apply suggestion from @noahho --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a41c53fd5..81ad59e80 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -245,7 +245,6 @@ jobs: name: Test on GPU needs: - test_ubuntu_latest_314 - - test_first_party_packages strategy: fail-fast: false