Skip to content

Commit da186e6

Browse files
committed
feedback: new formatting changes
1 parent 0cd662e commit da186e6

File tree

8 files changed

+122
-2
lines changed

8 files changed

+122
-2
lines changed

pkg/apis/controller/suggestions/v1beta1/zz_generated.deepcopy.go

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/apis/controller/trials/v1beta1/zz_generated.deepcopy.go

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/apis/v1beta1/openapi_generated.go

Lines changed: 32 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/apis/v1beta1/swagger.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,14 @@
207207
"$ref": "#/definitions/v1beta1.EarlyStoppingRule"
208208
}
209209
},
210+
"labels": {
211+
"description": "Suggestion label metadata to attach to Trial job",
212+
"type": "object",
213+
"additionalProperties": {
214+
"type": "string",
215+
"default": ""
216+
}
217+
},
210218
"name": {
211219
"description": "Name of the suggestion",
212220
"type": "string"
@@ -303,6 +311,14 @@
303311
"description": "Condition when trial custom resource is failed. Condition must be in GJSON format, ref https://github.com/tidwall/gjson. For example for BatchJob: status.conditions.#(type==\"Failed\")#|#(status==\"True\")#",
304312
"type": "string"
305313
},
314+
"labels": {
315+
"description": "Labels that provide additional metadata for services (e.g. Suggestions tracking)",
316+
"type": "object",
317+
"additionalProperties": {
318+
"type": "string",
319+
"default": ""
320+
}
321+
},
306322
"metricsCollector": {
307323
"description": "Describes how metrics will be collected",
308324
"default": {},

sdk/python/v1beta1/docs/V1beta1TrialAssignment.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ TrialAssignment is the assignment for one trial.
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**early_stopping_rules** | [**list[V1beta1EarlyStoppingRule]**](V1beta1EarlyStoppingRule.md) | Rules for early stopping techniques Contains rule name, value and comparison type | [optional]
8+
**labels** | **dict(str, str)** | Suggestion label metadata to attach to Trial job | [optional]
89
**name** | **str** | Name of the suggestion | [optional]
910
**parameter_assignments** | [**list[V1beta1ParameterAssignment]**](V1beta1ParameterAssignment.md) | Suggestion results with Trial parameters | [optional]
1011

sdk/python/v1beta1/docs/V1beta1TrialSpec.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**early_stopping_rules** | [**list[V1beta1EarlyStoppingRule]**](V1beta1EarlyStoppingRule.md) | Rules for early stopping techniques. Each rule should be met to early stop Trial. | [optional]
88
**failure_condition** | **str** | Condition when trial custom resource is failed. Condition must be in GJSON format, ref https://github.com/tidwall/gjson. For example for BatchJob: status.conditions.#(type==\"Failed\")#|#(status==\"True\")# | [optional]
9+
**labels** | **dict(str, str)** | Labels that provide additional metadata for services (e.g. Suggestions tracking) | [optional]
910
**metrics_collector** | [**V1beta1MetricsCollectorSpec**](V1beta1MetricsCollectorSpec.md) | | [optional]
1011
**objective** | [**V1beta1ObjectiveSpec**](V1beta1ObjectiveSpec.md) | | [optional]
1112
**parameter_assignments** | [**list[V1beta1ParameterAssignment]**](V1beta1ParameterAssignment.md) | Key-value pairs for hyperparameters and assignment values. | [optional]

sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_assignment.py

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,29 +34,34 @@ class V1beta1TrialAssignment(object):
3434
"""
3535
openapi_types = {
3636
'early_stopping_rules': 'list[V1beta1EarlyStoppingRule]',
37+
'labels': 'dict(str, str)',
3738
'name': 'str',
3839
'parameter_assignments': 'list[V1beta1ParameterAssignment]'
3940
}
4041

4142
attribute_map = {
4243
'early_stopping_rules': 'earlyStoppingRules',
44+
'labels': 'labels',
4345
'name': 'name',
4446
'parameter_assignments': 'parameterAssignments'
4547
}
4648

47-
def __init__(self, early_stopping_rules=None, name=None, parameter_assignments=None, local_vars_configuration=None): # noqa: E501
49+
def __init__(self, early_stopping_rules=None, labels=None, name=None, parameter_assignments=None, local_vars_configuration=None): # noqa: E501
4850
"""V1beta1TrialAssignment - a model defined in OpenAPI""" # noqa: E501
4951
if local_vars_configuration is None:
5052
local_vars_configuration = Configuration()
5153
self.local_vars_configuration = local_vars_configuration
5254

5355
self._early_stopping_rules = None
56+
self._labels = None
5457
self._name = None
5558
self._parameter_assignments = None
5659
self.discriminator = None
5760

5861
if early_stopping_rules is not None:
5962
self.early_stopping_rules = early_stopping_rules
63+
if labels is not None:
64+
self.labels = labels
6065
if name is not None:
6166
self.name = name
6267
if parameter_assignments is not None:
@@ -85,6 +90,29 @@ def early_stopping_rules(self, early_stopping_rules):
8590

8691
self._early_stopping_rules = early_stopping_rules
8792

93+
@property
94+
def labels(self):
95+
"""Gets the labels of this V1beta1TrialAssignment. # noqa: E501
96+
97+
Suggestion label metadata to attach to Trial job # noqa: E501
98+
99+
:return: The labels of this V1beta1TrialAssignment. # noqa: E501
100+
:rtype: dict(str, str)
101+
"""
102+
return self._labels
103+
104+
@labels.setter
105+
def labels(self, labels):
106+
"""Sets the labels of this V1beta1TrialAssignment.
107+
108+
Suggestion label metadata to attach to Trial job # noqa: E501
109+
110+
:param labels: The labels of this V1beta1TrialAssignment. # noqa: E501
111+
:type: dict(str, str)
112+
"""
113+
114+
self._labels = labels
115+
88116
@property
89117
def name(self):
90118
"""Gets the name of this V1beta1TrialAssignment. # noqa: E501

sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_spec.py

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ class V1beta1TrialSpec(object):
3535
openapi_types = {
3636
'early_stopping_rules': 'list[V1beta1EarlyStoppingRule]',
3737
'failure_condition': 'str',
38+
'labels': 'dict(str, str)',
3839
'metrics_collector': 'V1beta1MetricsCollectorSpec',
3940
'objective': 'V1beta1ObjectiveSpec',
4041
'parameter_assignments': 'list[V1beta1ParameterAssignment]',
@@ -48,6 +49,7 @@ class V1beta1TrialSpec(object):
4849
attribute_map = {
4950
'early_stopping_rules': 'earlyStoppingRules',
5051
'failure_condition': 'failureCondition',
52+
'labels': 'labels',
5153
'metrics_collector': 'metricsCollector',
5254
'objective': 'objective',
5355
'parameter_assignments': 'parameterAssignments',
@@ -58,14 +60,15 @@ class V1beta1TrialSpec(object):
5860
'success_condition': 'successCondition'
5961
}
6062

61-
def __init__(self, early_stopping_rules=None, failure_condition=None, metrics_collector=None, objective=None, parameter_assignments=None, primary_container_name=None, primary_pod_labels=None, retain_run=None, run_spec=None, success_condition=None, local_vars_configuration=None): # noqa: E501
63+
def __init__(self, early_stopping_rules=None, failure_condition=None, labels=None, metrics_collector=None, objective=None, parameter_assignments=None, primary_container_name=None, primary_pod_labels=None, retain_run=None, run_spec=None, success_condition=None, local_vars_configuration=None): # noqa: E501
6264
"""V1beta1TrialSpec - a model defined in OpenAPI""" # noqa: E501
6365
if local_vars_configuration is None:
6466
local_vars_configuration = Configuration()
6567
self.local_vars_configuration = local_vars_configuration
6668

6769
self._early_stopping_rules = None
6870
self._failure_condition = None
71+
self._labels = None
6972
self._metrics_collector = None
7073
self._objective = None
7174
self._parameter_assignments = None
@@ -80,6 +83,8 @@ def __init__(self, early_stopping_rules=None, failure_condition=None, metrics_co
8083
self.early_stopping_rules = early_stopping_rules
8184
if failure_condition is not None:
8285
self.failure_condition = failure_condition
86+
if labels is not None:
87+
self.labels = labels
8388
if metrics_collector is not None:
8489
self.metrics_collector = metrics_collector
8590
if objective is not None:
@@ -143,6 +148,29 @@ def failure_condition(self, failure_condition):
143148

144149
self._failure_condition = failure_condition
145150

151+
@property
152+
def labels(self):
153+
"""Gets the labels of this V1beta1TrialSpec. # noqa: E501
154+
155+
Labels that provide additional metadata for services (e.g. Suggestions tracking) # noqa: E501
156+
157+
:return: The labels of this V1beta1TrialSpec. # noqa: E501
158+
:rtype: dict(str, str)
159+
"""
160+
return self._labels
161+
162+
@labels.setter
163+
def labels(self, labels):
164+
"""Sets the labels of this V1beta1TrialSpec.
165+
166+
Labels that provide additional metadata for services (e.g. Suggestions tracking) # noqa: E501
167+
168+
:param labels: The labels of this V1beta1TrialSpec. # noqa: E501
169+
:type: dict(str, str)
170+
"""
171+
172+
self._labels = labels
173+
146174
@property
147175
def metrics_collector(self):
148176
"""Gets the metrics_collector of this V1beta1TrialSpec. # noqa: E501

0 commit comments

Comments
 (0)