Skip to content

Instantly share code, notes, and snippets.

@Geremie
Created December 16, 2020 10:24
Show Gist options
  • Save Geremie/b085ef909b2e39f7645a71eac64aab95 to your computer and use it in GitHub Desktop.
Save Geremie/b085ef909b2e39f7645a71eac64aab95 to your computer and use it in GitHub Desktop.
Automate your ML model retraining with Kubeflow
def store_training_job_metrics_op(project_id: str, metrics_file_path: str, model_name: str, model_folder: str):
return dsl.ContainerOp(
name='store-training-job-metrics',
image='gcr.io/{}/taxi-fare-utils:1.0'.format(project_id),
command=['python3', '-m', 'metrics_writer'],
arguments=[
'--metrics_file_path', metrics_file_path,
'--model_name', model_name,
'--model_folder', model_folder
]
)
store_training_job_metrics_task = store_training_job_metrics_op(
project_id,
dsl.InputArgumentPath(download_blob_task.output),
MODEL_NAME,
model_folder)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment