Skip to content

Commit

Permalink
fix(components): Pass moddel name to eval_runner to process batch pre…
Browse files Browse the repository at this point in the history
…diction's output as per the output schema of model used

Signed-off-by: Googler <[email protected]>
PiperOrigin-RevId: 665977093
  • Loading branch information
Googler committed Aug 21, 2024
1 parent 43cdc20 commit 0d3e79a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def model_evaluation_text_generation(
row_based_metrics: Output[Metrics],
project: str,
location: str,
model_name: str,
evaluation_task: str = 'text-generation',
target_field_name: str = 'instance.output_text',
prediction_field_name: str = 'predictions.content',
Expand All @@ -55,6 +56,7 @@ def model_evaluation_text_generation(
Args:
project: The GCP project that runs the pipeline component.
location: The GCP region that runs the pipeline component.
model_name: The name of the model to be evaluated.
evaluation_task: The task that the large language model will be evaluated
on. The evaluation component computes a set of metrics relevant to that
specific task. Currently supported tasks are: `summarization`,
Expand Down Expand Up @@ -124,6 +126,7 @@ def model_evaluation_text_generation(
machine_type=machine_type,
image_uri=version.LLM_EVAL_IMAGE_TAG,
args=[
f'--model_name={model_name}',
f'--evaluation_task={evaluation_task}',
f'--target_field_name={target_field_name}',
f'--prediction_field_name={prediction_field_name}',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ def evaluation_llm_text_generation_pipeline( # pylint: disable=dangerous-defaul
eval_task = LLMEvaluationTextGenerationOp(
project=project,
location=location,
model_name=model_name,
evaluation_task=evaluation_task,
target_field_name=target_field_name,
predictions_format=batch_predict_predictions_format,
Expand Down

0 comments on commit 0d3e79a

Please sign in to comment.