Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MNT] Swapped tensorflow and pytorch to install only CPU version #2416

Merged
merged 5 commits into from
Dec 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/actions/cpu_all_extras/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Pip install all_extras with CPU versions
description: "For CI testing install the CPU version of dependencies with all extras if on ubuntu"

inputs:
additional_extras:
description: "Comma-separated list of additional extras to install"
required: false
default: ""

runs:
using: "composite"
steps:
- name: Install CPU TensorFlow
if: runner.os == 'Linux'
uses: nick-fields/retry@v3
with:
timeout_minutes: 30
max_attempts: 3
command: python -m pip install tensorflow-cpu

- name: Install CPU PyTorch
if: runner.os == 'Linux'
uses: nick-fields/retry@v3
with:
timeout_minutes: 30
max_attempts: 3
command: python -m pip install torch --index-url https://download.pytorch.org/whl/cpu

- name: Install dependencies
uses: nick-fields/retry@v3
with:
timeout_minutes: 30
max_attempts: 3
command: >
python -m pip install .[all_extras${{ inputs.additional_extras != '' && ',' || '' }}${{ inputs.additional_extras }}]
21 changes: 6 additions & 15 deletions .github/workflows/periodic_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,9 @@ jobs:
python_version: "3.10"
restore_cache: "false"

- name: Install dependencies
uses: nick-fields/retry@v3
- uses: ./.github/actions/cpu_all_extras
with:
timeout_minutes: 30
max_attempts: 3
command: python -m pip install .[all_extras,binder,dev]
additional_extras: "dev,binder"

- name: Run example notebooks
run: .github/utilities/run_examples.sh false
Expand Down Expand Up @@ -180,12 +177,9 @@ jobs:
python_version: ${{ matrix.python-version }}
restore_cache: "false"

- name: Install aeon and dependencies
uses: nick-fields/retry@v3
- uses: ./.github/actions/cpu_all_extras
with:
timeout_minutes: 30
max_attempts: 3
command: python -m pip install .[all_extras,dev]
additional_extras: "dev"

- name: Show dependencies
run: python -m pip list
Expand Down Expand Up @@ -215,12 +209,9 @@ jobs:
- name: Disable Numba JIT
run: echo "NUMBA_DISABLE_JIT=1" >> $GITHUB_ENV

- name: Install aeon and dependencies
uses: nick-fields/retry@v3
- uses: ./.github/actions/cpu_all_extras
with:
timeout_minutes: 30
max_attempts: 3
command: python -m pip install .[all_extras,unstable_extras,dev]
additional_extras: "unstable_extras,dev"

- name: Show dependencies
run: python -m pip list
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/pr_examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,9 @@ jobs:
runner_os: ${{ runner.os }}
python_version: "3.10"

- name: Install aeon and dependencies
uses: nick-fields/retry@v3
- uses: ./.github/actions/cpu_all_extras
with:
timeout_minutes: 30
max_attempts: 3
command: python -m pip install .[all_extras,binder,dev]
additional_extras: "dev,binder"

- name: Run example notebooks
run: .github/utilities/run_examples.sh ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'full examples run') }}
Expand Down
14 changes: 4 additions & 10 deletions .github/workflows/pr_pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,9 @@ jobs:
runner_os: ${{ runner.os }}
python_version: ${{ matrix.python-version }}

- name: Install aeon and dependencies
uses: nick-fields/retry@v3
- uses: ./.github/actions/cpu_all_extras
with:
timeout_minutes: 30
max_attempts: 3
command: python -m pip install .[all_extras,dev]
additional_extras: "dev"

- name: Show dependencies
run: python -m pip list
Expand All @@ -120,12 +117,9 @@ jobs:
- name: Disable Numba JIT
run: echo "NUMBA_DISABLE_JIT=1" >> $GITHUB_ENV

- name: Install aeon and dependencies
uses: nick-fields/retry@v3
- uses: ./.github/actions/cpu_all_extras
with:
timeout_minutes: 30
max_attempts: 3
command: python -m pip install .[all_extras,unstable_extras,dev]
additional_extras: "unstable_extras,dev"

- name: Show dependencies
run: python -m pip list
Expand Down