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

fix: Fix deepcopy removing model signature wrapper #108

Merged
merged 3 commits into from
Feb 14, 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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
# Changelog
All notable changes to this project will be documented in this file.

### [2.0.2]

#### Fixed

- Fix deepcopy removing model signature wrapper from the model for classification

### [2.0.1]

#### Fixed
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "quadra"
version = "2.0.1"
version = "2.0.2"
description = "Deep Learning experiment orchestration library"
authors = [
"Federico Belotti <federico.belotti@orobix.com>",
Expand Down
2 changes: 1 addition & 1 deletion quadra/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "2.0.1"
__version__ = "2.0.2"


def get_version():
Expand Down
3 changes: 2 additions & 1 deletion quadra/tasks/classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,8 @@ def generate_report(self) -> None:
self.datamodule.setup(stage="test")

# Deepcopy to remove the inference mode from gradients causing issues when loading checkpoints
self.module.model = deepcopy(self.module.model)
# TODO: Why deepcopy of module model removes ModelSignatureWrapper?
self.module.model.instance = deepcopy(self.module.model.instance)
if "16" in self.trainer.precision:
log.warning("Gradcam is currently not supported with half precision, it will be disabled")
self.module.gradcam = False
Expand Down
Loading