Skip to content

Commit cc2b382

Browse files
author
arnaudde
committed
Add blank lines before :rtype when no other keyword
1 parent a04634f commit cc2b382

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

dataikuapi/dss/ml.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -628,20 +628,23 @@ def get_raw(self):
628628
def get_type(self):
629629
"""
630630
Returns the base Diagnostic type
631+
631632
:rtype: str
632633
"""
633634
return self._internal_dict["type"]
634635

635636
def get_type_pretty(self):
636637
"""
637638
Returns the Diagnostic type as displayed in the UI
639+
638640
:rtype: str
639641
"""
640642
return self._internal_dict["displayableType"]
641643

642644
def get_message(self):
643645
"""
644646
Returns the message as displayed in the UI
647+
645648
:rtype: str
646649
"""
647650
return self._internal_dict["message"]
@@ -664,6 +667,7 @@ def __init__(self, data):
664667
def get_raw(self):
665668
"""
666669
Gets the raw dictionary of the assertions parameters
670+
667671
:rtype: dict
668672
"""
669673
return self._internal_dict
@@ -739,6 +743,7 @@ def from_params(name, a_filter, condition):
739743
def get_raw(self):
740744
"""
741745
Gets the raw dictionary of the assertion parameters
746+
742747
:rtype: dict
743748
"""
744749
return self._internal_dict
@@ -747,6 +752,7 @@ def get_raw(self):
747752
def name(self):
748753
"""
749754
Returns the assertion name
755+
750756
:rtype: str
751757
"""
752758
return self._internal_dict["name"]
@@ -759,6 +765,7 @@ def name(self, name):
759765
def filter(self):
760766
"""
761767
Returns the assertion filter
768+
762769
:rtype: dict
763770
"""
764771
return self._internal_dict["filter"]
@@ -771,6 +778,7 @@ def filter(self, filter):
771778
def condition(self):
772779
"""
773780
Returns the assertion condition
781+
774782
:rtype: :class:`DSSMLAssertionCondition`
775783
"""
776784
return DSSMLAssertionCondition(self._internal_dict["assertionCondition"])
@@ -834,6 +842,7 @@ def from_expected_range(expected_valid_ratio, expected_min, expected_max):
834842
def get_raw(self):
835843
"""
836844
Gets the raw dictionary of the condition
845+
837846
:rtype: dict
838847
"""
839848
return self._internal_dict
@@ -843,6 +852,7 @@ def expected_class(self):
843852
"""
844853
Returns the expected class or None if it is not defined. Assertion passes if the expected_valid_ratio
845854
of rows predicted as expected_class is attained.
855+
846856
:rtype: str
847857
"""
848858
if "expectedClass" in self._internal_dict:
@@ -859,6 +869,7 @@ def expected_valid_ratio(self):
859869
"""
860870
Returns the ratio of valid rows to exceed for the assertion to pass. A row is considered valid if the prediction
861871
is equal to the expected class for classification or in the expected range for regression.
872+
862873
:rtype: str
863874
"""
864875
return self._internal_dict["expectedValidRatio"]
@@ -872,6 +883,7 @@ def expected_min(self):
872883
"""
873884
Returns the min (included) of the expected range or None if it is not defined.
874885
Assertion passes if the expected_valid_ratio of rows predicted between expected_min and expected_max (included) is attained.
886+
875887
:rtype: float
876888
"""
877889
if "expectedMinValue" in self._internal_dict:
@@ -888,6 +900,7 @@ def expected_max(self):
888900
"""
889901
Returns the max (included) of the expected range or None if it is not defined.
890902
Assertion passes if the ratio of rows predicted between expected_min and expected_max (included) is attained.
903+
891904
:rtype: float
892905
"""
893906
if "expectedMaxValue" in self._internal_dict:
@@ -911,6 +924,7 @@ def __init__(self, data):
911924
def get_raw(self):
912925
"""
913926
Gets the raw dictionary of the assertions metrics
927+
914928
:rtype: dict
915929
"""
916930
return self._internal_dict
@@ -934,6 +948,7 @@ def get_metric(self, assertion_name):
934948
def passing_assertions_ratio(self):
935949
"""
936950
Returns the ratio of passing assertions
951+
937952
:rtype: float
938953
"""
939954
return self._internal_dict['passingAssertionsRatio']
@@ -954,6 +969,7 @@ def __repr__(self):
954969
def get_raw(self):
955970
"""
956971
Gets the raw dictionary of metrics of one assertion
972+
957973
:rtype: dict
958974
"""
959975
return self._internal_dict
@@ -962,6 +978,7 @@ def get_raw(self):
962978
def name(self):
963979
"""
964980
Returns the assertion name
981+
965982
:rtype: str
966983
"""
967984
return self._internal_dict["name"]
@@ -970,6 +987,7 @@ def name(self):
970987
def result(self):
971988
"""
972989
Returns whether the assertion passes
990+
973991
:rtype: bool
974992
"""
975993
return self._internal_dict["result"]
@@ -979,6 +997,7 @@ def valid_ratio(self):
979997
"""
980998
Returns the ratio of rows in the assertion population with prediction equals to the expected class
981999
for classification or in the expected range for regression
1000+
9821001
:rtype: float
9831002
"""
9841003
return self._internal_dict["validRatio"]
@@ -987,6 +1006,7 @@ def valid_ratio(self):
9871006
def nb_matching_rows(self):
9881007
"""
9891008
Returns the number of rows matching filter
1009+
9901010
:rtype: int
9911011
"""
9921012
return self._internal_dict["nbMatchingRows"]
@@ -995,6 +1015,7 @@ def nb_matching_rows(self):
9951015
def nb_dropped_rows(self):
9961016
"""
9971017
Returns the number of rows dropped by the model's preprocessing
1018+
9981019
:rtype: int
9991020
"""
10001021
return self._internal_dict["nbDroppedRows"]
@@ -1161,6 +1182,7 @@ def get_performance_metrics(self):
11611182
def get_assertions_metrics(self):
11621183
"""
11631184
Retrieves assertions metrics computed for this trained model
1185+
11641186
:returns: an object representing assertion metrics
11651187
:rtype: :class:`DSSMLAssertionsMetrics`
11661188
"""
@@ -1858,6 +1880,7 @@ def get_facts(self):
18581880
def get_performance_metrics(self):
18591881
"""
18601882
Returns all performance metrics for this clustering model.
1883+
18611884
:returns: a dict of performance metrics values
18621885
:rtype: dict
18631886
"""
@@ -1890,6 +1913,7 @@ def get_modeling_settings(self):
18901913
def get_actual_modeling_params(self):
18911914
"""
18921915
Gets the actual / resolved parameters that were used to train this model.
1916+
18931917
:return: A dictionary, which contains at least a "resolved" key
18941918
:rtype: dict
18951919
"""

0 commit comments

Comments
 (0)