Skip to content

Commit 62a47bd

Browse files
author
arnaudde
committed
Add repr to conditon and assertionParam
1 parent 39981e9 commit 62a47bd

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

dataikuapi/dss/ml.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from ..utils import DataikuStreamedHttpUTF8CSVReader
66
import json, warnings
77
import time
8+
import pprint
89
from .metrics import ComputedMetrics
910
from .utils import DSSDatasetSelectionBuilder, DSSFilterBuilder
1011
from .future import DSSFuture
@@ -711,6 +712,10 @@ class DSSMLAssertionParams(object):
711712
def __init__(self, data):
712713
self._internal_dict = data
713714

715+
def __repr__(self):
716+
return u"DSSMLAssertionParams(\n name= '{name}',\n condition= {condition},\n filter= {filter}\n)".format(
717+
name=self.name, filter=pprint.pformat(self.filter).replace('\n', '\n '), condition=self.condition)
718+
714719
@staticmethod
715720
def from_params(name, a_filter, condition):
716721
"""
@@ -783,6 +788,12 @@ class DSSMLAssertionCondition(object):
783788
def __init__(self, data):
784789
self._internal_dict = data
785790

791+
def __repr__(self):
792+
return u"DSSMLAssertionCondition(expected_valid_ratio = {}, expected_class= {}," \
793+
u" expected_min={}, expected_max={})".format(
794+
self.expected_valid_ratio, self.expected_class, self.expected_min, self.expected_max)
795+
796+
786797
@staticmethod
787798
def from_expected_class(expected_valid_ratio, expected_class):
788799
"""

0 commit comments

Comments
 (0)