Great!! We are always on the lookout for more contributors to our code base.
Firstly, if you are unsure or afraid of anything, just ask or submit the issue or pull request anyways. You won’t be yelled at for giving your best effort. The worst that can happen is that you’ll be politely asked to change something. We appreciate any sort of contributions and don’t want a wall of rules to get in the way of that.
However, for those individuals who want a bit more guidance on the best way to contribute to the project, read on. This document will cover all the points we’re looking for in your contributions, raising your chances of quickly merging or addressing your contributions.
Looking for a quickstart, get acquainted with our Get Started guide.
There are a few simple guidelines that you need to follow before providing your hacks.
When raising issues, please specify the following:
Setup details needs to be filled as specified in the issue template clearly for the reviewer to check.
A scenario where the issue occurred (with details on how to reproduce it).
Errors and log messages that are displayed by the software.
Any other details that might be useful.
We actively welcome pull requests.
However, if you’re adding any significant features (e.g. > 50 lines), please make sure to discuss with maintainers about your motivation and proposals in an issue before sending a PR. This is to save your time so you don’t spend time on a PR that we’ll not accept.
We do not always accept new features, and we take the following factors into consideration:
-
Whether the same feature can be achieved without modifying DS2. DS2 is designed so that you can implement many extensions from the outside, e.g. those in projects.
- If some part of DS2 is not extensible enough, you can also bring up a more general issue to improve it. Such feature request may be useful to more users.
-
Whether the feature is potentially useful to a large audience (e.g. an impactful detection paper, a popular dataset, a significant speedup, a widely useful utility), or only to a small portion of users (e.g., a less-known paper, an improvement not in the object detection field, a trick that’s not very popular in the community, code to handle a non-standard type of data)
- Adoption of additional models, datasets, new task are by default not added to DS2 before they receive significant popularity in the community. We sometimes accept such features in projects/, or as a link in projects/README.md.
-
Whether the proposed solution has a good design / interface. This can be discussed in the issue prior to PRs, or in the form of a draft PR.
-
Whether the proposed solution adds extra mental/practical overhead to users who don’t need such feature.
-
Whether the proposed solution breaks existing APIs.
Head over to issues to find issues where help is needed from contributors. You can find issues tagged with ‘good-first-issue’ or ‘help-wanted’ to contribute in.
A person looking to contribute can take up an issue by claiming it as a comment/assign their Github ID to it. In case there is no PR or update in progress for a week on the said issue, then the issue reopens for anyone to take up again. We need to consider high priority issues/regressions where response time must be a day or so.
We follow PEP8 for Python code and naming conventions, do try to adhere to the same when making a pull request or making a change. One can also take the help of linters such as flake8 or pylint.
For docstrings, please refer to numpydoc docstring guide and pandas docstring guide.
Our documentation is built with swagger.
For links, please consider using relative paths first. However, if the documentation is written in Markdown format, and:
It’s an image link which needs to be formatted with embedded html grammar, please use global URL like https://user-images.githubusercontent.com/44491713/51381727-e3d0f780-1b4f-11e9-96ab-d26b9198ba65.png, which can be automatically generated by dragging picture onto Github Issue Box.
This Setup guide is based on nvidia/cuda:11.4.1-cudnn8-devel-ubuntu18.04 docker container. You can also try without docker container.
mkdir ds2ai
cd ds2ai
wget https://assetdslab.s3.ap-southeast-1.amazonaws.com/contributing/docker-compose.yml
sudo docker-compose up -d
sudo docker exec -it ds2ai-container-contribute /bin/bash
apt update
# INSTALL DEPENDENCIES
apt install -y wget curl vim systemd git redis-server default-jre mysql-server xvfb
service mysql start
mysql_secure_installation # SET PASSWORD: dslabglobal
mysql
# RUN FOLLOWING COMMENDS
# mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'dslabglobal';
# mysql> create user 'root'@'%' identified by 'dslabglobal';
# mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION;
# mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
# mysql> CREATE SCHEMA astore DEFAULT CHARACTER SET utf8;
# mysql> FLUSH PRIVILEGES;
# mysql> quit
cd /tmp
curl -fsSL https://www.mongodb.org/static/pgp/server-4.4.asc | apt-key add -
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.4 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-4.4.list
apt-get update
apt-get install -y mongodb-org
vi /etc/init.d/mongod
# copy and paste : https://github.com/mongodb/mongo/blob/master/debian/init.d
:wq
chmod 755 /etc/init.d/mongod
service mongod start
mongo
# RUN FOLLOWING COMMENDS
# use admin
# db.createUser( { user: "root", pwd: "dslabglobal", roles: [ "userAdminAnyDatabase", "readWriteAnyDatabase"] })
# quit()
vi /etc/mongod.conf
# MODIFY SECURITY OPTION
# security:
# authorization: enabled
:wq
service mongod restart
cd /opt
# INSTALL nodejs
curl -sL https://deb.nodesource.com/setup_16.x -o /tmp/nodesource_setup.sh
bash /tmp/nodesource_setup.sh
apt install -y nodejs
npm install -g yarn pm2
# INSTALL wkhtmltopdf
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.bionic_amd64.deb
dpkg -i wkhtmltox_0.12.6-1.bionic_amd64.deb
apt --fix-broken install
wkhtmltopdf --version
wget https://downloads.metabase.com/v0.44.0/metabase.jar
nohup redis-server > /dev/null 2>&1 &
nohup java -DMB_JETTY_PORT=13009 -jar metabase.jar > /dev/null 2>&1 &
nohup bash <(curl -Ss https://my-netdata.io/kickstart.sh) > /dev/null 2>&1 &
# INSTALL MINICONDA3
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
chmod 755 Miniconda3-latest-Linux-x86_64.sh
./Miniconda3-latest-Linux-x86_64.sh
source ~/.bashrc
# INSTALL DS2
cd ~/
git clone git@github.com:DS2BRAIN/ds2.git
cd ~/ds2/frontend_app
yarn
pm2 start npm --name frontend_app -- run start:enterprise
cd ~/ds2/frontend_label_app
yarn
yarn add @material-ui/lab classnames styled-components
pm2 start npm --name frontend_label_app -- run start:enterprise
cd ~/ds2/backend
conda env create --file py39.yaml
conda activate p3.9
pip install torch==1.10.1+cu111 torchvision torchaudio -f https://download.pytorch.org/whl/torch_stable.html
python -m pip install detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cu113/torch1.10/index.html
pip install tritonclient[all]
# reinstall conflict libraries
pip uninstall bson pymongo
pip install bson
pip install pymongo==3.12.0
# Run daemon app
LRU_CACHE_CAPACITY=1 DS2_CONFIG_OPTION=enterprise nohup python daemon_sms.py > daemon.out &
# Run Backend app
LRU_CACHE_CAPACITY=1 DS2_CONFIG_OPTION=enterprise nohup uvicorn main:app --host 0.0.0.0 --port 13002 --workers 4 --ws-max-size 400000000 > backend.out &