From 756f41a0de84cd8d9a1c097cc1f62f4345e4f742 Mon Sep 17 00:00:00 2001 From: Pavel <60391448+pdumin@users.noreply.github.com> Date: Mon, 15 Jul 2024 03:31:52 +0400 Subject: [PATCH 1/3] [fix] Use torch.inference_mode inplace of torch.no_grad (#3188) --- examples/pytorch_track.py | 7 +++---- examples/pytorch_track_images.py | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/examples/pytorch_track.py b/examples/pytorch_track.py index 7464295c8..3927356cb 100644 --- a/examples/pytorch_track.py +++ b/examples/pytorch_track.py @@ -12,8 +12,8 @@ # Initialize a new Run aim_run = Run() -# Device configuration -device = torch.device('cpu') +# moving model to gpu if available +device = torch.device('cuda:0' if torch.cuda.is_available() else 'cpu') # Hyper parameters num_epochs = 5 @@ -118,8 +118,7 @@ def forward(self, x): # Test the model -model.eval() -with torch.no_grad(): +with torch.inference_mode(): correct = 0 total = 0 for images, labels in test_loader: diff --git a/examples/pytorch_track_images.py b/examples/pytorch_track_images.py index 1c216c9ef..adb693a2f 100644 --- a/examples/pytorch_track_images.py +++ b/examples/pytorch_track_images.py @@ -13,8 +13,8 @@ # Initialize a new Run aim_run = Run() -# Device configuration -device = torch.device('cpu') +# moving model to gpu if available +device = torch.device('cuda:0' if torch.cuda.is_available() else 'cpu') # Hyper parameters num_epochs = 5 @@ -122,8 +122,7 @@ def forward(self, x): # Test the model -model.eval() -with torch.no_grad(): +with torch.inference_mode(): correct = 0 total = 0 for images, labels in tqdm(test_loader, total=len(test_loader)): From 3b0813009938eed37cfd0d6b6c46b62112e8e294 Mon Sep 17 00:00:00 2001 From: mihran113 Date: Mon, 15 Jul 2024 17:22:37 +0400 Subject: [PATCH 2/3] Bump up Aim to v3.23.0 --- CHANGELOG.md | 2 +- aim/VERSION | 2 +- aim/cli/init/commands.py | 2 +- aim/web/ui/package.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e583cc52..a6a636115 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## Unreleased +## 3.23.0 Jul 15, 2024 ### Enhancements: - Relax `numpy` version upper bound to include `numpy<3` (judahrand) diff --git a/aim/VERSION b/aim/VERSION index a7e7070f8..ee893b7e0 100644 --- a/aim/VERSION +++ b/aim/VERSION @@ -1 +1 @@ -3.22.0 +3.23.0 diff --git a/aim/cli/init/commands.py b/aim/cli/init/commands.py index fc48930a7..1ef6fc354 100644 --- a/aim/cli/init/commands.py +++ b/aim/cli/init/commands.py @@ -24,7 +24,7 @@ def init(repo, yes, skip_if_exists): elif yes: re_init = True elif skip_if_exists: - click.echo('Repo exists at {}. Skipped initialization.'.format(repo.root_path)) + click.echo('Repo exists at {}. Skipped initialization.'.format(repo_path)) return else: re_init = click.confirm( diff --git a/aim/web/ui/package.json b/aim/web/ui/package.json index 57771b3be..cf12abb0c 100644 --- a/aim/web/ui/package.json +++ b/aim/web/ui/package.json @@ -1,6 +1,6 @@ { "name": "ui_v2", - "version": "3.22.0", + "version": "3.23.0", "private": true, "dependencies": { "@aksel/structjs": "^1.0.0", From 204d4fe38e4d345ed1bf580ca3ad67be3545b33c Mon Sep 17 00:00:00 2001 From: mihran113 Date: Tue, 16 Jul 2024 14:26:57 +0400 Subject: [PATCH 3/3] [fix] Resolve issues with style checks for nightly releases (#3190) --- .github/workflows/nightly-release.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/nightly-release.yml b/.github/workflows/nightly-release.yml index e155c7255..47b7b2eb1 100644 --- a/.github/workflows/nightly-release.yml +++ b/.github/workflows/nightly-release.yml @@ -51,7 +51,9 @@ jobs: - name: code style checks run: | - flake8 aim + set -e + ruff check . + ruff format . --check - name: unit-tests run: |