Skip to content

Support PyTorch 2.3 #2150

Support PyTorch 2.3

Support PyTorch 2.3 #2150

Workflow file for this run

name: CI
on:
workflow_dispatch: #allows repo admins to trigger this workflow from the Actions tab
pull_request:
push:
branches:
- master
paths-ignore:
- '.github/**'
- '!.github/workflows/main.yml'
- 'docs/**'
- '*.md'
- '.git*'
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
test-nbdev-sync:
runs-on: ubuntu-latest
steps:
- uses: fastai/workflows/nbdev-ci@master
with:
skip_test: true
test-notebooks:
needs: test-nbdev-sync
runs-on: ubuntu-latest
env:
download: "true"
caching: "true"
strategy:
matrix:
py: ["3.8", "3.9", "3.10"]
nb_dec : ['[0-2]','[3-5]','[6-9]']
nb_unit: ['[0-2]','[3-5]','[6-9]']
steps:
- name: checkout contents of PR
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.py }}
cache: "pip"
cache-dependency-path: settings.ini
- name: Install libraries
run: |
pip install git+https://github.com/fastai/fastcore.git@master
pip install git+https://github.com/fastai/nbdev.git@master
pip install -Uq fastprogress
pip install -Uqe .[dev] --extra-index-url https://download.pytorch.org/whl/cpu
- name: check for cache hit
uses: actions/cache@v3
if: env.caching == 'true'
id: cache
with:
path: ~/.fastai/data
key: 'fastai-test-data-v3'
- name: download data
if: env.download == 'true' && steps.cache.outputs.cache-hit != 'true'
run: |
wget https://raw.githubusercontent.com/fastai/docker-containers/master/fastai/tmp_scripts/download_testdata.py
ipython download_testdata.py
mkdir -p $HOME/.fastai/data
find $HOME/.fastai/archive/ -name "*.tgz" -exec tar -xzvf {} -C $HOME/.fastai/data \;
- name: Test notebooks batch ${{matrix.nb_dec}}${{matrix.nb_unit}}
run: nbdev_test --flags '' --n_workers 3 --pause 1.0 --file_re "${{matrix.nb_dec}}${{matrix.nb_unit}}.*"