-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathpyproject.toml
94 lines (82 loc) · 2.68 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
###########
# 📜 Poetry
###########
[tool.poetry]
name = "transformer_from_scratch"
version = "0.1.0"
description = ""
authors = ["Alan <[email protected]>"]
license = "MIT"
readme = "README.md"
packages = [{include = "transformer_from_scratch"}]
[tool.poetry.dependencies]
python = "^3.9"
torch = "^2.0.1"
fancy-einsum = "^0.0.3"
einops = "^0.6.1"
typeguard = ">3.0.0"
torchtext = "^0.15.2"
torchdata = "^0.6.1"
tqdm = "^4.65.0"
transformers = {extras = ["torch"], version = "^4.30.2"}
datasets = "^2.12.0"
wandb = "^0.15.4"
jaxtyping = "^0.2.20"
# Fix for Pytorch/Poetry issue where linux dependencies are not installed
# https://github.com/pytorch/pytorch/issues/100974
nvidia-cublas-cu11 = { version = "11.10.3.66", platform = 'linux' }
nvidia-cuda-cupti-cu11 = { version = "11.7.101", platform = 'linux' }
nvidia-cuda-nvrtc-cu11 = { version = "11.7.99", platform = 'linux' }
nvidia-cuda-runtime-cu11 = { version = "11.7.99", platform = 'linux' }
nvidia-cudnn-cu11 = { version = "8.5.0.96", platform = 'linux' }
nvidia-cufft-cu11 = { version = "10.9.0.58", platform = 'linux' }
nvidia-curand-cu11 = { version = "10.2.10.91", platform = 'linux' }
nvidia-cusolver-cu11 = { version = "11.4.0.1", platform = 'linux' }
nvidia-cusparse-cu11 = { version = "11.7.4.91", platform = 'linux' }
nvidia-nccl-cu11 = { version = "2.14.3", platform = 'linux' }
nvidia-nvtx-cu11 = { version = "11.7.91", platform = 'linux' }
triton = { version = "2.0.0", platform = 'linux' }
tensorboard = "^2.13.0"
lightning-bolts = "^0.7.0"
[tool.poetry.group.dev.dependencies]
bandit = "^1.7.5"
black = "^23.3.0"
ipdb = "^0.13.13"
ipykernel = "^6.23.1"
isort = "^5.12.0"
jupyter-black = "^0.3.4"
mypy = "^1.3.0"
pylint = "^2.17.4"
pytest = "^7.3.2"
pytest-mock = "^3.10.0"
snapshottest = "^0.6.0"
pylance = "^0.4.20"
jupyterlab = "^4.0.2"
toml = "^0.10.2"
yapf = "^0.33.0"
[[tool.poetry.source]]
name = "torch-xla"
url = "https://pip.repos.neuron.amazonaws.com"
priority = "primary"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
############
# ✅ Checks
############
[tool.isort]
profile = "black"
[tool.pytest.ini_options]
addopts = "--jaxtyping-packages=transformer_from_scratch,typeguard.typechecked -s"
[tool.mypy]
ignore_missing_imports = true
check_untyped_defs = true
[tool.pylint.TYPECHECK]
# Fix for Pytorch member existence checks
generated-members = "torch.*"
[tool.pylint.DESIGN]
max-args = 10 # Maximum number of arguments for function
min-public-methods = 1 # Minimum number of public methods for a class
max-locals = 30 # Maximum number of local variables for function / method
[tool.pylint."MESSAGES CONTROL"]
disable = "redefined-builtin" # Disable redefined builtin functions