From b1137158d9d0936aac0cbb01c3464b15ecfb5bce Mon Sep 17 00:00:00 2001 From: Travis Addair Date: Thu, 30 Mar 2023 10:16:13 -0700 Subject: [PATCH 1/4] Added tests for example notebooks --- .github/workflows/test-example-notebooks.yml | 37 ++++++++++++++++++++ docs/getting_started/installation.md | 4 +-- 2 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/test-example-notebooks.yml diff --git a/.github/workflows/test-example-notebooks.yml b/.github/workflows/test-example-notebooks.yml new file mode 100644 index 00000000..7fb8c6e7 --- /dev/null +++ b/.github/workflows/test-example-notebooks.yml @@ -0,0 +1,37 @@ +name: Test Example Notebooks + +on: + pull_request: + branches: ["master"] + +jobs: + api-docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Setup Python + uses: actions/setup-python@v1 + with: + python-version: "3.8" + + - name: Upgrade Pip + run: | + python -m pip install --upgrade pip + python -m pip install setuptools wheel + + - name: Setup Linux + run: | + sudo apt-get install -y cmake libsndfile1 + + - name: Install Ludwig + run: | + pip install ludwig[full] + + - name: Install test dependencies + run: pip install pytest nbmake + + - name: Test example notebooks + run: pytest --nbmake --nbmake-timeout=3000 docs/examples/**/*ipynb diff --git a/docs/getting_started/installation.md b/docs/getting_started/installation.md index 70809174..fcd0fafe 100644 --- a/docs/getting_started/installation.md +++ b/docs/getting_started/installation.md @@ -42,10 +42,10 @@ The requirements for additional functionality are separated out so that users ar If your machine has a GPU to accelerate the training process, make sure you install a GPU-enabled version of PyTorch before installing Ludwig: ``` sh -pip install torch -f https://download.pytorch.org/whl/cu113/torch_stable.html +pip install torch -f https://download.pytorch.org/whl/cu118/torch_stable.html ``` -The example above will install the latest version of PyTorch with CUDA 11.3. See the official [PyTorch docs](https://pytorch.org/get-started/locally/) for +The example above will install the latest version of PyTorch with CUDA 11.8. See the official [PyTorch docs](https://pytorch.org/get-started/locally/) for more details on installing the right version of PyTorch for your environment. # Docker { #with-docker } From cf8c917e49e7521bc88726daddb5452b2aae36e4 Mon Sep 17 00:00:00 2001 From: Travis Addair Date: Thu, 30 Mar 2023 10:20:29 -0700 Subject: [PATCH 2/4] Don't pre-install ludwig --- .github/workflows/test-example-notebooks.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/test-example-notebooks.yml b/.github/workflows/test-example-notebooks.yml index 7fb8c6e7..f427fce4 100644 --- a/.github/workflows/test-example-notebooks.yml +++ b/.github/workflows/test-example-notebooks.yml @@ -26,10 +26,6 @@ jobs: run: | sudo apt-get install -y cmake libsndfile1 - - name: Install Ludwig - run: | - pip install ludwig[full] - - name: Install test dependencies run: pip install pytest nbmake From 0869ae54af123a4b036ee88d6c0c2fb1c4f55c4d Mon Sep 17 00:00:00 2001 From: Travis Addair Date: Thu, 30 Mar 2023 10:57:15 -0700 Subject: [PATCH 3/4] Added collab deps --- .github/workflows/test-example-notebooks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-example-notebooks.yml b/.github/workflows/test-example-notebooks.yml index f427fce4..0c9832f8 100644 --- a/.github/workflows/test-example-notebooks.yml +++ b/.github/workflows/test-example-notebooks.yml @@ -27,7 +27,7 @@ jobs: sudo apt-get install -y cmake libsndfile1 - name: Install test dependencies - run: pip install pytest nbmake + run: pip install pytest nbmake google-colab ipywidgets - name: Test example notebooks run: pytest --nbmake --nbmake-timeout=3000 docs/examples/**/*ipynb From 399f980e5d56cadf921c9cc36cf63ae481158587 Mon Sep 17 00:00:00 2001 From: Travis Addair Date: Thu, 30 Mar 2023 11:34:03 -0700 Subject: [PATCH 4/4] Update test-example-notebooks.yml --- .github/workflows/test-example-notebooks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-example-notebooks.yml b/.github/workflows/test-example-notebooks.yml index 0c9832f8..b3c8922d 100644 --- a/.github/workflows/test-example-notebooks.yml +++ b/.github/workflows/test-example-notebooks.yml @@ -27,7 +27,7 @@ jobs: sudo apt-get install -y cmake libsndfile1 - name: Install test dependencies - run: pip install pytest nbmake google-colab ipywidgets + run: pip install pytest nbmake ipywidgets - name: Test example notebooks run: pytest --nbmake --nbmake-timeout=3000 docs/examples/**/*ipynb