@@ -260,6 +260,10 @@ def create(
260
260
** create_aqua_evaluation_details .model_parameters ,
261
261
)
262
262
263
+ evaluation_model_defined_tags = (
264
+ create_aqua_evaluation_details .defined_tags or {}
265
+ )
266
+
263
267
target_compartment = (
264
268
create_aqua_evaluation_details .compartment_id or COMPARTMENT_OCID
265
269
)
@@ -311,9 +315,7 @@ def create(
311
315
create_aqua_evaluation_details .experiment_description
312
316
)
313
317
.with_freeform_tags (** evaluation_mvs_freeform_tags )
314
- .with_defined_tags (
315
- ** (create_aqua_evaluation_details .defined_tags or {})
316
- )
318
+ .with_defined_tags (** evaluation_model_defined_tags )
317
319
# TODO: decide what parameters will be needed
318
320
.create (** kwargs )
319
321
)
@@ -358,6 +360,7 @@ def create(
358
360
.with_custom_metadata_list (evaluation_model_custom_metadata )
359
361
.with_defined_metadata_list (evaluation_model_taxonomy_metadata )
360
362
.with_provenance_metadata (ModelProvenanceMetadata (training_id = UNKNOWN ))
363
+ .with_defined_tags (** evaluation_model_defined_tags )
361
364
# TODO uncomment this once the evaluation container will get the updated version of the ADS
362
365
# .with_input_schema(create_aqua_evaluation_details.to_dict())
363
366
# TODO: decide what parameters will be needed
@@ -390,7 +393,7 @@ def create(
390
393
.with_shape_name (create_aqua_evaluation_details .shape_name )
391
394
.with_block_storage_size (create_aqua_evaluation_details .block_storage_size )
392
395
.with_freeform_tag (** evaluation_job_freeform_tags )
393
- .with_defined_tag (** ( create_aqua_evaluation_details . defined_tags or {}) )
396
+ .with_defined_tag (** evaluation_model_defined_tags )
394
397
)
395
398
if (
396
399
create_aqua_evaluation_details .memory_in_gbs
@@ -429,15 +432,17 @@ def create(
429
432
metrics = create_aqua_evaluation_details .metrics ,
430
433
inference_configuration = eval_inference_configuration or {},
431
434
)
432
- ).create (** kwargs ) ## TODO: decide what parameters will be needed
435
+ ).create (
436
+ ** kwargs
437
+ ) ## TODO: decide what parameters will be needed
433
438
logger .debug (
434
439
f"Successfully created evaluation job { evaluation_job .id } for { create_aqua_evaluation_details .evaluation_source_id } ."
435
440
)
436
441
437
442
evaluation_job_run = evaluation_job .run (
438
443
name = evaluation_model .display_name ,
439
444
freeform_tags = evaluation_job_freeform_tags ,
440
- defined_tags = ( create_aqua_evaluation_details . defined_tags or {}) ,
445
+ defined_tags = evaluation_model_defined_tags ,
441
446
wait = False ,
442
447
)
443
448
logger .debug (
@@ -461,16 +466,12 @@ def create(
461
466
Tags .AQUA_EVALUATION : Tags .AQUA_EVALUATION ,
462
467
** (create_aqua_evaluation_details .freeform_tags or {}),
463
468
}
464
- evaluation_model_defined_tags = (
465
- create_aqua_evaluation_details .defined_tags or {}
466
- )
467
469
468
470
self .ds_client .update_model (
469
471
model_id = evaluation_model .id ,
470
472
update_model_details = UpdateModelDetails (
471
473
custom_metadata_list = updated_custom_metadata_list ,
472
474
freeform_tags = evaluation_model_freeform_tags ,
473
- defined_tags = evaluation_model_defined_tags ,
474
475
),
475
476
)
476
477
0 commit comments