Skip to content

Project repo containing the code developed for the course "Computational Intelligence Lab" held at ETH Zurich

License

Notifications You must be signed in to change notification settings

AlessandroRuzzi/Computational-Intelligence-Lab

Repository files navigation

Computational-Intelligence-Lab-2021

Repository for the Computational Intelligence Lab course project at ETH Zurich

How to reproduce results

Step 1: Clone the repository:

git clone https://github.com/AlessandroRuzzi/Computational-Intelligence-Lab-2021

Step 2: Copy new .env file and modify it by adding your environment variables:

cp .env.tmp .env 
vim .env 

Example of .env file:

COMET_API_KEY=Your Key
COMET_WORKSPACE=alessandroruzzi
KAGGLE_USERNAME=alessandroruzzi
KAGGLE_KEY=Your kaggle Key
GOOGLE_MAPS_API_KEY= leave this blank

Step 3: Create virtual environment called venv:

python -m venv venv

Step 4: Run the script to install modules, activate virtual environment, and install packages from requirements.txt:

source ./leonhard_init.sh

Step 5: Open the file configs/config.yaml and insert your eth username at line 10.

Step 6: Train the model on experiment 14 without Google API:

 bsub -W 24:00 -R "rusage[mem=64000, ngpus_excl_p=1]" -R "select[gpu_mtotal0>=10240]" python3 ./run.py +experiment=exp__f014

Step 7: Train the model on experiment 15 without Google API:

 bsub -W 24:00 -R "rusage[mem=64000, ngpus_excl_p=1]" -R "select[gpu_mtotal0>=10240]" python3 ./run.py +experiment=exp__f015

Step 8: Add the Google API key in the .env file (you can find it in the CMT3 submission's comment)

COMET_API_KEY=Your Key
COMET_WORKSPACE=alessandroruzzi
KAGGLE_USERNAME=alessandroruzzi
KAGGLE_KEY=Your kaggle Key
GOOGLE_MAPS_API_KEY= PUT THE API KEY HERE

Step 9: Train the model on experiment 14:

 bsub -W 24:00 -R "rusage[mem=64000, ngpus_excl_p=1]" -R "select[gpu_mtotal0>=10240]" python3 ./run.py +experiment=exp__f014

Step 10: Download the predictions from comet, you will find a file called submission.csv in the comet section called Assets & Artifacts, inside the folder others.

Step 11: Combine the predictions with the run_ensemble.py script (replace file1, file2 and file3 with the actual CSV files' paths):

 python3 ./run_ensemble.py file1,file2,file3 

How to run on Leonhard Cluster

  1. Clone repository into cluster.

  2. Copy new .env file and modify it by adding your environment variables:

cp .env.tmp .env 
vim .env 
  1. Make leonhard_init.sh executable:
chmod +x leonhard_init.sh
  1. Create virtual environment called venv:
python -m venv venv
  1. Run leonhard_init.sh to install modules, activate virtual environment, and install packages from requirements.txt:
./leonhard_init.sh
  1. Run model on a single GPU:
bsub -R "rusage[ngpus_excl_p=1]" ./run.py trainer.gpus=1

Download from cluster

The following command will download a zipped prediction into your current local folder.

scp your_username@login.leonhard.ethz.ch:/Computational-Intelligence-Lab-2021/preds/DATE/preds.zip .

About

Project repo containing the code developed for the course "Computational Intelligence Lab" held at ETH Zurich

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •