From b96c716c9b93c44b73a8209fc82e88baa499fe7c Mon Sep 17 00:00:00 2001 From: "sweep-ai[bot]" <128439645+sweep-ai[bot]@users.noreply.github.com> Date: Thu, 17 Aug 2023 02:24:02 +0000 Subject: [PATCH 1/2] Added BaseMetric class with abstract calculate method and validate_datasets method --- sdgx/metrics/base.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/sdgx/metrics/base.py b/sdgx/metrics/base.py index 0ecf5c15..39267413 100644 --- a/sdgx/metrics/base.py +++ b/sdgx/metrics/base.py @@ -1,2 +1,13 @@ -class base_metric: - pass +from abc import ABC, abstractmethod + +class BaseMetric(ABC): + def __init__(self, real_data, synthetic_data): + self.real_data = real_data + self.synthetic_data = synthetic_data + + @abstractmethod + def calculate(self): + pass + + def validate_datasets(self): + pass From e9c8b8ef5adedc2eca075a43d110c48fce705c9c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 17 Aug 2023 02:25:09 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- sdgx/metrics/base.py | 1 + 1 file changed, 1 insertion(+) diff --git a/sdgx/metrics/base.py b/sdgx/metrics/base.py index 39267413..97efb02c 100644 --- a/sdgx/metrics/base.py +++ b/sdgx/metrics/base.py @@ -1,5 +1,6 @@ from abc import ABC, abstractmethod + class BaseMetric(ABC): def __init__(self, real_data, synthetic_data): self.real_data = real_data