Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ML/DL Project Structure

This project is packaged under src/mldl, so new course files should live inside that package rather than directly under src.

File Map

src/
`-- mldl/
    |-- __init__.py
    |-- logger.py
    |-- exception.py
    |-- utils.py
    |-- components/
    |   |-- __init__.py
    |   |-- data_ingestion.py
    |   |-- data_transformation.py
    |   `-- model_trainer.py
    `-- pipeline/
        |-- __init__.py
        |-- train_pipeline.py
        `-- predict_pipeline.py

Why Each File Exists

File Purpose
logger.py Central logging setup so every module reports what it is doing.
exception.py Custom error handling so failures are easier to trace and debug.
utils.py Shared helper functions that do not belong to one specific pipeline stage.
components/data_ingestion.py Reads raw data from a source and saves or returns it in a usable form.
components/data_transformation.py Cleans data, encodes features, splits sets, and prepares inputs for training.
components/model_trainer.py Trains the model and usually stores the trained artifact and metrics.
pipeline/train_pipeline.py Orchestrates the end-to-end training flow by calling the components in order.
pipeline/predict_pipeline.py Loads trained artifacts and runs predictions on new input data.

Dependency Rule

Try to keep the project moving in this direction:

pipeline -> components -> shared helpers

That means:

  • pipeline/ coordinates work.
  • components/ performs ML tasks.
  • logger.py, exception.py, and utils.py support the rest of the code.

Learning Note

The diagram helps with orientation. Practice is what makes it stick.

The useful rhythm is:

  1. Read the chart.
  2. Create one file.
  3. State its responsibility in one sentence.
  4. Add the smallest working code.
  5. Run it and inspect what breaks.

That loop is better than copying a whole project structure without understanding the boundaries.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages