This repository has been archived by the owner on Jul 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 276
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fbshipit-source-id: afa52c484ecb713daec898299615b1b24e893192
- Loading branch information
0 parents
commit e7e02b0
Showing
284 changed files
with
31,500 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,177 @@ | ||
# 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 | ||
install_dev_dep: &install_dev_dep | ||
- run: | ||
name: Install Dev Dependencies | ||
command: | | ||
pip install .[dev] | ||
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" }} | ||
|
||
- <<: *install_dev_dep | ||
|
||
- run: | ||
name: black | ||
working_directory: ~/ClassyVision | ||
command: | | ||
bash ./scripts/check_formatting.sh -b | ||
- run: | ||
name: isort | ||
working_directory: ~/ClassyVision | ||
command: | | ||
bash ./scripts/check_formatting.sh -s | ||
- <<: *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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
||
<!-- A clear and concise description of what content in the [Tutorials](https://classyvision.ai/tutorials) or the [API Reference](https://classyvision.ai/api) is an issue --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
name: "❓Questions/Help/Support" | ||
about: Do you need support? | ||
--- | ||
|
||
## ❓ Questions and Help | ||
|
||
Before creating an issue, please go over our [Tutorials](https://classyvision.ai/tutorials) and [API Reference](https://classyvision.ai/api). If you cannot find the information you are looking for, please enquire in Classy Vision's `#help` [slack](https://classyvision.slack.com) channel before creating an issue. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[settings] | ||
multi_line_output=3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
repos: | ||
- repo: https://github.com/ambv/black | ||
rev: stable | ||
hooks: | ||
- id: black | ||
language_version: python3.6 | ||
|
||
- repo: https://github.com/timothycrosley/isort | ||
rev: stable | ||
hooks: | ||
- id: isort | ||
name: isort | ||
entry: isort | ||
require_serial: true | ||
language: python | ||
types: [python] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
0.1 (December 9, 2019) | ||
|
||
* Initial release |
Oops, something went wrong.