-
Create a new conda environment.
-
Install PyTorch.
-
As you work on the project, you will end up installing many more packages.
After activating your conda environment, run the following command:
python main.py
This notebook will walk you through setting the skeleton code up on Google Colab.
Note: Google Colab may terminate your session after a few hours, so it may be a better idea to run your code on Kaggle (see below).
This notebook will walk you through setting the skeleton code up on Kaggle.
Note: The instructions in this section may not be completely accurate. If there are any mistakes, please let us know!
-
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 "https://github.com/uclaacmai/projects-skeleton-code"
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.
-
Go to kaggle.com and create an account.
-
Join either the Cassava leaf or Humpback whale competition.
-
In the data tab, you should be able to download the data as a zip file.
-
Install the Kaggle API:
pip install kaggle
If you're on Mac or Linux, you may have to run:
pip install --user kaggle
-
Copy the
kaggle.json
file to the location~/.kaggle/kaggle.json
(orC:\Users\<Windows-username>\.kaggle\kaggle.json
if you are on Windows). -
Download the zipped dataset.
# Use humpback-whale-identification for 🐋 dataset kaggle competitions download -c cassava-leaf-disease-classification