Skip to content
This repository was archived by the owner on Feb 6, 2023. It is now read-only.

Commit

Permalink
Notebooks updated
Browse files Browse the repository at this point in the history
  • Loading branch information
niall-turbitt committed Jul 25, 2022
1 parent 7643ab6 commit 238a988
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 17 deletions.
8 changes: 3 additions & 5 deletions notebooks/feature_table_creator.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

# COMMAND ----------

# DBTITLE 1,Pipeline Class
# DBTITLE 1,Pipeline Config
# Set FeaturizerConfig - data preparation config
featurizer_cfg = FeaturizerConfig(**pipeline_config['data_prep_params'])

Expand All @@ -64,11 +64,9 @@
feature_store_table_cfg=feature_store_table_cfg,
labels_table_cfg=labels_table_cfg)


# Instantiate pipeline
feature_table_creator_pipeline = FeatureTableCreator(cfg)

# COMMAND ----------

# DBTITLE 1,Execute Pipeline
# Instantiate pipeline
feature_table_creator_pipeline = FeatureTableCreator(cfg)
feature_table_creator_pipeline.run()
7 changes: 3 additions & 4 deletions notebooks/model_deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@

# COMMAND ----------

# DBTITLE 1,Pipeline Class
# DBTITLE 1,Pipeline Config
# Set MLflowTrackingConfig - comparison metrics logged to MLflow
mlflow_tracking_cfg = MLflowTrackingConfig(experiment_path=env_vars['model_deploy_experiment_path'],
run_name='staging_vs_prod_comparison',
Expand All @@ -79,10 +79,9 @@
comparison_metric=model_comparison_params['metric'],
higher_is_better=model_comparison_params['higher_is_better'])

# Instantiate pipeline
model_deployment_pipeline = ModelDeployment(cfg)

# COMMAND ----------

# DBTITLE 1,Execute Pipeline
# Instantiate pipeline
model_deployment_pipeline = ModelDeployment(cfg)
model_deployment_pipeline.run()
8 changes: 4 additions & 4 deletions notebooks/model_inference_batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

# COMMAND ----------

# DBTITLE 1,Pipeline Class
# DBTITLE 1,Pipeline Config
# Fetch model_uri
model_name = env_vars['model_name']
model_registry_stage = pipeline_config['mlflow_params']['model_registry_stage']
Expand All @@ -58,12 +58,12 @@
predictions_table_name = f'{predictions_table_database_name}.{env_vars["predictions_table_name"]}'
print(f'predictions_table_name: {predictions_table_name}')

# COMMAND ----------

# DBTITLE 1,Execute Pipeline
# Instantiate model inference pipeline
model_inference_pipeline = ModelInference(model_uri=model_uri,
input_table_name=input_table_name,
output_table_name=predictions_table_name)

# COMMAND ----------

# DBTITLE 1,Execute Pipeline
model_inference_pipeline.run_and_write_batch(mode=pipeline_config['data_output']['mode'])
7 changes: 3 additions & 4 deletions notebooks/model_train.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

# COMMAND ----------

# DBTITLE 1,Pipeline Class
# DBTITLE 1,Pipeline Config
# Set MLflowTrackingConfig
mlflow_tracking_cfg = MLflowTrackingConfig(run_name=pipeline_config['mlflow_params']['run_name'],
experiment_path=env_vars['model_train_experiment_path'],
Expand Down Expand Up @@ -75,10 +75,9 @@
env_vars=env_vars # Track env_vars to mlflow
)

# Instantiate pipeline
model_train_pipeline = ModelTrain(cfg)

# COMMAND ----------

# DBTITLE 1,Execute Pipeline
# Instantiate pipeline
model_train_pipeline = ModelTrain(cfg)
model_train_pipeline.run()

0 comments on commit 238a988

Please sign in to comment.