Skip to content

Commit ffae900

Browse files
authored
Revert making primary_metric w/o default type (Azure#30687)
1 parent 5ac6d83 commit ffae900

File tree

1 file changed

+2
-2
lines changed
  • sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/sweep

1 file changed

+2
-2
lines changed

sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/sweep/objective.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ class Objective(RestTranslatableMixin):
2727
:caption: Assigning an objective to a SweepJob
2828
"""
2929

30-
def __init__(self, goal: str, primary_metric: str) -> None:
30+
def __init__(self, goal: str, primary_metric: Optional[str] = None) -> None:
3131
"""Optimization objective.
3232
3333
:param goal: Required. Defines supported metric goals for hyperparameter tuning. Acceptable values
3434
are: "minimize", "maximize".
3535
:type goal: str
36-
:param primary_metric: Required. Name of the metric to optimize.
36+
:param primary_metric: Required. The name of the metric to optimize.
3737
:type primary_metric: str
3838
"""
3939
self.goal = goal.lower()

0 commit comments

Comments
 (0)