Skip to content

Commit 7942ac6

Browse files
author
arnaudde
committed
Unify class references
1 parent be2dbd2 commit 7942ac6

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

dataikuapi/dss/ml.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ def get_assertions_params(self):
436436
"""
437437
Retrieves the assertions parameters for this ml task
438438
439-
:rtype: :class:`dataikuapi.dss.ml.DSSMLAssertionsParams`
439+
:rtype: :class:`DSSMLAssertionsParams`
440440
"""
441441
return DSSMLAssertionsParams(self.mltask_settings["assertionsParams"])
442442

@@ -670,10 +670,10 @@ def get_raw(self):
670670

671671
def get_assertion(self, assertion_name):
672672
"""
673-
Gets a :class:`dataikuapi.dss.ml.DSSMLAssertionParams` representing the parameters of the assertion with the
673+
Gets a :class:`DSSMLAssertionParams` representing the parameters of the assertion with the
674674
provided name (or None if no assertion has that name)
675675
:param str assertion_name: Name of the assertion
676-
:rtype: :class:`dataikuapi.dss.ml.DSSMLAssertionParams` or None if no assertion has that name
676+
:rtype: :class:`DSSMLAssertionParams` or None if no assertion has that name
677677
"""
678678
for assertion_dict in self._internal_dict["assertions"]:
679679
if assertion_dict["name"] == assertion_name:
@@ -683,7 +683,7 @@ def get_assertion(self, assertion_name):
683683
def add_assertion(self, assertion_params):
684684
"""
685685
Adds parameters of an assertion to the assertions parameters of the ml task.
686-
:param object assertion_params: A :class:`~dataikuapi.dss.utils.DSSMLAssertionParams` representing parameters of the assertion
686+
:param object assertion_params: A :class:`DSSMLAssertionParams` representing parameters of the assertion
687687
"""
688688
if not isinstance(assertion_params, DSSMLAssertionParams):
689689
raise ValueError('Wrong type for assertion parameters: {}'.format(type(assertion_params)))
@@ -723,9 +723,9 @@ def from_params(name, a_filter, condition):
723723
724724
:param str name: Name of the assertion
725725
:param object a_filter: A dict representing the filter to select assertion population
726-
:param object condition: A :class:`~dataikuapi.dss.ml.DSSMLAssertionCondition` for the assertion to be successful
726+
:param object condition: A :class:`DSSMLAssertionCondition` for the assertion to be successful
727727
728-
:rtype: :class:`dataikuapi.dss.ml.DSSMLAssertionParams`
728+
:rtype: :class:`DSSMLAssertionParams`
729729
"""
730730
assertion_params = DSSMLAssertionParams({})
731731
assertion_params.name = name
@@ -768,7 +768,7 @@ def filter(self, filter):
768768
def condition(self):
769769
"""
770770
Returns the assertion condition
771-
:rtype: :class:`dataikuapi.dss.ml.DSSMLAssertionCondition`
771+
:rtype: :class:`DSSMLAssertionCondition`
772772
"""
773773
return DSSMLAssertionCondition(self._internal_dict["assertionCondition"])
774774

@@ -802,7 +802,7 @@ def from_expected_class(expected_valid_ratio, expected_class):
802802
:param float expected_valid_ratio: Assertion passes if this ratio of rows predicted as expected_class is attained
803803
:param str expected_class: Assertion passes if the ratio of rows predicted as expected_class is attained
804804
805-
:rtype: :class:`dataikuapi.dss.ml.DSSMLAssertionCondition`
805+
:rtype: :class:`DSSMLAssertionCondition`
806806
"""
807807
assertion_condition = DSSMLAssertionCondition({})
808808
assertion_condition.expected_valid_ratio = expected_valid_ratio
@@ -820,7 +820,7 @@ def from_expected_range(expected_valid_ratio, expected_min, expected_max):
820820
:param float expected_min: Min value of the expected range
821821
:param float expected_max: Max value of the expected range
822822
823-
:rtype: :class:`dataikuapi.dss.ml.DSSMLAssertionCondition`
823+
:rtype: :class:`DSSMLAssertionCondition`
824824
"""
825825
assertion_condition = DSSMLAssertionCondition({})
826826
assertion_condition.expected_valid_ratio = expected_valid_ratio
@@ -920,7 +920,7 @@ def get_metric(self, assertion_name):
920920
:param str assertion_name: Name of the assertion
921921
922922
:returns: an object representing assertion metrics or None if no assertion with that name exists
923-
:rtype: :class:`dataikuapi.dss.ml.DSSMLAssertionMetric`
923+
:rtype: :class:`DSSMLAssertionMetric`
924924
"""
925925
for assertion_metric_dict in self._internal_dict["perAssertion"]:
926926
if assertion_name == assertion_metric_dict["name"]:
@@ -1159,7 +1159,7 @@ def get_assertions_metrics(self):
11591159
"""
11601160
Retrieves assertions metrics computed for this trained model
11611161
:returns: an object representing assertion metrics
1162-
:rtype: :class:`dataikuapi.dss.ml.DSSMLAssertionsMetrics`
1162+
:rtype: :class:`DSSMLAssertionsMetrics`
11631163
"""
11641164
return DSSMLAssertionsMetrics(self.snippet["assertionsMetrics"])
11651165

0 commit comments

Comments
 (0)