diff --git a/.azure-pipelines/gpu-tests.yml b/.azure-pipelines/gpu-tests.yml index 587738f..1a3e0a3 100644 --- a/.azure-pipelines/gpu-tests.yml +++ b/.azure-pipelines/gpu-tests.yml @@ -59,7 +59,7 @@ jobs: mapDockerSocket: false volumes: - /var/run/user/998/docker.sock:/var/run/docker.sock - options: --gpus all + options: --gpus all --shm-size=512m workspace: clean: outputs diff --git a/.github/workflows/ci_schema.yml b/.github/workflows/ci_schema.yml index ad5b070..da59896 100644 --- a/.github/workflows/ci_schema.yml +++ b/.github/workflows/ci_schema.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install pkg run: | diff --git a/.github/workflows/ci_test-full.yml b/.github/workflows/ci_test-full.yml index 843ce7a..9fd2e00 100644 --- a/.github/workflows/ci_test-full.yml +++ b/.github/workflows/ci_test-full.yml @@ -59,12 +59,12 @@ jobs: RUSTFLAGS: ${{ matrix.os == 'macOS-14' && '-A invalid_reference_casting' || '' }} # TODO: Remove this and enable running MPS tests the macos runners support it: # https://github.com/actions/runner-images/issues/9918#issuecomment-2149336099 - DISABLE_MPS: ${{ matrix.os == 'macOS-14' && '1' || '0' }} + DISABLE_MPS: ${{ (matrix.os == 'macOS-14' && '1') || '0' }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} @@ -83,21 +83,22 @@ jobs: # Note: This uses an internal pip API and may not always work # https://github.com/actions/cache/blob/master/examples.md#multiple-oss-in-a-workflow - - name: Get pip cache dir + # sadly, this env var is not properly abstracted over OS platforms so we set it twice, the second time for windows + - name: Get pip cache dir windows id: pip-cache - run: echo "::set-output name=dir::$(pip cache dir)" + run: | + echo "PIP_CACHE_DIR=$(pip cache dir)" >> $GITHUB_OUTPUT + echo "PIP_CACHE_DIR=$(pip cache dir)" >> $env:GITHUB_OUTPUT - name: pip cache uses: actions/cache@v4 with: - path: ${{ steps.pip-cache.outputs.dir }} + path: ${{ steps.pip-cache.outputs.PIP_CACHE_DIR }} key: ${{ runner.os }}-pip-td${{ env.TIME_PERIOD }}-py${{ matrix.python-version }}-${{ matrix.release }}-${{ matrix.requires }}-${{ hashFiles('requirements/base.txt') }}-${{ hashFiles('requirements/extra.txt') }} restore-keys: | ${{ runner.os }}-pip-td${{ env.TIME_PERIOD }}-py${{ matrix.python-version }}-${{ matrix.release }}-${{ matrix.requires }}- - name: Install extra dependencies - # env: # workaround for macos tokenizers https://github.com/neonbjb/tortoise-tts/issues/728#issuecomment-1962438240 - # RUSTFLAGS: '-A invalid_reference_casting' run: | pip install --requirement requirements/base.txt --upgrade pip install --requirement requirements/examples.txt --upgrade @@ -105,18 +106,6 @@ jobs: pip list shell: bash - # - name: Install dependencies - # run: | - # flag=$(python -c "print('--pre' if '${{matrix.release}}' == 'pre' else '')" 2>&1) - # url=$(python -c "print('test/cpu/torch_test.html' if '${{matrix.release}}' == 'pre' else 'cpu/torch_stable.html')" 2>&1) - # pip install --requirement requirements.txt --upgrade $flag --find-links "https://download.pytorch.org/whl/${url}" - # # adjust versions according installed Torch version - # python ./requirements/adjust-versions.py requirements/examples.txt - # pip install --requirement requirements/examples.txt --find-links https://download.pytorch.org/whl/cpu/torch_stable.html --upgrade - # pip install --requirement requirements/test.txt --upgrade - # pip list - # shell: bash - - name: Cache datasets uses: actions/cache@v4 with: @@ -133,7 +122,7 @@ jobs: # python -m pytest fts_examples/stable -v --durations=3 - name: Upload pytest results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: pytest-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}-${{ matrix.release }} path: junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}-${{ matrix.release }}.xml @@ -146,6 +135,8 @@ jobs: coverage xml - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} with: file: coverage.xml flags: cpu,pytest,python${{ matrix.python-version }} diff --git a/.github/workflows/code-checks.yml b/.github/workflows/code-checks.yml index 9bdbc3f..6f43c3c 100644 --- a/.github/workflows/code-checks.yml +++ b/.github/workflows/code-checks.yml @@ -13,8 +13,8 @@ jobs: mypy: runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: python-version: '3.12' - name: Install dependencies diff --git a/.github/workflows/release-docker.yml b/.github/workflows/release-docker.yml index 6ee14c1..2dcb242 100644 --- a/.github/workflows/release-docker.yml +++ b/.github/workflows/release-docker.yml @@ -36,7 +36,7 @@ jobs: pl_version: ["2.4"] steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Log in to Docker Hub uses: docker/login-action@v1 @@ -46,7 +46,7 @@ jobs: - name: Get release version id: get_version - run: echo "::set-output name=RELEASE_VERSION::$(echo ${GITHUB_REF##*/v})" + run: echo "::set-output name=RELEASE_VERSION::$(echo ${GITHUB_REF##*/v})" >> $GITHUB_OUTPUT - name: Publish Latest to Docker uses: docker/build-push-action@v2 diff --git a/.github/workflows/release-pypi.yml b/.github/workflows/release-pypi.yml index ef50391..2128801 100644 --- a/.github/workflows/release-pypi.yml +++ b/.github/workflows/release-pypi.yml @@ -25,8 +25,8 @@ jobs: build-package: runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: python-version: '3.12' @@ -39,7 +39,7 @@ jobs: python -m build ls -lh dist/ - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 with: name: pypi-packages-${{ github.sha }} path: dist @@ -50,7 +50,7 @@ jobs: # only upload package assets with new release if: github.event_name == 'release' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/download-artifact@v3 with: name: pypi-packages-${{ github.sha }} @@ -71,7 +71,7 @@ jobs: # only publish packages with new tags or release if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/download-artifact@v3 with: name: pypi-packages-${{ github.sha }} @@ -100,7 +100,7 @@ jobs: # only publish packages with new tags or release if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/download-artifact@v3 with: name: pypi-packages-${{ github.sha }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f57576c..3ce8c7e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -21,7 +21,7 @@ ci: repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v5.0.0 hooks: - id: end-of-file-fixer - id: trailing-whitespace @@ -39,33 +39,34 @@ repos: - id: detect-private-key - repo: https://github.com/asottile/pyupgrade - rev: v3.3.1 + rev: v3.17.0 hooks: - id: pyupgrade args: [--py37-plus] name: Upgrade code + # update rev for docformatter after 1.7.6 available, using below commit on master branch until then - repo: https://github.com/myint/docformatter - rev: v1.4 + rev: 06907d0267368b49b9180eed423fae5697c1e909 hooks: - id: docformatter args: [--in-place, --wrap-summaries=115, --wrap-descriptions=120] - repo: https://github.com/asottile/yesqa - rev: v1.4.0 + rev: v1.5.0 hooks: - id: yesqa name: Unused noqa - repo: https://github.com/asottile/blacken-docs - rev: 1.13.0 + rev: 1.19.0 hooks: - id: blacken-docs args: [--line-length=120] additional_dependencies: [black==22.12] - repo: https://github.com/executablebooks/mdformat - rev: 0.7.16 + rev: 0.7.17 hooks: - id: mdformat additional_dependencies: @@ -75,7 +76,7 @@ repos: exclude: CHANGELOG.md - repo: https://github.com/astral-sh/ruff-pre-commit - rev: 'v0.1.15' + rev: 'v0.6.9' hooks: - id: ruff # Respect `exclude` and `extend-exclude` settings.