-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simplify champion-challenger approach #7
Conversation
pipeline_components/aiplatform/aiplatform/custom_train_job/component.py
Outdated
Show resolved
Hide resolved
pipeline_components/aiplatform/aiplatform/import_model_evaluation/component.py
Outdated
Show resolved
Hide resolved
pipeline_components/aiplatform/aiplatform/model_batch_predict/component.py
Show resolved
Hide resolved
pipeline_components/aiplatform/aiplatform/update_best_model/component.py
Outdated
Show resolved
Hide resolved
pipeline_components/bigquery/bigquery/upload_prediction/component.py
Outdated
Show resolved
Hide resolved
pipeline_components/aiplatform/aiplatform/import_model_evaluation/component.py
Show resolved
Hide resolved
pipeline_components/aiplatform/aiplatform/custom_train_job/component.py
Outdated
Show resolved
Hide resolved
pipeline_components/aiplatform/aiplatform/custom_train_job/component.py
Outdated
Show resolved
Hide resolved
requirements=requirements, | ||
model_serving_container_image_uri=serving_container_uri, | ||
) | ||
cmd_args = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should be less prescriptive with the command-line arguments. Ideally these would be provided as a list by the user as input to the component (but I see that is tricky given that it contains artifact paths). Could we output the paths as strings from previous components, construct the args in the pipeline definition and then pass into this components as args: List[str]
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unfortunately can't use op outputs (or pipeline params) in nested objects, leads to compilation error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested:
train_dataset_uri = (
extract_bq_to_dataset(
#...
)
.after(data_cleaning)
.set_display_name("Extract train data to storage")
).outputs['dataset_gcs_uri']
train_args = [
"--train_data", train_dataset_uri,
# ...
]
train_model = custom_train_job(
train_script_uri=train_script_uri,
args=train_args,
# ...
).set_display_name("Train model")
Error: TypeError: Object of type PipelineParam is not JSON serializable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
another option - pass in args
as a string instead of List[str]
? I think this would then work
eval_challenger = aip.model_evaluation.ModelEvaluation(challenger_evaluation) | ||
metrics_champion = MessageToDict(eval_champion._gca_resource._pb)["metrics"] | ||
metrics_challenger = MessageToDict(eval_challenger._gca_resource._pb)["metrics"] | ||
metrics_challenger[eval_metric] -= 0.001 # TODO fake |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't forget this one!
pipeline_components/aiplatform/aiplatform/update_best_model/component.py
Outdated
Show resolved
Hide resolved
@@ -26,7 +26,7 @@ steps: | |||
mkdir -p ${COMMIT_SHA}/prediction/assets && \ | |||
cp -r pipelines/pipelines/${_PIPELINE_TEMPLATE}/training/assets ${COMMIT_SHA}/training/ && \ | |||
cp -r pipelines/pipelines/${_PIPELINE_TEMPLATE}/prediction/assets ${COMMIT_SHA}/prediction/ && \ | |||
gsutil cp -r ${COMMIT_SHA} ${_PIPELINE_PUBLISH_GCS_PATH} | |||
gsutil cp -r ${COMMIT_SHA} ${_PIPELINE_PUBLISH_GCS_PATH}/${COMMIT_SHA} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@felix-datatonic are you sure about this? Won't this create a nested directory?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, tested successfully. in the prior case only the contents of ${COMMIT_SHA}
where copied to ${_PIPELINE_PUBLISH_GCS_PATH}
. feel free to test it different combinations and values in Cloud Build though.
Description
Add Vertex AI services:
Change of logic:
How has this been tested?
Checklist
Pipeline run links: