Project for the Deep Learning class
Public page: https://deepfrench.gitlab.io/deep-learning-project
Repo page: https://gitlab.com/DeepFrench/deep-learning-project
There are two ways to train the model: either use the training
script, or use Google Cloud ML-Engine AI Platform.
From a fresh AWS/Google Cloud Compute instance, run the following to install everything:
bash <(curl -s https://deepfrench.gitlab.io/deep-learning-project/install.sh)
Then, just run the following:
conda activate python3-dl
python trainer.py
Feel free to modify at your convenience the training configuration located in trainer.py
.
Just edit and run the train-on-google-cloud.sh
script.
You'll need to update PROJECT_ID
and BUCKET_ID
.
Make sure the bucket exists before running the script!
The script will create a Docker container with the code,
push it to Google Cloud Container Registry, and submit a
training task on AI Platform to tune hyperparameters according
to the configuration file you select in google_cloud_jobs/
.
Documentation:
- Using Hyperparameter Tuning
- HyperParameter Spec Documentation
- Hyperparameter tuning in Cloud Machine Learning Engine using Bayesian Optimization (Blog post)
Install git lfs
(on macOS: brew install git-lfs
), and then run:
git lfs install
If you installed git-lfs
after cloning the repo, you can use the following command to download LFS files:
git lfs fetch
git lfs pull
If you set up a virtual environment and store it in the root folder, make sure
not to add it to git to name it like one of those options in the .gitignore
:
env/
venv/
ENV/
env.bak/
venv.bak/
pip install -r requirements.txt
To run all tests with test discovery:
python -m unittest