# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# # MLOps on GCP Demo

# ### List pipelines

# +
INVERSE_PROXY_HOST='1ff32660e53f5d89-dot-us-central1.notebooks.googleusercontent.com'

# !kfp --endpoint $INVERSE_PROXY_HOST pipeline list
# -

# ### Submit KFP pipeline run

# +
PIPELINE_ID='f8b7f150-e92f-4e3c-a46e-133a5832267a'

PROJECT_ID='mlops-demo'
STAGING_GCS_BUCKET='gs://mlops-demo-lab-11'
RUN_NAME="Training_Run_001"
EXPERIMENT_NAME='Covertype_Classifier_Training'

# !kfp --endpoint $INVERSE_PROXY_HOST run submit \
# -e $EXPERIMENT_NAME \
# -r $RUN_NAME \
# -p $PIPELINE_ID \
# project_id=$PROJECT_ID \
# gcs_root=$STAGING_GCS_BUCKET \
# region=us-central1 \
# source_table_name=lab_11.covertype \
# dataset_id=splits \
# evaluation_metric_name=accuracy \
# evaluation_metric_threshold=0.69 \
# model_id=covertype_classifier \
# version_id=v0.1 \
# replace_existing_version=True
# -

# ### Submit TFX pipeline run

# +
PIPELINE_ID='48b0c023-b881-4ee1-9119-4b479998f142'

EXPERIMENT_NAME='Popularity_Predictor_Training'
RUN_NAME='Training_Run_1'

# !kfp --endpoint $INVERSE_PROXY_HOST run submit \
# -e $EXPERIMENT_NAME \
# -r $RUN_NAME \
# -p $PIPELINE_ID
# -



StarcoderdataJupyterScriptsDedupFiltered