Skip to content

Commit

Permalink
fix(components): [text2sql] Turn model_inference_results_path to mode…
Browse files Browse the repository at this point in the history
…l_inference_results_directory and remove duplicate comment

PiperOrigin-RevId: 576576299
  • Loading branch information
Googler committed Oct 25, 2023
1 parent 0d75611 commit 570e56d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,6 @@ def evaluation_llm_text2sql_pipeline(
must be one of the Model's supportedInputStorageFormats. If not set,
default to "jsonl". For more details about this input config, see
https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.batchPredictionJobs#InputConfig.
batch_predict_instances_format: The format in which perdictions are made,
must be one of the Model's supportedInputStorageFormats. If not set,
default to "jsonl". For more details about this input config, see
https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.batchPredictionJobs#InputConfig.
machine_type: The machine type of this custom job. If not set, defaulted to
`e2-highmem-16`. More details:
https://cloud.google.com/compute/docs/machine-resource
Expand Down Expand Up @@ -148,9 +144,11 @@ def evaluation_llm_text2sql_pipeline(
location=location,
sql_dialect=sql_dialect,
evaluation_method=evaluation_method,
# TODO(bozhengbz) Add value to model_inference_results_path
# when model batch prediction component is added.
model_inference_results_path='gs://test/model_inference_results.json',
# TODO(bozhengbz) Change value to model_inference_results_directory
# when sql query model batch prediction component is added.
model_inference_results_directory=batch_predict_table_names_task.outputs[
'gcs_output_directory'
],
tables_metadata_path=tables_metadata_path,
machine_type=machine_type,
service_account=service_account,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
from google_cloud_pipeline_components import utils as gcpc_utils
from google_cloud_pipeline_components._implementation.model_evaluation import utils
from google_cloud_pipeline_components._implementation.model_evaluation import version
from kfp.dsl import Artifact
from kfp.dsl import container_component
from kfp.dsl import Input
from kfp.dsl import Metrics
from kfp.dsl import Output
from kfp.dsl import OutputPath
Expand All @@ -33,7 +35,7 @@ def text2sql_evaluation(
location: str,
sql_dialect: str,
evaluation_method: str,
model_inference_results_path: str,
model_inference_results_directory: Input[Artifact],
tables_metadata_path: str,
display_name: str = 'text2sql-evaluation',
machine_type: str = 'e2-highmem-16',
Expand All @@ -49,8 +51,8 @@ def text2sql_evaluation(
sql_dialect: Required. SQL dialect type, e.g. bigquery, mysql, etc.
evaluation_method: Required. Text2SQL evaluation method, value can be
'parser', 'execution', 'all'.
model_inference_results_path: Required. The path for json file containing
text2sql model inference results from the last step.
model_inference_results_directory: Required. The path for json file
containing text2sql model inference results from the last step.
tables_metadata_path: Required. The path for json file containing database
metadata, including table names, schema fields.
display_name: The name of the Evaluation job.
Expand Down Expand Up @@ -98,7 +100,7 @@ def text2sql_evaluation(
f'--location={location}',
f'--sql_dialect={sql_dialect}',
f'--evaluation_method={evaluation_method}',
f'--model_inference_results_path={model_inference_results_path}',
f'--model_inference_results_directory={model_inference_results_directory.path}',
f'--tables_metadata_path={tables_metadata_path}',
f'--root_dir={PIPELINE_ROOT_PLACEHOLDER}',
f'--gcp_resources={gcp_resources}',
Expand Down

0 comments on commit 570e56d

Please sign in to comment.