Fix GumbelSoftmaxTransformation.name
; add more tests for set_transformation
#178
Workflow file for this run
This file contains 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: | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: [master] | |
jobs: | |
nbdev-sync: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.9" | |
cache: "pip" | |
cache-dependency-path: settings.ini | |
- name: Test ibrary Sync | |
shell: bash | |
run: | | |
set -ux | |
python -m pip install --upgrade pip | |
pip install -U nbdev | |
echo "Check we are starting with clean git checkout" | |
if [[ `git status --porcelain -uno` ]]; then | |
git diff | |
echo "git status is not clean" | |
false | |
fi | |
echo "Trying to strip out notebooks" | |
nbdev_clean | |
echo "Check that strip out was unnecessary" | |
git status -s # display the status to see which nbs need cleaning up | |
if [[ `git status --porcelain -uno` ]]; then | |
git status -uno | |
echo -e "!!! Detected unstripped out notebooks\n!!!Remember to run nbdev_install_hooks" | |
echo -e "This error can also happen if you are using an older version of nbdev relative to what is in CI. Please try to upgrade nbdev with the command `pip install -U nbdev`" | |
false | |
fi | |
nbdev_export | |
if [[ `git status --porcelain -uno` ]]; then | |
echo "::error::Notebooks and library are not in sync. Please run nbdev_export." | |
git status -uno | |
git diff | |
exit 1; | |
fi | |
nbdev-test: | |
needs: nbdev-sync | |
strategy: | |
fail-fast: true | |
matrix: | |
py: ['3.9', '3.10', '3.11'] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
# with: | |
# submodules: recursive | |
- name: Checkout submodules | |
run: git submodule update --init --recursive | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.py }} | |
cache: "pip" | |
cache-dependency-path: settings.ini | |
- name: Install Library | |
run: | | |
pip install --upgrade pip | |
pip install torch --index-url https://download.pytorch.org/whl/cpu | |
pip install -e .[dev] | |
# install causal graphical models | |
pip install git+https://github.com/BirkhoffG/causalgraphicalmodels.git --upgrade | |
# copy the relax-assets to nbs to save downloading time | |
cp -r assets nbs/relax-assets | |
- name: Run Tests | |
run: nbdev_test | |
- name: test docs build | |
if: ${{ (github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch') && matrix.os == 'ubuntu' }} | |
run: | | |
set -ux | |
wget -q $(curl https://latest.fast.ai/pre/quarto-dev/quarto-cli/linux-amd64.deb) | |
sudo dpkg -i quarto*.deb | |
nbdev_docs | |
if [ -f "_docs/index.html" ]; then | |
echo "docs built successfully." | |
else | |
echo "index page not found in rendered docs." | |
ls -la | |
ls -la _docs | |
exit 1 | |
fi |