24
24
from google .cloud .aiplatform import base
25
25
from google .cloud .aiplatform import initializer
26
26
from google .cloud .aiplatform import utils
27
- from google .cloud .aiplatform .compat .types import tensorboard as gca_tensorboard
27
+ from google .cloud .aiplatform .compat .types import (
28
+ tensorboard as gca_tensorboard ,
29
+ )
28
30
from google .cloud .aiplatform .compat .types import (
29
31
tensorboard_data as gca_tensorboard_data ,
30
32
)
31
33
from google .cloud .aiplatform .compat .types import (
32
34
tensorboard_experiment as gca_tensorboard_experiment ,
33
35
)
34
- from google .cloud .aiplatform .compat .types import tensorboard_run as gca_tensorboard_run
36
+ from google .cloud .aiplatform .compat .types import (
37
+ tensorboard_run as gca_tensorboard_run ,
38
+ )
35
39
from google .cloud .aiplatform .compat .types import (
36
40
tensorboard_service as gca_tensorboard_service ,
37
41
)
@@ -95,6 +99,7 @@ def create(
95
99
display_name : Optional [str ] = None ,
96
100
description : Optional [str ] = None ,
97
101
labels : Optional [Dict [str , str ]] = None ,
102
+ is_default = False ,
98
103
project : Optional [str ] = None ,
99
104
location : Optional [str ] = None ,
100
105
credentials : Optional [auth_credentials .Credentials ] = None ,
@@ -132,6 +137,10 @@ def create(
132
137
See https://goo.gl/xmQnxf for more information and examples of labels.
133
138
System reserved label keys are prefixed with "aiplatform.googleapis.com/"
134
139
and are immutable.
140
+ is_default (bool):
141
+ If the TensorBoard instance is default or not. The default
142
+ TensorBoard instance will be used by Experiment/ExperimentRun
143
+ when needed if no TensorBoard instance is explicitly specified.
135
144
project (str):
136
145
Optional. Project to upload this model to. Overrides project set in
137
146
aiplatform.init.
@@ -182,6 +191,7 @@ def create(
182
191
display_name = display_name ,
183
192
description = description ,
184
193
labels = labels ,
194
+ is_default = is_default ,
185
195
encryption_spec = encryption_spec ,
186
196
)
187
197
@@ -208,6 +218,7 @@ def update(
208
218
display_name : Optional [str ] = None ,
209
219
description : Optional [str ] = None ,
210
220
labels : Optional [Dict [str , str ]] = None ,
221
+ is_default : Optional [bool ] = None ,
211
222
request_metadata : Optional [Sequence [Tuple [str , str ]]] = (),
212
223
encryption_spec_key_name : Optional [str ] = None ,
213
224
) -> "Tensorboard" :
@@ -238,6 +249,11 @@ def update(
238
249
See https://goo.gl/xmQnxf for more information and examples of labels.
239
250
System reserved label keys are prefixed with "aiplatform.googleapis.com/"
240
251
and are immutable.
252
+ is_default (bool):
253
+ Optional. If the TensorBoard instance is default or not.
254
+ The default TensorBoard instance will be used by
255
+ Experiment/ExperimentRun when needed if no TensorBoard instance
256
+ is explicitly specified.
241
257
request_metadata (Sequence[Tuple[str, str]]):
242
258
Optional. Strings which should be sent along with the request as metadata.
243
259
encryption_spec_key_name (str):
@@ -268,6 +284,9 @@ def update(
268
284
utils .validate_labels (labels )
269
285
update_mask .append ("labels" )
270
286
287
+ if is_default is not None :
288
+ update_mask .append ("is_default" )
289
+
271
290
encryption_spec = None
272
291
if encryption_spec_key_name :
273
292
encryption_spec = initializer .global_config .get_encryption_spec (
@@ -282,6 +301,7 @@ def update(
282
301
display_name = display_name ,
283
302
description = description ,
284
303
labels = labels ,
304
+ is_default = is_default ,
285
305
encryption_spec = encryption_spec ,
286
306
)
287
307
0 commit comments