A colleague has started a new ML project at /root/code/fraud-detection/, but the layout does not match the xFusionCorp Industries standard. Bring the project in line with the team’s conventions.
Inspect the existing project at /root/code/fraud-detection/.
The final layout must match the tree below exactly:
fraud-detection/
├── data/
│ ├── raw/
│ └── processed/
├── models/
├── notebooks/
├── src/
│ ├── data/
│ ├── features/
│ ├── models/
│ └── utils/
├── tests/
├── configs/
├── requirements.txt
└── README.md
Every subdirectory under src/ must contain an __init__.py file so that Python recognises it as a package.
requirements.txt must list the following dependencies, one per line: scikit-learn, pandas, numpy, and mlflow. The canonical PyPI name for the scikit-learn package is scikit-learn.
README.md must begin with the heading # fraud-detection.
Review the existing project and correct everything that does not match the requirements above.
Updated Readme.md according to task 5:
# fraud-detection
According to required files structures
raw and processed is missing under data directory.tests and configs directory is also missing mkdir -p fraud-detection/data/{raw,processed}
mkdir -p fraud-detection/{tests,configs}
In my case, I found two directories name was wrong (util and feature). Lets rename those directories:
mv fraud-detection/src/feature fraud-detection/src/features
mv fraud-detection/src/util fraud-detection/src/utils
For task 3, just inspect and make sure each sub directory has __init__.py under src/ directory. If anyone is missing, then you can create with these commands accordingly.
touch fraud-detection/src/data/__init__.py
touch fraud-detection/src/features/__init__.py
touch fraud-detection/src/models/__init__.py
touch fraud-detection/src/utils/__init__.py
Updated requirements.txt file based on the packages that are required to be listed.
echo -e "scikit-learn\npandas\nnumpy\nmlflow" > fraud-detection/requirements.txt