-
Create a new conda environment. (Follow instructions given to you by officers or refer to the Conda reference doc.)
-
Install PyTorch. Go to https://pytorch.org/. Then, scroll down to 'Install Pytorch' and select the right configuration for your machine. Lastly, copy the command that is provided and run it when you have the correct Conda environment activated.
-
As you work on the project, you will end up installing many more packages.
After activating your conda environment, run the following command:
conda activate <NAME OF ENVIRONMENT>
python main.py
This notebook will walk you through setting the skeleton code up on Google Colab. Remember to make a copy!
Note: Google Colab may terminate your session after a few hours, so be careful. Consider adding torch.save to your training loop to save model weights regularly.
This notebook will walk you through setting the skeleton code up on Kaggle.
-
Navigate to the code tab of the Kaggle competition. Click on the "New Notebook" button to create a new notebook. The dataset should be automatically loaded in the
/kaggle/input
folder. -
To use the GPU, click the three dots in the top-right corner and select Accelerator > GPU.
-
To access your code, run the following command (replacing the URL):
!git clone "<my-github-repo-url-here>"
This should clone your repository into the
/kaggle/working
folder. -
Change directories into your repository by running the command:
cd <name of your repository>
-
You should now be able to import your code normally. For instance, the following code will import the starting code:
import constants from datasets.StartingDataset import StartingDataset from networks.StartingNetwork import StartingNetwork from train_functions.starting_train import starting_train
-
If you want your code to run without keeping the tab open, you can click on "Save version" and commit your code. Make sure to save any outputs (e.g. log files) to the
/kaggle/working
, and you should be able to access them in the future.
IMPORTANT: If you want to pull new changes in the Kaggle notebook, first run !git pull
, and then RESTART your notebook (Run > Restart & clear all outputs).
-
Go to kaggle.com and create anaccount.
-
Join either the Quora NLP Competition.
-
In the data tab, you should be able to download the data as a zip file.