Skip to content
This repository was archived by the owner on Sep 25, 2026. It is now read-only.
This repository was archived by the owner on Sep 25, 2026. It is now read-only.

Exception: Could not find CSV dataset at "xyz.csv" after bootstrapping. #257

Description

@gdprtcl

Hi Team,

I tried to bootstrap the MLOps project to work with another Model. I put the CSV file inside the "data" folder and changed accordingly in customer_churn_build_train_pipeline.py

Screenshot 2020-04-08 at 2 48 06 PM

But I'm getting the Exception that it couldn't find the CSV file.
I have specified file_name = 'xyz.csv' and commented out the rest.

Activity

  1. gdprtcl commented on Apr 8, 2020

    @gdprtcl
    Author

    When I simply place the CSV file in the root of the project, it works. But, "data/xyz.csv" doesn't.

  2. eedorenko commented on Apr 8, 2020

    @eedorenko
    Contributor

    Hi Partha Mishra (@gdprtcl), in order to work with your data you need to create and configure a dataset as it is described here https://github.com/microsoft/MLOpsPython/blob/master/docs/custom_model.md#configure-training-data

  3. gdprtcl commented on Apr 10, 2020

    @gdprtcl
    Author

    The CSV file gets picked up and the dataset is configured (checked in AML Workspace) when I place my file outside in the root of my Project structure, not when inside the "data" folder.
    Eugene Fedorenko (@eedorenko)

  4. eedorenko commented on Apr 10, 2020

    @eedorenko
    Contributor
    1. Why should it be picked up from "data" folder? You are saying you specified "file_name = 'xyz.csv'" which means it's in the root folder.
    2. Originally CSV files in data folder are not used for training, they are used for the example showing how to test data quality. That's it.
    3. If there is no already configured dataset, it automatically generates diabetes.csv file, saves the file to the AML blob storage and configures a dataset for it.
    4. In order to work with your data (xyz.csv) you need to create and configure a dataset as it is described here https://github.com/microsoft/MLOpsPython/blob/master/docs/custom_model.md#configure-training-data
  5. gdprtcl commented on Apr 10, 2020

    @gdprtcl
    Author

    Eugene Fedorenko (@eedorenko) thanks for the inputs. I understand those.
    The intent was to make it work when it's present in the folder. Obviously, we could provide just the name and it gets picked up from the root folder.
    I had already tried with both file_name = 'xyz.csv' & file_name = 'data/xyz.csv'. Both didn't work.

    By this time, I made it work with a small code tweak for file_name in _build_train_pipeline.py

        if (dataset_name not in aml_workspace.datasets):
        # 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 = 'xyz.csv'
    
        file_name = os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir, "data", file_name))
        print(file_name)
        if (not os.path.exists(file_name)):
            raise Exception("Could not find CSV dataset at \"%s\"....)
    
  6. eedorenko commented on Apr 10, 2020

    @eedorenko
    Contributor

    Great that you made it working for you! However, if you are using your own data, this condition if (dataset_name not in aml_workspace.datasets): should return false for you, you are not supposed to use/modify code below it as you are not supposed to have data files in your code. Perhaps, we need to make comments on that in the code more clear and delete the data folder as it brings confusion.

  7. gdprtcl commented on Apr 11, 2020

    @gdprtcl
    Author

    Eugene Fedorenko (@eedorenko) Yes, exactly. That will definitely be better.

  8. linked a pull request that will close this issueUpdate docs and pipeline status badge #303on Jul 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    docdocumentation update needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions