@@ -297,6 +297,10 @@ def create(
297
297
evaluation_mvs_freeform_tags = {
298
298
Tags .AQUA_EVALUATION : Tags .AQUA_EVALUATION ,
299
299
}
300
+ evaluation_mvs_freeform_tags = {
301
+ ** evaluation_mvs_freeform_tags ,
302
+ ** (create_aqua_evaluation_details .freeform_tags or {}),
303
+ }
300
304
301
305
model_version_set = (
302
306
ModelVersionSet ()
@@ -307,6 +311,9 @@ def create(
307
311
create_aqua_evaluation_details .experiment_description
308
312
)
309
313
.with_freeform_tags (** evaluation_mvs_freeform_tags )
314
+ .with_defined_tags (
315
+ ** (create_aqua_evaluation_details .defined_tags or {})
316
+ )
310
317
# TODO: decide what parameters will be needed
311
318
.create (** kwargs )
312
319
)
@@ -369,6 +376,10 @@ def create(
369
376
Tags .AQUA_EVALUATION : Tags .AQUA_EVALUATION ,
370
377
Tags .AQUA_EVALUATION_MODEL_ID : evaluation_model .id ,
371
378
}
379
+ evaluation_job_freeform_tags = {
380
+ ** evaluation_job_freeform_tags ,
381
+ ** (create_aqua_evaluation_details .freeform_tags or {}),
382
+ }
372
383
373
384
evaluation_job = Job (name = evaluation_model .display_name ).with_infrastructure (
374
385
DataScienceJob ()
@@ -379,6 +390,7 @@ def create(
379
390
.with_shape_name (create_aqua_evaluation_details .shape_name )
380
391
.with_block_storage_size (create_aqua_evaluation_details .block_storage_size )
381
392
.with_freeform_tag (** evaluation_job_freeform_tags )
393
+ .with_defined_tag (** (create_aqua_evaluation_details .defined_tags or {}))
382
394
)
383
395
if (
384
396
create_aqua_evaluation_details .memory_in_gbs
@@ -425,6 +437,7 @@ def create(
425
437
evaluation_job_run = evaluation_job .run (
426
438
name = evaluation_model .display_name ,
427
439
freeform_tags = evaluation_job_freeform_tags ,
440
+ defined_tags = (create_aqua_evaluation_details .defined_tags or {}),
428
441
wait = False ,
429
442
)
430
443
logger .debug (
@@ -444,13 +457,20 @@ def create(
444
457
for metadata in evaluation_model_custom_metadata .to_dict ()["data" ]
445
458
]
446
459
460
+ evaluation_model_freeform_tags = {
461
+ Tags .AQUA_EVALUATION : Tags .AQUA_EVALUATION ,
462
+ ** (create_aqua_evaluation_details .freeform_tags or {}),
463
+ }
464
+ evaluation_model_defined_tags = (
465
+ create_aqua_evaluation_details .defined_tags or {}
466
+ )
467
+
447
468
self .ds_client .update_model (
448
469
model_id = evaluation_model .id ,
449
470
update_model_details = UpdateModelDetails (
450
471
custom_metadata_list = updated_custom_metadata_list ,
451
- freeform_tags = {
452
- Tags .AQUA_EVALUATION : Tags .AQUA_EVALUATION ,
453
- },
472
+ freeform_tags = evaluation_model_freeform_tags ,
473
+ defined_tags = evaluation_model_defined_tags ,
454
474
),
455
475
)
456
476
@@ -524,6 +544,8 @@ def create(
524
544
"evaluation_job_id" : evaluation_job .id ,
525
545
"evaluation_source" : create_aqua_evaluation_details .evaluation_source_id ,
526
546
"evaluation_experiment_id" : experiment_model_version_set_id ,
547
+ ** evaluation_model_freeform_tags ,
548
+ ** evaluation_model_defined_tags ,
527
549
},
528
550
parameters = AquaEvalParams (),
529
551
)
0 commit comments