Project Board, Current Issues, Assignment
Group 2 - Final Project for the UTK Machine Learning Course (COSC-522)
All the libraries are located under <project root>/project_libs
- <project root>/project_libs/project: This project's code
- <project root>/project_libs/configuration: Class that creates config objects from yml files
- <project root>/project_libs/fancy_logger: Logger that can be used instead of prints for text formatting (color, bold, underline etc)
- Main Notebook
- Place the preprocessing functions/classes in <project root>/project_libs/project/preprocessing.py
- The models in <project root>/project_libs/project/models.py
- Any plotting related functions in <project root>/project_libs/project/plotter.py
The code is reloaded automatically. Any class object needs to reinitialized though.
- About
- Prerequisites
- Bootstrap Project
- Running the code using Jupyter + Configuration + Local Jupyter + Google Collab
- Adding New Libraries
- License
You need to have a machine with Python >= 3.8 and any Bash based shell (e.g. zsh) installed. Having installed conda is also recommended.
$ python3.8 -V
Python 3.8
$ echo $SHELL
/usr/bin/zsh
All the installation steps are being handled by the Makefile.
If you want to use conda run:
$ make install
$ conda activate accident_severity_prediction
If you want to use venv run:
$ make install env=venv
To download the project:
- If you have a ssh key saved in your GitHub account (instructions):
$ git clone git@github.com:UTK-ML-Dream-Team/accident-severity-prediction.git
- If you haven't set up an ssh key:
$ git clone https://github.com/UTK-ML-Dream-Team/accident-severity-prediction.git
To push your local changes to remote repository:
- For every file you changed do:
$ git add path-to-file-1
$ git add path-to-file-2
# ...
- Create a commit message
$ git commit -m "My commit message"
- Push your changes to GitHub
$ git fetch
$ git pull
$ git push origin master
To pull changes from GitHub
$ git pull
Resolve conflicts:
# Install nbdime and run:
$ nbdime config-git --enable --global
You may need to configure the yml file. There is an already configured yml file under confs/prototype1.yml.
First, make sure you are in the correct virtual environment:
$ conda activate accident_severity_prediction
$ which python
/home/<your user>/anaconda3/envs/accident_severity_prediction/bin/python
To use jupyter, first run jupyter
:
jupyter notebook
And open the main.ipynb.
Just Open this Google Collab Link.
If you want to add a new library (e.g. a Class) in the project you need to follow these steps:
- Go to "<project root>/project_libs/project"
- Create a new python file inside it with a name like my_module.py
- Paste your code inside it
- Go to project_libs/project/init.py
- Add the following line:
from project_libs.project/<Module name> import *
- (Optional) Rerun
make install
orpython setup.py install
This project is licensed under the MIT License - see the LICENSE file for details.