@@ -329,6 +329,10 @@ def create(
329
329
** create_aqua_evaluation_details .model_parameters ,
330
330
)
331
331
332
+ evaluation_model_defined_tags = (
333
+ create_aqua_evaluation_details .defined_tags or {}
334
+ )
335
+
332
336
target_compartment = (
333
337
create_aqua_evaluation_details .compartment_id or COMPARTMENT_OCID
334
338
)
@@ -380,9 +384,7 @@ def create(
380
384
create_aqua_evaluation_details .experiment_description
381
385
)
382
386
.with_freeform_tags (** evaluation_mvs_freeform_tags )
383
- .with_defined_tags (
384
- ** (create_aqua_evaluation_details .defined_tags or {})
385
- )
387
+ .with_defined_tags (** evaluation_model_defined_tags )
386
388
# TODO: decide what parameters will be needed
387
389
.create (** kwargs )
388
390
)
@@ -427,6 +429,7 @@ def create(
427
429
.with_custom_metadata_list (evaluation_model_custom_metadata )
428
430
.with_defined_metadata_list (evaluation_model_taxonomy_metadata )
429
431
.with_provenance_metadata (ModelProvenanceMetadata (training_id = UNKNOWN ))
432
+ .with_defined_tags (** evaluation_model_defined_tags )
430
433
# TODO uncomment this once the evaluation container will get the updated version of the ADS
431
434
# .with_input_schema(create_aqua_evaluation_details.to_dict())
432
435
# TODO: decide what parameters will be needed
@@ -459,7 +462,7 @@ def create(
459
462
.with_shape_name (create_aqua_evaluation_details .shape_name )
460
463
.with_block_storage_size (create_aqua_evaluation_details .block_storage_size )
461
464
.with_freeform_tag (** evaluation_job_freeform_tags )
462
- .with_defined_tag (** ( create_aqua_evaluation_details . defined_tags or {}) )
465
+ .with_defined_tag (** evaluation_model_defined_tags )
463
466
)
464
467
if (
465
468
create_aqua_evaluation_details .memory_in_gbs
@@ -501,15 +504,17 @@ def create(
501
504
metrics = create_aqua_evaluation_details .metrics ,
502
505
inference_configuration = eval_inference_configuration or {},
503
506
)
504
- ).create (** kwargs ) ## TODO: decide what parameters will be needed
507
+ ).create (
508
+ ** kwargs
509
+ ) ## TODO: decide what parameters will be needed
505
510
logger .debug (
506
511
f"Successfully created evaluation job { evaluation_job .id } for { create_aqua_evaluation_details .evaluation_source_id } ."
507
512
)
508
513
509
514
evaluation_job_run = evaluation_job .run (
510
515
name = evaluation_model .display_name ,
511
516
freeform_tags = evaluation_job_freeform_tags ,
512
- defined_tags = ( create_aqua_evaluation_details . defined_tags or {}) ,
517
+ defined_tags = evaluation_model_defined_tags ,
513
518
wait = False ,
514
519
)
515
520
logger .debug (
@@ -533,16 +538,12 @@ def create(
533
538
Tags .AQUA_EVALUATION : Tags .AQUA_EVALUATION ,
534
539
** (create_aqua_evaluation_details .freeform_tags or {}),
535
540
}
536
- evaluation_model_defined_tags = (
537
- create_aqua_evaluation_details .defined_tags or {}
538
- )
539
541
540
542
self .ds_client .update_model (
541
543
model_id = evaluation_model .id ,
542
544
update_model_details = UpdateModelDetails (
543
545
custom_metadata_list = updated_custom_metadata_list ,
544
546
freeform_tags = evaluation_model_freeform_tags ,
545
- defined_tags = evaluation_model_defined_tags ,
546
547
),
547
548
)
548
549
0 commit comments