Skip to content

Commit

Permalink
Remove DeviceDtypeModuleMixin interface
Browse files Browse the repository at this point in the history
  • Loading branch information
carmocca committed Apr 24, 2023
1 parent c02173f commit 19914d2
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

from lightning.fabric.utilities import move_data_to_device
from lightning.fabric.utilities.apply_func import convert_tensors_to_scalars
from lightning.fabric.utilities.device_dtype_mixin import _DeviceDtypeModuleMixin
from lightning.fabric.utilities.imports import _TORCH_EQUAL_2_0, _TORCH_GREATER_EQUAL_2_0
from lightning.pytorch.utilities.data import extract_batch_size
from lightning.pytorch.utilities.exceptions import MisconfigurationException
Expand Down Expand Up @@ -180,7 +179,7 @@ def is_custom_reduction(self) -> bool:
return not (self.is_mean_reduction or self.is_max_reduction or self.is_min_reduction or self.is_sum_reduction)


class _ResultMetric(Metric, _DeviceDtypeModuleMixin): # type: ignore[misc] # torchmetrics methods should return Self
class _ResultMetric(Metric): # type: ignore[misc] # torchmetrics methods should return Self
"""Wraps the value provided to `:meth:`~lightning.pytorch.core.module.LightningModule.log`"""

def __init__(self, metadata: _Metadata, is_tensor: bool) -> None:
Expand Down

0 comments on commit 19914d2

Please sign in to comment.