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