From 29ca41f32497a0912765a389e3e02646821438f5 Mon Sep 17 00:00:00 2001 From: Roman Kh Date: Tue, 10 Jun 2025 12:31:14 +0400 Subject: [PATCH 1/6] Fix status badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 0c483e7100ad1662afc407bbd4e240097233a1ce Mon Sep 17 00:00:00 2001 From: Roman Kh Date: Tue, 10 Jun 2025 12:22:47 +0400 Subject: [PATCH 2/6] Update status badge --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 3483da2a1..8a4d12dbe 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,11 @@ [![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) +<<<<<<< HEAD [![Status](https://github.com/analysiscenter/batchflow/actions/workflows/status.yml/badge.svg?branch=master)](https://github.com/analysiscenter/batchflow/actions?query=workflow%3Astatus) +======= +[![Status](https://github.com/analysiscenter/batchflow/workflows/status.yml/badge.svg?branch=master)](https://github.com/analysiscenter/batchflow/actions?query=workflow%3Astatus) +>>>>>>> e81a745f (Update status badge) # BatchFlow From 1f5dc8a4bac23e3de8a78ab9e3fbbc87909253e7 Mon Sep 17 00:00:00 2001 From: Alexey Kozhevin Date: Fri, 9 May 2025 10:00:24 +0400 Subject: [PATCH 3/6] Fix plot (#782) * Fix plot * Updates for torch.GradScaler --- README.md | 4 ---- batchflow/models/torch/base.py | 2 +- batchflow/plotter/plot.py | 2 +- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 8a4d12dbe..3483da2a1 100644 --- a/README.md +++ b/README.md @@ -3,11 +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) -<<<<<<< HEAD [![Status](https://github.com/analysiscenter/batchflow/actions/workflows/status.yml/badge.svg?branch=master)](https://github.com/analysiscenter/batchflow/actions?query=workflow%3Astatus) -======= -[![Status](https://github.com/analysiscenter/batchflow/workflows/status.yml/badge.svg?branch=master)](https://github.com/analysiscenter/batchflow/actions?query=workflow%3Astatus) ->>>>>>> e81a745f (Update status badge) # 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 = [] From 028d3833aa6ccdf776c88bba9e780b54134ed119 Mon Sep 17 00:00:00 2001 From: Roman Kh Date: Wed, 11 Jun 2025 06:55:54 +0000 Subject: [PATCH 4/6] Run test_install only for linux by default --- .github/workflows/test-install.yml | 31 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/.github/workflows/test-install.yml b/.github/workflows/test-install.yml index b14bd73ed..69732a4b7 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 @@ -209,3 +198,11 @@ jobs: run: | cd tests uv run python -m pytest --disable-pytest-warnings -v dataset_test.py filesindex_test.py datasetindex_test.py + - name: Run basic tests + run: | + cd tests + uv run python -m pytest --disable-pytest-warnings -v dataset_test.py filesindex_test.py datasetindex_test.py + - name: Run basic tests + run: | + cd tests + uv run python -m pytest --disable-pytest-warnings -v dataset_test.py filesindex_test.py datasetindex_test.py From 3556a207c3d833742b92baabf093bf187f9e9884 Mon Sep 17 00:00:00 2001 From: Roman Kh Date: Wed, 11 Jun 2025 08:12:04 +0000 Subject: [PATCH 5/6] Fix copilot's duplicating code --- .github/workflows/test-install.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/test-install.yml b/.github/workflows/test-install.yml index 69732a4b7..a26ac2d45 100644 --- a/.github/workflows/test-install.yml +++ b/.github/workflows/test-install.yml @@ -198,11 +198,3 @@ jobs: run: | cd tests uv run python -m pytest --disable-pytest-warnings -v dataset_test.py filesindex_test.py datasetindex_test.py - - name: Run basic tests - run: | - cd tests - uv run python -m pytest --disable-pytest-warnings -v dataset_test.py filesindex_test.py datasetindex_test.py - - name: Run basic tests - run: | - cd tests - uv run python -m pytest --disable-pytest-warnings -v dataset_test.py filesindex_test.py datasetindex_test.py From d96b1244788420340081ad2063ecbf6bf444c312 Mon Sep 17 00:00:00 2001 From: Alexey Kozhevin Date: Wed, 11 Jun 2025 13:09:46 +0400 Subject: [PATCH 6/6] Change version in pyproject --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"}