-
Notifications
You must be signed in to change notification settings - Fork 298
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1131 from nyu-mll/js/migration/jiant-dev_to_nyu-mll
Transition to jiant 2.0
- Loading branch information
Showing
429 changed files
with
26,884 additions
and
47,298 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 |
---|---|---|
@@ -1,65 +1,50 @@ | ||
# Python CircleCI 2.0 configuration file | ||
version: 2.1 | ||
jobs: | ||
test: | ||
docker: | ||
- image: circleci/python:3.7.4 | ||
version: 2.1 | ||
|
||
working_directory: ~/repo | ||
orbs: | ||
codecov: codecov/[email protected] | ||
|
||
environment: | ||
JIANT_PROJECT_PREFIX: sample_run | ||
JIANT_DATA_DIR: data | ||
WORD_EMBS_FILE: none | ||
steps: | ||
# Step 1: obtain repo from GitHub | ||
- checkout | ||
# Step 2: restore pip dependencies from cache, keyed on branch and content of setup.py | ||
- restore_cache: | ||
key: deps1-{{ .Branch }}-{{ checksum "setup.py" }} | ||
# Step 3: style check | ||
- run: | ||
name: check style | ||
command: | | ||
pip install --user black==19.3b0 | ||
black . --check --exclude "/(\.eggs|\.git|\.hg|\.mypy_cache|\.nox|\.tox|\.venv|_build|buck-out|build|dist|jiant/modules/cove|venv)/" | ||
# Step 4: get data needed for demo.sh | ||
- run: | ||
name: download demo data | ||
command: | | ||
python scripts/download_glue_data.py --data_dir $JIANT_DATA_DIR --tasks MRPC,STS,SST | ||
python scripts/download_superglue_data.py --data_dir $JIANT_DATA_DIR --tasks CB | ||
# Step 5: create virtual env and install dependencies | ||
- run: | ||
name: install dependencies | ||
command: | | ||
jobs: | ||
test: | ||
docker: | ||
- image: python:3.7 | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
key: -v3-{{ checksum "requirements-dev.txt" }} | ||
- run: | ||
name: Install dependencies | ||
command: | | ||
python3 -m venv venv | ||
source venv/bin/activate | ||
pip install -e ~/repo | ||
pip install nose2 | ||
# Step 6: cache dependencies for future CI jobs | ||
- save_cache: | ||
key: deps1-{{ .Branch }}-{{ checksum "setup.py" }} | ||
paths: | ||
pip install -r requirements-dev.txt | ||
- save_cache: | ||
key: -v3-{{ checksum "requirements-dev.txt" }} | ||
paths: | ||
- "venv" | ||
# Step 7: demo.sh run test | ||
- run: | ||
name: running demo.sh | ||
command: | | ||
- run: | ||
name: black formatting check | ||
command: | | ||
source venv/bin/activate | ||
python -m nltk.downloader perluniprops nonbreaking_prefixes punkt | ||
python -m spacy download en | ||
python main.py --config_file jiant/config/demo.conf | ||
python main.py --config_file jiant/config/demo.conf --overrides "do_pretrain = 0, do_target_task_training = 0, load_model = 1" | ||
# Step 8: run tests | ||
- run: | ||
name: run tests | ||
command: | | ||
black --check jiant/ | ||
- run: | ||
name: flake8 | ||
command: | | ||
source venv/bin/activate | ||
mkdir ~/repo/test_output | ||
nose2 -v | ||
workflows: | ||
version: 2 | ||
test: | ||
jobs: | ||
- test | ||
flake8 --docstring-convention google jiant/ | ||
- run: | ||
name: Unit Tests | ||
command: | | ||
source venv/bin/activate | ||
pytest | ||
- run: | ||
name: Coverage Report | ||
command: | | ||
source venv/bin/activate | ||
pytest --cov-report=xml --cov=jiant tests/ | ||
- codecov/upload: | ||
file: coverage.xml | ||
|
||
workflows: | ||
build: | ||
jobs: | ||
- test |
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 @@ | ||
[flake8] | ||
max-line-length = 100 | ||
|
||
ignore = | ||
# "these rules don't play well with black", from AllenNLP | ||
E203 # whitespace before : | ||
W503 # line break before binary operatori | ||
# these are docstring-related ignores: | ||
D100 # Missing docstring in public module | ||
D101 # Missing docstring in public class | ||
D102 # Missing docstring in public method | ||
D103 # Missing docstring in public function | ||
D104 # Missing docstring in public package | ||
D105 # Missing docstring in magic method | ||
D107 # Missing docstring in __init__ | ||
D400 # First line should end with a period | ||
D401 # First line should be in imperative mood; try rephrasing | ||
D415 # First line should end with a period, question mark, or exclamation point | ||
D205 # 1 blank line required between summary line and description | ||
|
||
exclude = | ||
examples/** | ||
tests/** | ||
jiant/ext/allennlp.py # excluded to avoid modifying code copied from AllenNLP. |
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,25 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
1. Tell use which version of `jiant` you're using | ||
2. Describe the environment where you're using `jiant`, e.g, "2 P40 GPUs" | ||
3. Provide the experiment config artifact (e.g., `defaults.conf`) | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**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,20 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**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,17 @@ | ||
# Number of days of inactivity before an issue becomes stale | ||
daysUntilStale: 60 | ||
# Number of days of inactivity before a stale issue is closed | ||
daysUntilClose: 7 | ||
# Issues with these labels will never be considered stale | ||
exemptLabels: | ||
- pinned | ||
- security | ||
# Label to use when marking an issue as stale | ||
staleLabel: wontfix | ||
# Comment to post when marking an issue as stale. Set to `false` to disable | ||
markComment: > | ||
This issue has been automatically marked as stale because it has not had | ||
recent activity. It will be closed if no further activity occurs. Thank you | ||
for your contributions. | ||
# Comment to post when closing a stale issue. Set to `false` to disable | ||
closeComment: false |
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 |
---|---|---|
@@ -1,18 +1,128 @@ | ||
*.pyc | ||
*.swp | ||
*.log | ||
*.*~ | ||
glue_data/ | ||
user_config.sh | ||
.idea | ||
.ipynb_checkpoints/ | ||
perluniprops/ | ||
.DS_Store | ||
|
||
# package/distribution artifacts | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
pip-wheel-metadata/ | ||
share/python-wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
pip-wheel-metadata/ | ||
MANIFEST | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.nox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
*.py,cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
db.sqlite3 | ||
db.sqlite3-journal | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# IPython | ||
profile_default/ | ||
ipython_config.py | ||
|
||
# pyenv | ||
.python-version | ||
|
||
# pipenv | ||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. | ||
# However, in case of collaboration, if having platform-specific dependencies or dependencies | ||
# having no cross-platform support, pipenv may install dependencies that don't work, or not | ||
# install all needed dependencies. | ||
#Pipfile.lock | ||
|
||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow | ||
__pypackages__/ | ||
|
||
# Celery stuff | ||
celerybeat-schedule | ||
celerybeat.pid | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# mypy | ||
.mypy_cache/ | ||
.dmypy.json | ||
dmypy.json | ||
|
||
# Pyre type checker | ||
.pyre/ |
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v2.1.0 | ||
- repo: https://github.com/ambv/black | ||
rev: stable | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: check-yaml | ||
- repo: https://github.com/ambv/black | ||
rev: 19.3b0 | ||
- id: black | ||
language_version: python3.7 | ||
- repo: https://gitlab.com/pycqa/flake8 | ||
rev: 3.7.9 | ||
hooks: | ||
- id: black | ||
- id: flake8 |
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 |
---|---|---|
@@ -1,2 +1,5 @@ | ||
# See https://blog.github.com/2017-07-06-introducing-code-owners/ | ||
* @W4ngatang @iftenney @sleepinyourhat @pruksmhc @pyeres | ||
# These owners will be the default owners for everything in | ||
# the repo. Unless a later match takes precedence, | ||
# @global-owner1 and @global-owner2 will be requested for | ||
# review when someone opens a pull request. | ||
* @zphang @jeswan @HaokunLiu |
Oops, something went wrong.