From e92cf2cdbfc80a0849f38354fcac46e77559d1ab Mon Sep 17 00:00:00 2001 From: Stefanni Date: Tue, 7 Apr 2020 19:00:20 -0400 Subject: [PATCH] Update diabetes_regression_build_train_pipeline.py --- .../pipelines/diabetes_regression_build_train_pipeline.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ml_service/pipelines/diabetes_regression_build_train_pipeline.py b/ml_service/pipelines/diabetes_regression_build_train_pipeline.py index dfe3f5b3..7fc9e783 100644 --- a/ml_service/pipelines/diabetes_regression_build_train_pipeline.py +++ b/ml_service/pipelines/diabetes_regression_build_train_pipeline.py @@ -59,11 +59,12 @@ def main(): # This call creates an example CSV from sklearn sample data. If you # have already bootstrapped your project, you can comment this line # out and use your own CSV. - create_sample_data_csv() + # Use a CSV to read in the data set. file_name = 'diabetes.csv' - + create_sample_data_csv(file_name) + if (not os.path.exists(file_name)): raise Exception("Could not find CSV dataset at \"%s\". If you have bootstrapped your project, you will need to provide a CSV." % file_name) # NOQA: E501