Skip to content

Commit

Permalink
fixed indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
rabah-khalek committed Aug 13, 2024
1 parent 6dd32a1 commit f8b216c
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions giskard_vision/core/detectors/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,20 @@ class ScanResult:
relative_delta: float
issue_group: Optional[IssueGroup] = None

def get_meta_required(self, include_slice_size=True) -> dict:
deviation = f"{self.relative_delta * 100:+.2f}% than global"

def get_meta_required(self, include_slice_size=True) -> dict:
deviation = f"{self.relative_delta * 100:+.2f}% than global"
meta_info = {
"metric": self.metric_name,
"metric_value": self.metric_value,
"metric_reference_value": self.metric_reference_value,
"deviation": deviation,
}

meta_info = {
"metric": self.metric_name,
"metric_value": self.metric_value,
"metric_reference_value": self.metric_reference_value,
"deviation": deviation,
}
if include_slice_size:
meta_info["slice_size"] = self.slice_size

if include_slice_size:
meta_info["slice_size"] = self.slice_size

return meta_info
return meta_info


class DetectorVisionBase(DetectorSpecsBase):
Expand Down

0 comments on commit f8b216c

Please sign in to comment.