feat: add UCM (Unobserved Components Model) support #2295
Workflow file for this run
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| run-tests: | |
| name: Run tests for cp${{ matrix.python-version }}-${{ matrix.os-platform[1] }} | |
| runs-on: ${{ matrix.os-platform[0] }} | |
| timeout-minutes: 60 | |
| env: | |
| CIBW_BUILD_FRONTEND: build[uv] | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: [310, 311, 312, 313] | |
| os-platform: | |
| [ | |
| [ubuntu-latest, manylinux_x86_64], | |
| [ubuntu-latest, manylinux_aarch64], | |
| [windows-latest, win_amd64], | |
| [macos-15, macosx_x86_64], | |
| [macos-14, macosx_arm64], | |
| [macos-15, macosx_arm64], | |
| [macos-latest, macosx_arm64], | |
| ] | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| submodules: "true" | |
| - name: Set up QEMU | |
| if: matrix.os-platform[1] == 'manylinux_aarch64' | |
| uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0 | |
| with: | |
| platforms: arm64 | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@f0ec1fc3b38f5e7cd731bb6ce540c5af426746bb # v6.1.0 | |
| with: | |
| version: "latest" | |
| - name: Build wheels and run all tests | |
| if: matrix.os-platform[0] == 'ubuntu-latest' | |
| uses: pypa/cibuildwheel@5f22145df44122af0f5a201f93cf0207171beca7 # v3.0.0 | |
| env: | |
| CIBW_BUILD: cp${{ matrix.python-version }}-${{ matrix.os-platform[1] }} | |
| CIBW_TEST_SKIP: "*linux_aarch64" | |
| CIBW_BEFORE_TEST: > | |
| yum install -y java-17-openjdk | |
| CIBW_TEST_COMMAND: > | |
| uv pip install -r {project}/setup.py --extra all && pytest --durations=0 {project}/action_files -k "not efficiency" --no-cov | |
| - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| if: github.event_name == 'push' | |
| with: | |
| name: artifact-cp${{ matrix.python-version }}-${{ matrix.os-platform[1] }} | |
| path: wheelhouse/*.whl | |
| retention-days: 1 | |
| publish-nightly-wheels: | |
| if: github.event_name == 'push' | |
| needs: [run-tests] | |
| env: | |
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID_NIXTLA_PACKAGES }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_NIXTLA_PACKAGES }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - name: Download wheels | |
| uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 | |
| with: | |
| path: dist | |
| pattern: "artifact-*" | |
| merge-multiple: true | |
| - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | |
| with: | |
| python-version: "3.10" | |
| - name: Publish wheels | |
| run: | | |
| pip install awscli beautifulsoup4 | |
| aws s3 cp s3://nixtla-packages/statsforecast/index.html . | |
| python action_files/update_index.py | |
| aws s3 sync dist s3://nixtla-packages/statsforecast/ | |
| test-m3-performance: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Clone repo | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| submodules: "true" | |
| - name: Set up environment | |
| uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | |
| with: | |
| python-version: "3.10" | |
| - name: Install the library | |
| run: pip install uv && uv pip install --system ".[dev]" "datasetsforecast @ git+https://github.com/Nixtla/datasetsforecast.git@95a9ea44115b5ed6088e30f786aa0c39f9e094ac" | |
| - name: Run M3 experiment | |
| run: | | |
| python -m src.experiment | |
| python -m src.evaluation --test | |
| working-directory: ./experiments/m3 | |
| efficiency-tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| submodules: "true" | |
| - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | |
| with: | |
| python-version: "3.13" | |
| - name: Install dependencies | |
| run: pip install uv && uv pip install --system . scikit-learn pytest-cov pytest-codspeed pytest-xdist | |
| - name: Run benchmarks | |
| uses: CodSpeedHQ/action@0010eb0ca6e89b80c88e8edaaa07cfe5f3e6664d # 3.5.0 | |
| with: | |
| token: ${{ secrets.CODESPEED_TOKEN }} | |
| run: pytest action_files/test_efficiency.py --codspeed -n 2 --no-cov |