Skip to content

Commit 17c74b5

Browse files
committed
utils: move get_raw() method into DSSInternalDict
1 parent 999bebf commit 17c74b5

File tree

2 files changed

+8
-30
lines changed

2 files changed

+8
-30
lines changed

dataikuapi/dss/ml.py

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -777,12 +777,6 @@ def __init__(self, feature_name, computed_as_type, data, prediction_type):
777777
elif computed_as_type == "NUMERIC":
778778
self.definition = DSSSubpopulationNumericModalityDefinition(feature_name, data)
779779

780-
def get_raw(self):
781-
"""
782-
Gets the raw dictionary of the subpopulation analysis modality
783-
"""
784-
return self._internal_dict
785-
786780
def get_definition(self):
787781
"""
788782
Gets the definition of the subpopulation analysis modality
@@ -950,12 +944,6 @@ def get_modality_data(self, definition=None):
950944
return m
951945
raise ValueError("Modality not found: %s" % definition)
952946

953-
def get_raw(self):
954-
"""
955-
Gets the raw dictionary of the subpopulation analysis
956-
"""
957-
return self._internal_dict
958-
959947

960948
class DSSSubpopulationAnalyses(DSSInternalDict):
961949
"""
@@ -971,12 +959,6 @@ def __init__(self, data, prediction_type):
971959
for analysis in data.get("subpopulationAnalyses", []):
972960
self.analyses.append(DSSSubpopulationAnalysis(analysis, prediction_type))
973961

974-
def get_raw(self):
975-
"""
976-
Gets the raw dictionary of subpopulation analyses
977-
"""
978-
return self._internal_dict
979-
980962
def get_global(self):
981963
"""
982964
Retrieves information and performance on the full dataset used to compute the subpopulation analyses
@@ -1019,12 +1001,6 @@ def get_computation_params(self):
10191001
"onSample": self.get("onSample")
10201002
}
10211003

1022-
def get_raw(self):
1023-
"""
1024-
Gets the raw dictionary of the partial dependence
1025-
"""
1026-
return self._internal_dict
1027-
10281004

10291005
class DSSPartialDependencies(DSSInternalDict):
10301006
"""
@@ -1039,12 +1015,6 @@ def __init__(self, data):
10391015
for pd in data.get("partialDependencies", []):
10401016
self.partial_dependencies.append(DSSPartialDependence(pd))
10411017

1042-
def get_raw(self):
1043-
"""
1044-
Gets the raw dictionary of partial dependencies
1045-
"""
1046-
return self._internal_dict
1047-
10481018
def list_features(self):
10491019
"""
10501020
Lists all features on which partial dependencies have been computed

dataikuapi/utils.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,5 +109,13 @@ def __init__(self, orig_dict=None):
109109
def get(self, name, default=None):
110110
return self._internal_dict.get(name, default=default)
111111

112+
def get_raw(self):
113+
"""
114+
Gets the raw dictionary of the actual data
115+
116+
:rtype: dict
117+
"""
118+
return self._internal_dict
119+
112120
def __repr__(self):
113121
return self.__class__.__name__ + "(" + self._internal_dict.__repr__() + ")"

0 commit comments

Comments
 (0)