@@ -297,6 +297,10 @@ def create(
297297 evaluation_mvs_freeform_tags = {
298298 Tags .AQUA_EVALUATION : Tags .AQUA_EVALUATION ,
299299 }
300+ evaluation_mvs_freeform_tags = {
301+ ** evaluation_mvs_freeform_tags ,
302+ ** (create_aqua_evaluation_details .freeform_tags or {}),
303+ }
300304
301305 model_version_set = (
302306 ModelVersionSet ()
@@ -307,6 +311,9 @@ def create(
307311 create_aqua_evaluation_details .experiment_description
308312 )
309313 .with_freeform_tags (** evaluation_mvs_freeform_tags )
314+ .with_defined_tags (
315+ ** (create_aqua_evaluation_details .defined_tags or {})
316+ )
310317 # TODO: decide what parameters will be needed
311318 .create (** kwargs )
312319 )
@@ -369,6 +376,10 @@ def create(
369376 Tags .AQUA_EVALUATION : Tags .AQUA_EVALUATION ,
370377 Tags .AQUA_EVALUATION_MODEL_ID : evaluation_model .id ,
371378 }
379+ evaluation_job_freeform_tags = {
380+ ** evaluation_job_freeform_tags ,
381+ ** (create_aqua_evaluation_details .freeform_tags or {}),
382+ }
372383
373384 evaluation_job = Job (name = evaluation_model .display_name ).with_infrastructure (
374385 DataScienceJob ()
@@ -379,6 +390,7 @@ def create(
379390 .with_shape_name (create_aqua_evaluation_details .shape_name )
380391 .with_block_storage_size (create_aqua_evaluation_details .block_storage_size )
381392 .with_freeform_tag (** evaluation_job_freeform_tags )
393+ .with_defined_tag (** (create_aqua_evaluation_details .defined_tags or {}))
382394 )
383395 if (
384396 create_aqua_evaluation_details .memory_in_gbs
@@ -425,6 +437,7 @@ def create(
425437 evaluation_job_run = evaluation_job .run (
426438 name = evaluation_model .display_name ,
427439 freeform_tags = evaluation_job_freeform_tags ,
440+ defined_tags = (create_aqua_evaluation_details .defined_tags or {}),
428441 wait = False ,
429442 )
430443 logger .debug (
@@ -444,13 +457,23 @@ def create(
444457 for metadata in evaluation_model_custom_metadata .to_dict ()["data" ]
445458 ]
446459
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+
447471 self .ds_client .update_model (
448472 model_id = evaluation_model .id ,
449473 update_model_details = UpdateModelDetails (
450474 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 ,
454477 ),
455478 )
456479
@@ -520,10 +543,14 @@ def create(
520543 ),
521544 ),
522545 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 ,
527554 },
528555 parameters = AquaEvalParams (),
529556 )
0 commit comments