Skip to content

Commit

Permalink
Fix: Evaluate base classes orders.
Browse files Browse the repository at this point in the history
  • Loading branch information
Labbeti committed May 17, 2023
1 parent 08292d5 commit 2767ea3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/aac_metrics/classes/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ class AACMetric(nn.Module):
# The theorical maximal value of the main global score of the metric.
max_value: Optional[float] = None

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

# Public methods
def compute(self) -> Any:
return None
Expand Down
4 changes: 2 additions & 2 deletions src/aac_metrics/classes/evaluate.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
pylog = logging.getLogger(__name__)


class Evaluate(AACMetric, list[AACMetric]):
class Evaluate(list[AACMetric], AACMetric):
"""Evaluate candidates with multiple references with custom metrics.
For more information, see :func:`~aac_metrics.functional.evaluate.evaluate`.
Expand Down Expand Up @@ -55,8 +55,8 @@ def __init__(
verbose,
)

AACMetric.__init__(self)
list.__init__(self, metrics)
AACMetric.__init__(self)
self._preprocess = preprocess
self._cache_path = cache_path
self._java_path = java_path
Expand Down

0 comments on commit 2767ea3

Please sign in to comment.