Skip to content
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
23 changes: 6 additions & 17 deletions .github/workflows/test-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,21 @@ name: Test installation
on:
pull_request:
branches:
- master
- master
workflow_dispatch:

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

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion batchflow/models/torch/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion batchflow/plotter/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []


Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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"}
Expand Down