A centralized pattern for creating Machine Learning pipelines
pip install kabbes_ml_pipeline
Contains a host of tools for standardizing the format of machine learning pipelines. Provides methods for querying databases, cleaning data, preprocessing data, model operations, exporting results, and more. Each machine learning project is a "child" of this template, with the ability to overwrite any of the default class attributes/methods.
Read this high-level overview is necessary to understand how the package operates.
Code Hierarchy
Models → Model → Input_Files → Input_File → Features → Feature
Each point in the hierarchy has certain methods and attributes associated with it. These methods give you the functionality for operating the pipeline.
For more in-depth documentation, read the information provided on the Pages. Or better yet, read the source code.
- Navigate to a directory in command prompt
cd C:/Path/to/Repo
- Call the package's main script
python -m ml_pipeline
- Run
python main_XYZ.py
This opens the Models options screen, along with the options for the "Models" class instance. - To navigate one level down to a Model, select the option "Open Model"
- Select a Model from the list.
- Now in the Model options screen, press enter to navigate back up to Models.
- You can navigate from Models->Model->Input_Files->Input_File->Features->Feature and all the way back up.
- Option 1 shows "Open XXXXX" to navigate to the next level down in the tree.
- Press enter to exit back up to the previous level.
python main_XYZ.py
- At the Models options screen, select "Open Model".
- Select any Model from the list (this selection does not matter)
- In the Model options screen, select "Open Input Files".
- Select the first option.
- In the Input Files options screen, select "Open Input File"
- Select the Input File for which you would like to query new data.
- In the Input File options screen, select "Query from Source Database"
- Follow steps (1-7) from "Query new Raw Data" to get to the Input File of interest.
- In the Input File options screen, select "Move from Query Staging"
- Follow steps (1-7) from "Query new Raw Data" to get to the Input File of interest.
- In the Input File options screen, select "Clean Raw Dataset"
python main_XYZ.py
- At the Models options screen, select the option for "Open Model"
- Select the Model you would like to run
- In the Model options screen, select the option for "Run Pipeline"
python main_XYZ.py
- At the Models options screen, select the option for "Run Models"
James Kabbes