Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
.PHONY: test
.PHONY: test style

# Run tests for the library
check_dirs := tests tools/convert_checkpoint

test:
help: ## this help
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-22s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)

test: ## run tests
pytest tests

style: ## checks for code style and applies formatting
black $(check_dirs)
isort $(check_dirs)
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[tool.black]
line-length = 119
target-version = ['py35']
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ transformers
DeepSpeed @ git+https://github.com/microsoft/DeepSpeed.git
# at some point when it starts working freeze with ether min version or sha using the syntax codecarbon.git@deadbeaf
codecarbon @ git+https://github.com/mlco2/codecarbon.git
# versions from HF transformers
black==21.4b0
isort>=5.5.4
24 changes: 24 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[isort]
default_section = FIRSTPARTY
ensure_newline_before_comments = True
force_grid_wrap = 0
include_trailing_comma = True
known_first_party = megatron
known_third_party =
apex
codecarbon
datasets
deepspeed
git
nltk
numpy
pytest
tensorboard
torch
tqdm
transformers

line_length = 119
lines_after_imports = 2
multi_line_output = 3
use_parentheses = True