Skip to content

Commit

Permalink
Mod: Update min and max value typing in AACMetric base class.
Browse files Browse the repository at this point in the history
  • Loading branch information
Labbeti committed Jan 2, 2024
1 parent 5821a71 commit 6fcff0d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/aac_metrics/classes/base.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import math

from typing import Any, ClassVar, Generic, Optional, TypeVar, Union

from torch import nn, Tensor
Expand All @@ -19,9 +21,9 @@ class AACMetric(nn.Module, Generic[OutType]):
is_differentiable: ClassVar[Optional[bool]] = False

# The theorical minimal value of the main global score of the metric.
min_value: ClassVar[Optional[float]] = None
min_value: ClassVar[float] = -math.inf
# The theorical maximal value of the main global score of the metric.
max_value: ClassVar[Optional[float]] = None
max_value: ClassVar[float] = math.inf

def __init__(self, **kwargs: Any) -> None:
super().__init__(**kwargs)
Expand Down

0 comments on commit 6fcff0d

Please sign in to comment.