Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
fbshipit-source-id: 40ae73746a329c8f6b8df3af34b004cc946e42d9
  • Loading branch information
facebook-github-bot committed Apr 1, 2019
0 parents commit 0b2bc4f
Show file tree
Hide file tree
Showing 76 changed files with 11,843 additions and 0 deletions.
120 changes: 120 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
version: 2.1

executors:
default_executor:
docker:
- image: circleci/python:3.6
working_directory: ~/PyTorch-BigGraph

commands:
# Need this because env vars added to the executors aren't expanded/interpolated.
# This means that both `~` and `$HOME` would be treated as literals.
export_env_vars:
steps:
- run:
name: Export environment variables
command: |
echo 'export PYTHONUSERBASE=~/local_python' >> $BASH_ENV
cached_checkout:
steps:
- restore_cache:
keys:
- source-v1-{{ .Branch }}-{{ .Revision }}
- source-v1-{{ .Branch }}-
- source-v1-
- checkout
- save_cache:
key: source-v1-{{ .Branch }}-{{ .Revision }}
paths:
- .git
install_dependencies:
parameters:
requirements_file:
type: string
summary_file:
type: string
steps:
- restore_cache:
keys:
- local-python-v1-{{ .Branch }}-
- local-python-v1-
- run:
name: Set up local Python environment
command: |
pip install --user --requirement << parameters.requirements_file >> --upgrade --upgrade-strategy eager --progress-bar off
pip freeze --user > << parameters.summary_file >>
- save_cache:
key: local-python-v1-{{ .Branch }}-{{ checksum "<< parameters.summary_file >>" }}
paths:
- ~/local_python
load_installed_dependencies:
parameters:
summary_file:
type: string
steps:
- restore_cache:
keys:
- local-python-v1-{{ .Branch }}-{{ checksum "<< parameters.summary_file >>" }}
- local-python-v1-{{ .Branch }}-
- local-python-v1-
- run:
name: Set up local Python environment
command: |
pip install --user --requirement << parameters.summary_file >> --progress-bar off
jobs:
build-install:
executor: default_executor
steps:
- export_env_vars
- cached_checkout
- install_dependencies:
requirements_file: requirements.txt
summary_file: ~/pip_freeze.txt
- run:
name: Install PyTorch-BigGraph
command: |
python3 -m venv --system-site-packages ~/venv
. ~/venv/bin/activate
python3 setup.py install
- persist_to_workspace:
root: "~"
paths:
- pip_freeze.txt
- venv
- persist_to_workspace:
root: tests
paths:
- "*.py"
test:
executor: default_executor
steps:
- export_env_vars
- attach_workspace:
at: "~"
- load_installed_dependencies:
summary_file: ~/pip_freeze.txt
- attach_workspace:
at: tests
- run:
name: Test all the things!
command: |
. ~/venv/bin/activate
python3 tests/bucket_scheduling_tests.py
python3 tests/distributed_tests.py
python3 tests/fileio_tests.py
python3 tests/functional_tests.py
python3 tests/model_tests.py
python3 tests/schema_tests.py
python3 tests/stats_tests.py
python3 tests/train_tests.py
python3 tests/util_tests.py
workflows:
version: 2
build-install-test:
jobs:
- build-install
- test:
requires:
- build-install
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
## Steps to reproduce

1. _____
2. _____
3. _____

## Observed Results

* What happened? This could be a description, log output, etc.

## Expected Results

* What did you expect to happen?

## Relevant Code

```
// TODO(you): code here to reproduce the problem
```
27 changes: 27 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
## Types of changes

<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->

- [ ] Docs change / refactoring / dependency upgrade
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)

## Motivation and Context / Related issue

<!--- Why is this change required? What problem does it solve? -->
<!--- Please link to an existing issue here if one exists. -->
<!--- (we recommend to have an existing issue for each pull request) -->

## How Has This Been Tested (if it applies)

<!--- Please describe here how your modifications have been tested. -->

## Checklist

<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->

- [ ] The documentation is up-to-date with the changes I made.
- [ ] I have read the **CONTRIBUTING** document and completed the CLA (see **CONTRIBUTING**).
- [ ] All tests passed, and additional code has been covered with new tests.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Changelog

## master

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

Facebook has adopted a Code of Conduct that we expect project participants to
adhere to. Please read the [full text](https://code.fb.com/codeofconduct/) so
that you can understand what actions will and will not be tolerated.
50 changes: 50 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Contributing to torchbiggraph

We want to make contributing to this project as easy and transparent as
possible.

## Our Development Process

This project's source-of-truth is the version in Facebook's internal codebase,
which is continuously synced with the GitHub mirror using
[ShipIt](https://github.com/facebook/fbshipit). Pull requests on GitHub are
copied over using ImportIt (a companion tool for ShipIt).

## Pull Requests

We actively welcome your pull requests.

1. Fork the repo and create your branch from `master`.
2. If you've added code that should be tested, add tests.
3. If you've changed APIs, update the documentation.
4. Ensure the test suite passes.
5. Make sure your code lints.
6. If you haven't already, complete the Contributor License Agreement ("CLA").

## Contributor License Agreement ("CLA")

In order to accept your pull request, we need you to submit a CLA. You only need
to do this once to work on any of Facebook's open source projects.

Complete your CLA here: <https://code.facebook.com/cla>

## Issues

We use GitHub issues to track public bugs. Please ensure your description is
clear and has sufficient instructions to be able to reproduce the issue.

Facebook has a [bounty program](https://www.facebook.com/whitehat/) for the safe
disclosure of security bugs. In those cases, please go through the process
outlined on that page and do not file a public issue.

## Coding Style

This project adheres to the [PEP 8](https://www.python.org/dev/peps/pep-0008/)
style guidelines. It is linted using [Flake8](https://pypi.org/project/flake8/).
Additional conventions from the [Black](https://black.readthedocs.io/en/stable/)
formatter are sometimes adopted.

## License

By contributing to torchbiggraph, you agree that your contributions will be
licensed under the LICENSE file in the root directory of this source tree.
30 changes: 30 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
BSD License

For torchbiggraph software

Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

* Neither the name Facebook nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Loading

0 comments on commit 0b2bc4f

Please sign in to comment.