ciselab / code2seq-codesearchnet

Placeholder for the second experiment from "Comment or not to Comment" BSc Project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Comment Experiment: Documentation Generation with CodeSearchNet

This is the repository to run the experiment of code2seq on CodeSearchNet dataset for the task of Documentation Generation.

Running the experiment

  • First clone the repository recursively:
git clone git@github.com:ciselab/code2seq-codesearchnet.git --recursive
  • Make sure you have nvidia-container-toolkit installed, this will allow your Docker containers to access your Nvidia card:
pamac install nvidia-container-toolkit

(switch pamac for a package manager that your distribution uses). If your Nvidia card still doesn't work, some troubleshooting can be found here and here.

  • To run the experiments, please first run (maybe as root) prepare.sh or prepare_minimal.sh. This will download and prepare the full and minimal datasets, respectively:
bash prepare.sh
bash prepare_minimal.sh
  • Then cd into the experiments folder. Here you will find 5 different experiments, each with a different setup. You can change the training hyperparameters in config.py. Run the experiment by running:
docker-compose up

To run all experiments in the background, do

nohup bash runner.sh > code2seq-funcom.log &

Warning! If you hit the rate limits on Nvidia Docker image downloads, you might start getting an 401 Unauthorized error when trying to download the Docker image. If that happens, please follow this guide to register and login through your Nvidia account.

About

Placeholder for the second experiment from "Comment or not to Comment" BSc Project


Languages

Language:Python 97.2%Language:Shell 2.8%