File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -383,6 +383,10 @@ def test_eval_config_with_unified_metrics(client):
383383 sampling_count = 1 ,
384384 autorater_model = "test-model" ,
385385 ),
386+ inference_generation_config = genai_types .GenerationConfig (
387+ temperature = 0.5 ,
388+ max_output_tokens = 1024 ,
389+ ),
386390 )
387391 tuning_job = client .tunings .tune (
388392 base_model = "gemini-2.5-flash" ,
Original file line number Diff line number Diff line change @@ -585,6 +585,17 @@ def _EvaluationConfig_from_vertex(
585585 ),
586586 )
587587
588+ if getv (from_object , ['inferenceGenerationConfig' ]) is not None :
589+ setv (
590+ to_object ,
591+ ['inference_generation_config' ],
592+ _GenerationConfig_from_vertex (
593+ getv (from_object , ['inferenceGenerationConfig' ]),
594+ to_object ,
595+ root_object ,
596+ ),
597+ )
598+
588599 return to_object
589600
590601
@@ -609,6 +620,17 @@ def _EvaluationConfig_to_vertex(
609620 ),
610621 )
611622
623+ if getv (from_object , ['inference_generation_config' ]) is not None :
624+ setv (
625+ to_object ,
626+ ['inferenceGenerationConfig' ],
627+ _GenerationConfig_to_vertex (
628+ getv (from_object , ['inference_generation_config' ]),
629+ to_object ,
630+ root_object ,
631+ ),
632+ )
633+
612634 return to_object
613635
614636
Original file line number Diff line number Diff line change @@ -11454,6 +11454,9 @@ class EvaluationConfig(_common.BaseModel):
1145411454 autorater_config: Optional[AutoraterConfig] = Field(
1145511455 default=None, description="""Autorater config for evaluation."""
1145611456 )
11457+ inference_generation_config: Optional[GenerationConfig] = Field(
11458+ default=None, description="""Generation config for inference."""
11459+ )
1145711460
1145811461
1145911462class EvaluationConfigDict(TypedDict, total=False):
@@ -11468,6 +11471,9 @@ class EvaluationConfigDict(TypedDict, total=False):
1146811471 autorater_config: Optional[AutoraterConfigDict]
1146911472 """Autorater config for evaluation."""
1147011473
11474+ inference_generation_config: Optional[GenerationConfigDict]
11475+ """Generation config for inference."""
11476+
1147111477
1147211478EvaluationConfigOrDict = Union[EvaluationConfig, EvaluationConfigDict]
1147311479
You can’t perform that action at this time.
0 commit comments