Git Product home page Git Product logo

neurips2019_disentanglement_challenge_starter_kit's Introduction

AIcrowd-Logo

NeurIPS 2019 : Disentanglement Challenge Starter Kit

gitter-badge

Instructions to make submissions to the NeurIPS 2019 : Disentanglement Challenge.

Participants will have to submit their code, with packaging specifications, and the evaluator will automatically build a docker image and execute their code against a series of secret datasets.

Setup

  • Anaconda (By following instructions here) At least version 4.5.11 is required to correctly populate environment.yml.
  • Create your new conda environment
conda create python=3.6 --name disentanglement_challenge
conda activate disentanglement_challenge
  • Your code specific dependencies
# If say you want to install PyTorch
conda install pytorch torchvision -c pytorch

Clone repository

git clone [email protected]:AIcrowd/neurips2019_disentanglement_challenge_starter_kit.git
cd neurips2019_disentanglement_challenge_starter_kit
pip install -r requirements.txt

Download and Prepare Dataset

Follow the instructions here to download the publicly available datasets, and store them inside ./scratch/datasets folder. Please ensure that the datasets are not checked into the repository.

Train and Test Submission locally with Tensorflow / Pytorch / Numpy

Setup

The first three steps apply to all frameworks.

# Step 1:
cd neurips2019_disentanglement_challenge_starter_kit

# Step 2: 
# Make sure that your datasets live in "./scatch/dataset". 
# If they do not, either make sure they do (recommended)
# or change train_environ.sh accordingly. Finally:
source train_environ.sh

# Step 3:
# Enter the name of your experiment
export AICROWD_EVALUATION_NAME=myvae
# Enter the name of the dataset
export AICROWD_DATASET_NAME=cars3d

PyTorch

# Step 4 (PyTorch): 
# Train a VAE with Pytorch
python pytorch/train_pytorch.py

Take a look at the python file for available commandline arguments.

Tensorflow

# Step 4 (TensorFlow)
# Train a VAE with TF and disentanglement_lib 
python tensorflow/train_tensorflow.py

Note: This is just a test submission which will only train for 10 steps (to keep training time short). To attain reasonable performance, about 300'000 training steps are recommended. This setting can be changed in tensorflow/model.gin.

NumPy

# Step 4 (NumPy): 
# This saves a hard-coded representation function to file.
python numpy/train_numpy.py

Evaluation

Finally, it's time to run the evaluation locally. This script will detect what framework you used, provided you used the right utility functions for PyTorch or NumPy (links lead to examples).

Step 5:
# Run the local evaluation
python local_evaluation.py

How do I specify my software runtime ?

The software runtime is specified by exporting your conda env to the root of your repository by doing :

conda env export --no-build > environment.yml

# It might make sense here to remove the requirements.txt here to avoid confusion as environment.yml takes precedence over requirements.txt

This environment.yml file will be used to recreate the conda environment. This repository includes an example environment.yml

What should my code structure be like ?

Please follow the structure documented in the included train.py to adapt your already existing code to the required structure for this round.

Important Concepts

Repository Structure

  • aicrowd.json Each repository should have a aicrowd.json with the following content :
{
  "challenge_id": "aicrowd-neurips-2019-disentanglement-challenge",
  "grader_id": "aicrowd-neurips-2019-disentanglement-challenge",
  "authors": ["your-aicrowd-username"],
  "description": "sample description about your awesome agent",
  "license": "MIT",
  "gpu": true
}

This is used to map your submission to the said challenge, so please remember to use the correct challenge_id and grader_id as specified above.

Please specify if your code will a GPU or not for the evaluation of your model. If you specify true for the GPU, a NVIDIA Tesla K80 GPU will be provided and used for the evaluation.

Packaging of your software environment

The recommended way is to use Anaconda configuration files using environment.yml files.

# The included environment.yml is generated by the command below, and you do not need to run it again
# if you did not add any custom dependencies

conda env export --no-build > environment.yml

# Note the `--no-build` flag, which is important if you want your anaconda env to be replicable across all
# Or if you have a rather simple softwar runtime, then even a :
#
# pip freeze > requirements.txt
#
# could work.

Code Entrypoint

The evaluator will use /home/aicrowd/run.sh as the entrypoint, so please remember to have a run.sh at the root, which can instantitate any necessary environment variables, and also start executing your actual code. This repository includes a sample run.sh file. If you are using a Dockerfile to specify your software environment, please remember to create a aicrowd user, and place the entrypoint code at run.sh.

Frequently Asked Questions (FAQs)

Please find a list of frequently asked questions here, and please feel free to send a pull request with more questions that you think can help other participants.

Submission

To make a submission, you will have to create a private repository on https://gitlab.aicrowd.com/.

You will have to add your SSH Keys to your GitLab account by following the instructions here. If you do not have SSH Keys, you will first need to generate one.

Then you can create a submission by making a tag push to your repository on https://gitlab.aicrowd.com/. Any tag push (where the tag name begins with "submission-") to your private repository is considered as a submission
Then you can add the correct git remote, and finally submit by doing :

cd neurips2019_disentanglement_challenge_starter_kit
# Add AIcrowd git remote endpoint
git remote add aicrowd [email protected]:<YOUR_AICROWD_USER_NAME>/neurips2019_disentanglement_challenge_starter_kit.git
git push aicrowd master

# Create a tag for your submission and push
git tag -am "submission-v0.1" submission-v0.1
git push aicrowd master
git push aicrowd submission-v0.1

# Note : If the contents of your repository (latest commit hash) does not change,
# then pushing a new tag will **not** trigger a new evaluation.

You now should be able to see the details of your submission at : gitlab.aicrowd.com/<YOUR_AICROWD_USER_NAME>/neurips2019_disentanglement_challenge_starter_kit/issues

NOTE: Remember to update your username in the link above ๐Ÿ˜‰

In the link above, you should start seeing something like this take shape (each of the steps can take a bit of time, so please be patient too ๐Ÿ˜‰ ) :

and if everything works out correctly, then you should be able to see the final scores like this :

Best of Luck ๐ŸŽ‰ ๐ŸŽ‰

Author

Sharada Mohanty

neurips2019_disentanglement_challenge_starter_kit's People

Contributors

nasimrahaman avatar sobalgi avatar spmohanty avatar waleedgondal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

neurips2019_disentanglement_challenge_starter_kit's Issues

git problem

Hi,

after I run git remote add aicrowd [email protected]:xxx/neurips2019_disentanglement_challenge_starter_kit.git

then I run:
git push aicrowd master

there is error:

Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Thanks

Error response from daemon

Hi,

I have this error when I run ./docker_run.sh :

docker: Error response from daemon: OCI runtime create failed: container_linux.go:345: starting container process caused "process_linux.go:430: container init caused "process_linux.go:413: running prestart hook 0 caused \"error running hook: exit status 1, stdout: , stderr: exec command: [/usr/bin/nvidia-container-cli --load-kmods configure --ldconfig=@/sbin/ldconfig.real --device=all --compute --utility --require=cuda>=10.0 brand=tesla,driver>=384,driver<385 brand=tesla,driver>=410,driver<411 --pid=40366 /var/lib/docker/overlay2/f28bf6a755ea9f33ff917afb7f5e3d187b66db9fbefcaa73d939ba34b913e6fb/merged]\\nnvidia-container-cli: requirement error: unsatisfied condition: brand = tesla\\n\""": unknown.

How Can I fix it,
OS: ubuntu 16.04
GPU: titan v

Thanks

Memory usage increases causing system freeze

I followed the installation steps and wanted to try a Test Submission locally. I ran just the ./build.sh script and I can see my memory (RAM) usage increase steadily, ultimately running out of memory and causing the system to hang.

License?

We are planning to create our-own lib for disentanglement representation learning (The lib is not for the challenge).
Our lib is based on this repository a bit, but I could not find the license file.

Do you have any license for this repo?
It is very helpful if your license allows us to modify and re-distribute this repo.
Thank you in advance!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.