@@ -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,23 @@ 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
+ }
463
+ evaluation_model_freeform_tags = {
464
+ ** evaluation_model_freeform_tags ,
465
+ ** (create_aqua_evaluation_details .freeform_tags or {}),
466
+ }
467
+ evaluation_model_defined_tags = (
468
+ create_aqua_evaluation_details .defined_tags or {}
469
+ )
470
+
447
471
self .ds_client .update_model (
448
472
model_id = evaluation_model .id ,
449
473
update_model_details = UpdateModelDetails (
450
474
custom_metadata_list = updated_custom_metadata_list ,
451
- freeform_tags = {
452
- Tags .AQUA_EVALUATION : Tags .AQUA_EVALUATION ,
453
- },
475
+ freeform_tags = evaluation_model_freeform_tags ,
476
+ defined_tags = evaluation_model_defined_tags ,
454
477
),
455
478
)
456
479
@@ -520,10 +543,14 @@ def create(
520
543
),
521
544
),
522
545
tags = {
523
- "aqua_evaluation" : Tags .AQUA_EVALUATION ,
524
- "evaluation_job_id" : evaluation_job .id ,
525
- "evaluation_source" : create_aqua_evaluation_details .evaluation_source_id ,
526
- "evaluation_experiment_id" : experiment_model_version_set_id ,
546
+ ** {
547
+ "aqua_evaluation" : Tags .AQUA_EVALUATION ,
548
+ "evaluation_job_id" : evaluation_job .id ,
549
+ "evaluation_source" : create_aqua_evaluation_details .evaluation_source_id ,
550
+ "evaluation_experiment_id" : experiment_model_version_set_id ,
551
+ },
552
+ ** evaluation_model_freeform_tags ,
553
+ ** evaluation_model_defined_tags ,
527
554
},
528
555
parameters = AquaEvalParams (),
529
556
)
0 commit comments