repo for ML related projects and tests
note some steps may not yet exist or be implemented (e.g. check results directory) but left here for reference as this repo is improved.
To get started with a Python machine learning model, follow these steps:
Ensure you have the following installed:
- Python 3.8 or higher
- pip (Python package manager)
- Clone the repository:
git clone https://github.com/yourusername/devML.git cd devML - Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
- Install dependencies:
pip install -r requirements.txt
- Upgrade Packages
pip install pip-review pip-review # similar to `pip list --outdated` pip-review --auto #upgrade all because pip is not easy for this pip freeze > requirements.txt # update
- Install internal modules
Modules like
utilsare self contained modules that live within this project alone to help with helper methods like monitoring. This project follows a flat structure so it remains flexible to organizing. But custom modules likeutilsrequires treating this project like a package and install it on the python interpreter local to this project viavenvabove. Simply run:pip install -e .
Restart the notebook kernel. Then open a file using it such as explorations/utils_checks.ipynb and run the cell that imports it to test.
- Prepare your dataset and place it in the
data/directory. - Run the model script:
python src/train_model.py
- Check the output in the
results/directory.
- Modify
config.yamlto adjust model parameters. - Refer to the
docs/folder for detailed explanations of each module.