CodeProject.AI Module creation: A full walkthrough in Python
The full walkthrough of a bare bones module for CodeProject.AI using Python
When I run train_pipeline.py
:
from zenml import pipeline
from steps.ingest_data import ingest_df
from steps.clean_data import clean_df
from steps.model_train import train_model
from steps.evaluation import evaluate_model
@pipeline
def train_pipeline(data_path: str):
df = ingest_df(data_path)
clean_df(df)
train_model(df)
evaluate_model(df)
I am getting an error:
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ Traceback (most recent call last) โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ path\to\file\pipelines\training_pipeline.py:2 in <module> โ
โ โ
โ 1 from zenml import pipeline โ
โ โฑ 2 from steps.ingest_data import ingest_df โ
โ 3 from steps.clean_data import clean_df โ
โ 4 from steps.model_train import train_model โ
โ 5 from steps.evaluation import evaluate_model โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
ModuleNotFoundError: No module named 'steps'
โโโ Parent-Directory/
โโโ idea
โโโ .zen
โโโ data/
โ โโโ data.csv
โโโ pipelines/
โ โโโ training_pipeline.py
โโโ saved_models/
โโโ src/
โ โโโ steps/
โ โ โโโ __pycache__
โ โ โโโ __init__.py
โ โ โโโ clean_data.py
โ โ โโโ evaluation.py
โ โ โโโ ingest_data.py
โ โ โโโ model_train.py
โโโ venv/
โโโ __init__.py
โโโ .gitignore
โโโ LICENSE
โโโ README.md
โโโ run_pipeline.py
This is my directory structure.
I added the path in sys.path
. I can see the path after I have added the path.
Still getting the same error
Python version - 3.10.11 Windows version - 11