diff --git a/.github/workflows/test-install.yml b/.github/workflows/test-install.yml index b14bd73ed..a26ac2d45 100644 --- a/.github/workflows/test-install.yml +++ b/.github/workflows/test-install.yml @@ -3,7 +3,8 @@ name: Test installation on: pull_request: branches: - - master + - master + workflow_dispatch: jobs: @@ -11,15 +12,12 @@ jobs: # Use a module from local source # ----------------------------------------- use_as_local_module: - strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + os: ${{ github.event_name == 'workflow_dispatch' && fromJson('["ubuntu-latest","macos-latest","windows-latest"]') || fromJson('["ubuntu-latest"]') }} python-version: [3.9, '3.10', 3.11, 3.12, 3.13] - runs-on: ${{ matrix.os }} - steps: - uses: actions/checkout@v4 @@ -47,15 +45,12 @@ jobs: # Install with pip # ----------------------------------------- install_with_pip: - strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + os: ${{ github.event_name == 'workflow_dispatch' && fromJson('["ubuntu-latest","macos-latest","windows-latest"]') || fromJson('["ubuntu-latest"]') }} python-version: [3.9, '3.10', 3.11, 3.12, 3.13] - runs-on: ${{ matrix.os }} - steps: - name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }} uses: actions/setup-python@v4 @@ -82,15 +77,12 @@ jobs: # Install with poetry # ----------------------------------------- install_with_poetry: - strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + os: ${{ github.event_name == 'workflow_dispatch' && fromJson('["ubuntu-latest","macos-latest","windows-latest"]') || fromJson('["ubuntu-latest"]') }} python-version: [3.9, '3.10', 3.11, 3.12, 3.13] - runs-on: ${{ matrix.os }} - steps: - name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }} uses: actions/setup-python@v4 @@ -146,15 +138,12 @@ jobs: # Install with uv # ----------------------------------------- install_with_uv: - strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + os: ${{ github.event_name == 'workflow_dispatch' && fromJson('["ubuntu-latest","macos-latest","windows-latest"]') || fromJson('["ubuntu-latest"]') }} python-version: [3.9, '3.10', 3.11, 3.12, 3.13] - runs-on: ${{ matrix.os }} - steps: - name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }} uses: actions/setup-python@v4 diff --git a/README.md b/README.md index a74f2417d..3483da2a1 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![PyTorch](https://img.shields.io/badge/PyTorch-2.0-orange.svg)](https://pytorch.org) [![codecov](https://codecov.io/gh/analysiscenter/batchflow/branch/master/graph/badge.svg)](https://codecov.io/gh/analysiscenter/batchflow) [![PyPI](https://badge.fury.io/py/batchflow.svg)](https://badge.fury.io/py/batchflow) -[![Status](https://github.com/analysiscenter/batchflow/workflows/status/badge.svg)](https://github.com/analysiscenter/batchflow/actions?query=workflow%3Astatus) +[![Status](https://github.com/analysiscenter/batchflow/actions/workflows/status.yml/badge.svg?branch=master)](https://github.com/analysiscenter/batchflow/actions?query=workflow%3Astatus) # BatchFlow diff --git a/batchflow/models/torch/base.py b/batchflow/models/torch/base.py index e0d1f47e3..2334fd927 100755 --- a/batchflow/models/torch/base.py +++ b/batchflow/models/torch/base.py @@ -683,7 +683,7 @@ def make_infrastructure(self): self.make_loss() self.make_optimizer() self.make_decay() - self.scaler = torch.cuda.amp.GradScaler() + self.scaler = torch.GradScaler("cuda") self.setup_gradient_clipping() self.setup_weights_averaging() diff --git a/batchflow/plotter/plot.py b/batchflow/plotter/plot.py index 653196104..d05d3fb3d 100644 --- a/batchflow/plotter/plot.py +++ b/batchflow/plotter/plot.py @@ -855,10 +855,10 @@ def clear(self): self.annotations = {} - self.ax.clear() for layer in self.layers: for obj in layer.objects: obj.remove() + self.ax.clear() self.layers = [] diff --git a/pyproject.toml b/pyproject.toml index 4b5acc7cc..6bd6d1cf6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "batchflow" -version = "0.8.11" +version = "0.8.12" description = "ML pipelines, model configuration and batch management" authors = [{ name = "Roman Kh", email = "rhudor@gmail.com" }] license = {text = "Apache License 2.0"}