Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
fbshipit-source-id: c914abb26f72a87a9d156527438cf2e106b5bcdf
  • Loading branch information
facebook-github-bot committed Nov 22, 2019
0 parents commit ce03ba4
Show file tree
Hide file tree
Showing 271 changed files with 28,096 additions and 0 deletions.
157 changes: 157 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
# Python CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-python/ for more details
#
version: 2

# -------------------------------------------------------------------------------------
# Environments to run the jobs in
# -------------------------------------------------------------------------------------
cpu: &cpu
docker:
machine:
image: default
resource_class: medium

gpu: &gpu
environment:
CUDA_VERSION: "10.1"
machine:
image: default
resource_class: gpu.medium # Tesla M60

# -------------------------------------------------------------------------------------
# Re-usable commands
# -------------------------------------------------------------------------------------
setup_venv: &setup_venv
- run:
name: Activate Venv
command: |
python -m venv ~/venv
echo ". ~/venv/bin/activate" >> $BASH_ENV
. ~/venv/bin/activate
python --version
which python
which pip
install_python: &install_python
- run:
name: Install Python
working_directory: ~/
command: |
pyenv install 3.6.1
pyenv global 3.6.1
install_dep: &install_dep
- run:
name: Install Dependencies
command: |
which python
which pip
pip install --upgrade pip
pip install --progress-bar off -r requirements.txt
pip list
run_tests: &run_tests
- run:
name: Run Tests
command: |
python setup.py test -s test.suites.unittests -v
# -------------------------------------------------------------------------------------
# Jobs to run
# -------------------------------------------------------------------------------------
jobs:
cpu_tests:
<<: *cpu

working_directory: ~/ClassyVision

steps:
- checkout

- <<: *install_python

- <<: *setup_venv

# Download and cache dependencies
- restore_cache:
keys:
- v2-cpu-dependencies-{{ checksum "requirements.txt" }}
# fallback to using the latest cache if no exact match is found
- v2-cpu-dependencies-

- <<: *install_dep

- save_cache:
paths:
- ~/venv
key: v2-cpu-dependencies-{{ checksum "requirements.txt" }}

- <<: *run_tests

- run:
name: Run classy-project tests
command: |
pip install .
classy-project my-project
pushd my-project
./classy_train.py --device cpu --config configs/template_config.json
popd
rm -rf my-project
gpu_tests:
<<: *gpu

working_directory: ~/ClassyVision

steps:
- checkout

- run:
name: Setup CUDA
working_directory: ~/
command: |
# download and install nvidia drivers, cuda, etc
wget -q 'https://s3.amazonaws.com/ossci-linux/nvidia_driver/NVIDIA-Linux-x86_64-430.40.run'
sudo /bin/bash ./NVIDIA-Linux-x86_64-430.40.run -s --no-drm
wget -q https://developer.download.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda-repo-ubuntu1404-10-1-local-10.1.243-418.87.00_1.0-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu1404-10-1-local-10.1.243-418.87.00_1.0-1_amd64.deb
sudo apt-key add /var/cuda-repo-10-1-local-10.1.243-418.87.00/7fa2af80.pub
nvidia-smi
- <<: *install_python

- <<: *setup_venv

# Download and cache dependencies
- restore_cache:
keys:
- v1-gpu-dependencies-{{ checksum "requirements.txt" }}
# fallback to using the latest cache if no exact match is found
- v1-gpu-dependencies-

- <<: *install_dep

- run:
name: Check CUDA Available
command: python -c "import torch; assert torch.cuda.is_available(), 'CUDA not available'"

- save_cache:
paths:
- ~/venv
key: v1-gpu-dependencies-{{ checksum "requirements.txt" }}

- <<: *run_tests


# -------------------------------------------------------------------------------------
# Workflows
# -------------------------------------------------------------------------------------
workflows:
version: 2
build_and_test:
jobs:
- cpu_tests
- gpu_tests
53 changes: 53 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
name: "\U0001F41B Bug Report"
about: Submit a bug report to help us improve Classy Vision

---

## 🐛 Bug

<!-- A clear and concise description of what the bug is. -->

## To Reproduce

Steps to reproduce the behavior:

1.
1.
1.

<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->

## Expected behavior

<!-- A clear and concise description of what you expected to happen. -->

## Environment

- What commands did you use to install Classy Vision (conda/pip/build from source)?
- If you are building from source, which commit is it?
- What does `classy_vision.__version__` print? (If applicable)

Please copy and paste the output from the Pytorch
[environment collection script](https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py)
(or fill out the checklist below manually).

You can get the script and run it with:
```
wget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py
# For security purposes, please check the contents of collect_env.py before running it.
python collect_env.py
```

- PyTorch Version (e.g., 1.0):
- OS (e.g., Linux):
- How you installed PyTorch (`conda`, `pip`, source):
- Build command you used (if compiling from source):
- Python version:
- CUDA/cuDNN version:
- GPU models and configuration:
- Any other relevant information:

## Additional context

<!-- Add any other context about the problem here. -->
9 changes: 9 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name: "\U0001F4DA Documentation"
about: Report an issue related to Classy Vision documentation

---

## 📚 Documentation

TODO: Fill this up
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: "\U0001F680Feature Request"
about: Submit a proposal/request for a new Classy Vision feature

---

## 🚀 Feature
<!-- A clear and concise description of the feature proposal -->

## Motivation

<!-- Please outline the motivation for the proposal. Is your feature request related to a problem? e.g., I'm always frustrated when [...]. If this is related to another GitHub issue, please link here too -->

## Pitch

<!-- A clear and concise description of what you want to happen. -->

## Alternatives

<!-- A clear and concise description of any alternative solutions or features you've considered, if any. -->

## Additional context

<!-- Add any other context or screenshots about the feature request here. -->
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/questions-help-support.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
name: "❓Questions/Help/Support"
about: Do you need support? We have resources.

---

## ❓ Questions and Help

### Please note that this issue tracker is not a help form and this issue will be closed.

We have a set of [listed resources available on the website]. TODO: Fill this up.
52 changes: 52 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

.DS_Store

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/

# Jupyter Notebook
.ipynb_checkpoints

node_modules

lib/core/metadata.js
lib/core/MetadataBlog.js

# Sphinx documentation
sphinx/build/

# Docusaurus
website/translated_docs
website/build/
website/yarn.lock
website/node_modules
website/i18n/*

## Generated for tutorials
website/_tutorials/
website/static/files/
website/pages/tutorials/*
!website/pages/tutorials/index.js

## Generated for Sphinx
website/pages/api/
website/static/js/*
!website/static/js/code_block_buttons.js
website/static/_sphinx-sources/
2 changes: 2 additions & 0 deletions .isort.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[settings]
multi_line_output=3
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
0.1 (December 9, 2019)

* Initial release
76 changes: 76 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to make participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies within all project spaces, and it also applies when
an individual is representing the project or its community in public spaces.
Examples of representing a project or community include using an official
project e-mail address, posting via an official social media account, or acting
as an appointed representative at an online or offline event. Representation of
a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at <opensource-conduct@fb.com>. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq

0 comments on commit ce03ba4

Please sign in to comment.