Skip to content

Commit 4679262

Browse files
authored
Fix docstring and return types. (Azure#30096)
1 parent c1f0cec commit 4679262

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/training_settings.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,23 @@ def __init__(
4747
"""TrainingSettings class for Azure Machine Learning.
4848
4949
:param enable_onnx_compatible_models: If set to True, the model will be trained to be compatible with ONNX
50+
:type enable_onnx_compatible_models: typing.Optional[bool]
5051
:param enable_dnn_training: If set to True,the model will use DNN training
52+
:type enable_dnn_training: typing.Optional[bool]
5153
:param enable_model_explainability: If set to True, the model will be trained to be explainable
54+
:type enable_model_explainability: typing.Optional[bool]
5255
:param enable_stack_ensemble: If set to True, a final ensemble model will be created using a stack of models
56+
:type enable_stack_ensemble: typing.Optional[bool]
5357
:param enable_vote_ensemble: If set to True, a final ensemble model will be created using a voting ensemble
58+
:type enable_vote_ensemble: typing.Optional[bool]
5459
:param stack_ensemble_settings: Settings for stack ensemble
60+
:type stack_ensemble_settings: typing.Optional[azure.ai.ml.automl.StackEnsembleSettings]
5561
:param ensemble_model_download_timeout: Timeout for downloading ensemble models
62+
:type ensemble_model_download_timeout: typing.Optional[typing.List[int]]
5663
:param allowed_training_algorithms: Models to train
64+
:type allowed_training_algorithms: typing.Optional[typing.List[str]]
5765
:param blocked_training_algorithms: Models that will not be considered for training
66+
:type blocked_training_algorithms: typing.Optional[typing.List[str]]
5867
:param training_mode: [Experimental] The training mode to use.
5968
The possible values are-
6069
@@ -65,6 +74,7 @@ def __init__(
6574
* auto- Currently, it is same as non_distributed. In future, this might change.
6675
6776
Note: This parameter is in public preview and may change in future.
77+
:type training_mode: typing.Optional[typing.Union[str, azure.ai.ml.constants.TabularTrainingMode]]
6878
"""
6979
self.enable_onnx_compatible_models = enable_onnx_compatible_models
7080
self.enable_dnn_training = enable_dnn_training
@@ -79,7 +89,7 @@ def __init__(
7989

8090
@experimental
8191
@property
82-
def training_mode(self):
92+
def training_mode(self) -> Optional[TabularTrainingMode]:
8393
return self._training_mode
8494

8595
@training_mode.setter
@@ -102,11 +112,11 @@ def training_mode(self, value: Optional[Union[str, TabularTrainingMode]]):
102112
)
103113

104114
@property
105-
def allowed_training_algorithms(self):
115+
def allowed_training_algorithms(self) -> Optional[List[str]]:
106116
return self._allowed_training_algorithms
107117

108118
@property
109-
def blocked_training_algorithms(self):
119+
def blocked_training_algorithms(self) -> Optional[List[str]]:
110120
return self._blocked_training_algorithms
111121

112122
def _to_rest_object(self) -> RestTrainingSettings:

0 commit comments

Comments
 (0)