Skip to content
Merged
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
5 changes: 1 addition & 4 deletions batchflow/models/torch/base_mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@
import torch

from ...decorators import deprecated

from ...utils_import import try_import
plot = try_import(module='...plotter', package=__name__, attribute='plot',
help='Try `pip install batchflow[image]`!')
from ... import plot
Copy link

Copilot AI Jul 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change from conditional import to direct import removes the graceful fallback behavior. If the plot module is not available, this will now raise an ImportError instead of providing a helpful error message about installing 'batchflow[image]'. Consider whether this breaking change is intentional.

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But plot from batchflow is already lazy import


# Also imports `tensorboard`, if necessary

Expand Down