Skip to content
This repository was archived by the owner on Jan 6, 2023. It is now read-only.

Commit 2858732

Browse files
Initial commit
fbshipit-source-id: 505cb3e0cb33ad72b102f22cec41573f75883622
0 parents  commit 2858732

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+7193
-0
lines changed

.circleci/config.yml

+169
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
# Python CircleCI 2.0 configuration file
2+
#
3+
# Check https://circleci.com/docs/2.0/language-python/ for more details
4+
#
5+
version: 2
6+
7+
# ------------------------------------------------------------------------------
8+
# Test envs
9+
# ------------------------------------------------------------------------------
10+
cpu: &cpu
11+
docker:
12+
machine:
13+
image: default
14+
resource_class: medium
15+
16+
gpu: &gpu
17+
environment:
18+
CUDA_VERSION: "10.1"
19+
machine:
20+
image: default
21+
resource_class: gpu.medium # Tesla M60
22+
23+
# ------------------------------------------------------------------------------
24+
# test setup commands
25+
# ------------------------------------------------------------------------------
26+
setup_venv: &setup_venv
27+
- run:
28+
name: Activate Venv
29+
command: |
30+
python -m venv ~/venv
31+
echo ". ~/venv/bin/activate" >> $BASH_ENV
32+
. ~/venv/bin/activate
33+
python --version
34+
which python
35+
which pip
36+
37+
install_python: &install_python
38+
- run:
39+
name: Install Python
40+
working_directory: ~/
41+
command: |
42+
pyenv install 3.6.1
43+
pyenv global 3.6.1
44+
45+
install_dep: &install_dep
46+
- run:
47+
name: Install Dependencies
48+
command: |
49+
which python
50+
which pip
51+
pip install --upgrade pip
52+
pip install --progress-bar off -r requirements.txt
53+
pip list
54+
55+
install_cuda: &install_cuda
56+
- run:
57+
name: Install CUDA
58+
working_directory: ~/
59+
command: |
60+
# download and install nvidia drivers, cuda, etc
61+
wget -q 'https://s3.amazonaws.com/ossci-linux/nvidia_driver/NVIDIA-Linux-x86_64-430.40.run'
62+
sudo /bin/bash ./NVIDIA-Linux-x86_64-430.40.run -s --no-drm
63+
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
64+
sudo dpkg -i cuda-repo-ubuntu1404-10-1-local-10.1.243-418.87.00_1.0-1_amd64.deb
65+
sudo apt-key add /var/cuda-repo-10-1-local-10.1.243-418.87.00/7fa2af80.pub
66+
nvidia-smi
67+
68+
install_etcd: &install_etcd
69+
- run:
70+
name: Install etcd
71+
command: |
72+
# pulls etcd server binary for spinning up a standalong etcd server for unittests
73+
# see test/p2p/etcd_server_fixture.py
74+
# needs to run AFTER checkout since it uses the install_etcd script in the repo
75+
echo "current directory is $(pwd)"
76+
echo "etcd install directory is: $ETCD_INSTALL_DIR"
77+
examples/bin/install_etcd -d $ETCD_INSTALL_DIR
78+
$ETCD_INSTALL_DIR/etcd --version
79+
$ETCD_INSTALL_DIR/etcdctl version
80+
81+
run_tests: &run_tests
82+
- run:
83+
name: Run Tests
84+
command: |
85+
python setup.py test -s test.suites.unittests -v
86+
87+
# ------------------------------------------------------------------------------
88+
# tests
89+
# ------------------------------------------------------------------------------
90+
jobs:
91+
cpu_tests:
92+
<<: *cpu
93+
94+
environment:
95+
ETCD_INSTALL_DIR: /tmp/etcd
96+
TORCHELASTIC_ETCD_BINARY_PATH: /tmp/etcd/etcd
97+
98+
working_directory: ~/torchelastic
99+
100+
steps:
101+
- checkout
102+
103+
- <<: *install_etcd
104+
105+
- <<: *install_python
106+
107+
- <<: *setup_venv
108+
109+
# Download and cache dependencies
110+
- restore_cache:
111+
keys:
112+
- v2-cpu-dependencies-{{ checksum "requirements.txt" }}
113+
# fallback to using the latest cache if no exact match is found
114+
- v2-cpu-dependencies-
115+
116+
- <<: *install_dep
117+
118+
- save_cache:
119+
paths:
120+
- ~/venv
121+
key: v2-cpu-dependencies-{{ checksum "requirements.txt" }}
122+
123+
- <<: *run_tests
124+
125+
126+
gpu_tests:
127+
<<: *gpu
128+
129+
working_directory: ~/torchelastic
130+
131+
steps:
132+
- checkout
133+
134+
- <<: *install_cuda
135+
136+
- <<: *install_python
137+
138+
- <<: *setup_venv
139+
140+
# Download and cache dependencies
141+
- restore_cache:
142+
keys:
143+
- v1-gpu-dependencies-{{ checksum "requirements.txt" }}
144+
# fallback to using the latest cache if no exact match is found
145+
- v1-gpu-dependencies-
146+
147+
- <<: *install_dep
148+
149+
- run:
150+
name: Check CUDA Available
151+
command: python -c "import torch; assert torch.cuda.is_available(), 'CUDA not available'"
152+
153+
- save_cache:
154+
paths:
155+
- ~/venv
156+
key: v1-gpu-dependencies-{{ checksum "requirements.txt" }}
157+
158+
- <<: *run_tests
159+
160+
# -------------------------------------------------------------------------------------
161+
# Workflows
162+
# -------------------------------------------------------------------------------------
163+
workflows:
164+
version: 2
165+
build_and_test:
166+
jobs:
167+
- cpu_tests
168+
# no gpu tests for now; uncomment to enable
169+
# - gpu_tests

.dockerignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.gitignore
2+
.git

.github/ISSUE_TEMPLATE/bug-report.md

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
name: "\U0001F41B Bug Report"
3+
about: Submit a bug report to help us improve PyTorch Elastic
4+
5+
---
6+
7+
## 🐛 Bug
8+
9+
<!-- A clear and concise description of what the bug is. -->
10+
11+
## To Reproduce
12+
13+
Steps to reproduce the behavior:
14+
15+
1.
16+
1.
17+
1.
18+
19+
<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->
20+
21+
## Expected behavior
22+
23+
<!-- A clear and concise description of what you expected to happen. -->
24+
25+
## Environment
26+
27+
- What commands did you use to install torchelastic (conda/pip/build from source)?
28+
- If you are building from source, which commit is it?
29+
- What does `classy_vision.__version__` print? (If applicable)
30+
31+
Please copy and paste the output from the Pytorch
32+
[environment collection script](https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py)
33+
(or fill out the checklist below manually).
34+
35+
You can get the script and run it with:
36+
```
37+
wget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py
38+
# For security purposes, please check the contents of collect_env.py before running it.
39+
python collect_env.py
40+
```
41+
42+
- PyTorch Version (e.g., 1.0):
43+
- OS (e.g., Linux):
44+
- How you installed PyTorch (`conda`, `pip`, source):
45+
- Build command you used (if compiling from source):
46+
- Python version:
47+
- CUDA/cuDNN version:
48+
- GPU models and configuration:
49+
- Any other relevant information:
50+
- Execution environment (on-prem, aws, etc):
51+
52+
## Additional context
53+
54+
<!-- Add any other context about the problem here. -->
+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: "\U0001F4DA Documentation"
3+
about: Report an issue related to PyTorch Elastic documentation
4+
5+
---
6+
7+
## 📚 Documentation
8+
9+
## Link
10+
<!-- link to the problematic documentation -->
11+
12+
## What does it currently say?
13+
<!-- copy paste the section that is wrong -->
14+
15+
## What should it say?
16+
<!-- the proposed new documentation -->
17+
18+
### Why?
19+
<!-- (if not clear from the proposal) why is the new proposed documentation more correct/improvement over the existing one? -->
+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
name: "\U0001F680Feature Request"
3+
about: Submit a proposal/request for a new PyTorch Elastic feature
4+
5+
---
6+
7+
## 🚀 Feature
8+
<!-- A clear and concise description of the feature proposal -->
9+
10+
## Motivation
11+
12+
<!-- 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 -->
13+
14+
## Pitch
15+
16+
<!-- A clear and concise description of what you want to happen. -->
17+
18+
## Alternatives
19+
20+
<!-- A clear and concise description of any alternative solutions or features you've considered, if any. -->
21+
22+
## Additional context
23+
24+
<!-- Add any other context or screenshots about the feature request here. -->
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
name: "❓Questions/Help/Support"
3+
about: Do you need support? We have resources.
4+
5+
---
6+
7+
## ❓ Questions and Help
8+
9+
### Please note that this issue tracker is not a help form and this issue will be closed.
10+
11+
We have a set of [listed resources available on the website]. TODO: Fill this up.

CHANGELOG

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# CHANGELOG
2+
3+
## 0.1.0-rc (December 06, 2019)
4+
5+
### PyTorch Elastic
6+
7+
* Release torchelastic v0.1.0-rc (experimental)

CODE_OF_CONDUCT.md

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to make participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies within all project spaces, and it also applies when
49+
an individual is representing the project or its community in public spaces.
50+
Examples of representing a project or community include using an official
51+
project e-mail address, posting via an official social media account, or acting
52+
as an appointed representative at an online or offline event. Representation of
53+
a project may be further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at <[email protected]>. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72+
73+
[homepage]: https://www.contributor-covenant.org
74+
75+
For answers to common questions about this code of conduct, see
76+
https://www.contributor-covenant.org/faq

0 commit comments

Comments
 (0)