Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke-Chesley authored Feb 11, 2024
2 parents 40a1151 + 2b0a679 commit ac2fe54
Show file tree
Hide file tree
Showing 6 changed files with 108 additions and 112 deletions.
42 changes: 15 additions & 27 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,16 @@ on:
branches: [master]

jobs:
build:
pytest:
name: Run pytest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macOS-latest] # add windows-2019 when poetry allows installation with `-f` flag
python-version: ["3.8", "3.9", "3.10"]

defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v2

Expand All @@ -30,26 +33,18 @@ jobs:
run: |
brew install libomp # https://github.com/pytorch/pytorch/issues/20030
- name: Setup macOS
if: runner.os == 'windows'
run: |
brew install libomp # https://github.com/pytorch/pytorch/issues/20030
- name: Get full Python version
id: full-python-version
shell: bash
run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")

- name: Install poetry
shell: bash
run: |
curl -sSL https://install.python-poetry.org | python3 -
- name: Set poetry path variable
run: echo "/Users/runner/.local/bin" >> $GITHUB_PATH

- name: Configure poetry
shell: bash
run: poetry config virtualenvs.in-project true

- name: Set up cache
Expand All @@ -61,27 +56,22 @@ jobs:

- name: Ensure cache is healthy
if: steps.cache.outputs.cache-hit == 'true'
shell: bash
run: poetry run pip --version >/dev/null 2>&1 || rm -rf .venv

- name: Upgrade pip
shell: bash
run: poetry run python -m pip install pip -U

- name: Install dependencies
shell: bash
run: poetry install -E "github-actions graph mqf2"

# - name: Install pytorch geometric dependencies
# shell: bash
# run: poetry run pip install pyg_lib torch-scatter torch-sparse torch-cluster torch-spline-conv torch-geometric -f https://data.pyg.org/whl/torch-2.0.0+cpu.html

- name: Run pytest
shell: bash
run: poetry run pytest tests

- name: Statistics
if: success()
run: |
pip install coverage
coverage report
Expand All @@ -99,9 +89,11 @@ jobs:
fail_ci_if_error: false

docs:
name: Test docs build
name: Docs build
runs-on: ubuntu-latest

defaults:
run:
shell: bash
steps:
- name: Check out Git repository
uses: actions/checkout@v2
Expand All @@ -116,26 +108,22 @@ jobs:
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('docs/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
restore-keys: ${{ runner.os }}-pip-

- name: Install dependencies
run: |
sudo apt-get update && sudo apt-get install -y pandoc
python -m pip install --upgrade pip
sudo apt-get update --fix-missing
sudo apt-get install -y pandoc
pip install -r docs/requirements.txt
shell: bash
- name: Build sphinx documentation
run: |
cd docs
make clean
make html --debug --jobs 2 SPHINXOPTS="-W"
working-directory: docs/
run: make html --debug --jobs 2 SPHINXOPTS="-W"

- name: Upload built docs
uses: actions/upload-artifact@v2
with:
name: docs-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}
path: docs/build/html/
# Use always() to always run this step to publish test results when there are test failures
if: success()
#if: success()
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[conda-url]: https://anaconda.org/conda-forge/pytorch-forecasting
[build-image]: https://github.com/jdb78/pytorch-forecasting/actions/workflows/test.yml/badge.svg?branch=master
[build-url]: https://github.com/jdb78/pytorch-forecasting/actions/workflows/test.yml?query=branch%3Amaster
[linter-image]: https://github.com/jdb78/pytorch-forecasting/actions/workflows/code_quality.yml/badge.svg?branch=master
[linter-image]: https://github.com/jdb78/pytorch-forecasting/actions/workflows/lint.yml/badge.svg?event=push
[linter-url]: https://github.com/jdb78/pytorch-forecasting/actions/workflows/code_quality.yml?query=branch%3Amaster
[docs-image]: https://readthedocs.org/projects/pytorch-forecasting/badge/?version=latest
[docs-url]: https://pytorch-forecasting.readthedocs.io
Expand Down
20 changes: 10 additions & 10 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
sphinx>3.2
sphinx >3.2
nbsphinx
pandoc
docutils
pydata-sphinx-theme
lightning>=2.0.0
lightning >=2.0.0
cloudpickle
torch>=2.0,!=2.0.1
optuna>=3.1.0
torch >=2.0,!=2.0.1
optuna >=3.1.0
scipy
pandas>=1.3
scikit-learn>1.2
pandas >=1.3
scikit-learn >1.2
matplotlib
statsmodels
ipython
nbconvert>=6.3.0
recommonmark>=0.7.1
pytorch-optimizer>=2.5.1
fastapi>0.80
nbconvert >=6.3.0
recommonmark >=0.7.1
pytorch-optimizer >=2.5.1
fastapi >0.80
2 changes: 1 addition & 1 deletion docs/source/tutorials/stallion.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -978,7 +978,7 @@
" dropout=0.1, # between 0.1 and 0.3 are good values\n",
" hidden_continuous_size=8, # set to <= hidden_size\n",
" loss=QuantileLoss(),\n",
" optimizer=\"Ranger\"\n",
" optimizer=\"Ranger\",\n",
" # reduce learning rate if no improvement in validation loss after x epochs\n",
" # reduce_on_plateau_patience=1000,\n",
")\n",
Expand Down
Loading

0 comments on commit ac2fe54

Please sign in to comment.