-
Notifications
You must be signed in to change notification settings - Fork 1
/
pyproject.toml
128 lines (114 loc) · 4.38 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
[tool.poetry]
name = "knolbe_py"
version = "0.1.0"
description = ""
authors = ["Ryan Stout <[email protected]>"]
readme = "README.md"
# you can include additional folders as a package in order to use them in a script
# ala `packages = [{ include = "python" }]` but those folders MUST exist anytime
# `poetry install` is run, which makes incrementally building the docker image in
# layers more challenging. Because of this we've segregated the CLI tool to a separate folder
[tool.poetry.scripts]
nlp = "knolbe_py.cli:cli"
# TODO update to 3.11 when pytorch supports it https://github.com/pytorch/pytorch/issues/86566
# TODO extract to internal notes before removing
# https://stackoverflow.com/questions/51730880/where-do-i-get-a-cpu-only-version-of-pytorch
# [[tool.poetry.source]]
# name = "torch"
# url = "https://download.pytorch.org/whl/torch_stable.html"
# secondary = true
[tool.poetry.dependencies]
# https://github.com/python-poetry/poetry/issues/732
pip = "^23.0.1"
# TODO torch does not support 3.10 yet!
python = "~3.10"
sqlglot = "^10.4.3"
snowflake-connector-python = "^3.0.0"
python-decouple = "^3.8"
openai = { extras = ["embeddings"], version = "^0.27.1" }
ipython = "^8.8.0"
faiss-cpu = "^1.7.3"
xxhash = "^3.2.0"
tiktoken = "^0.3.2"
sentence-transformers = "^2.2.2"
structlog = "^22.3.0"
click = "^8.1.3"
numpy = "^1.24.1"
backoff = "^2.2.1"
flask = "^2.2.3"
tqdm = "^4.64.1"
# TODO in the future we *should* be able to just specify an extra or a wheel source and this is done automatically...
# import platform; platform.machine()
# https://download.pytorch.org/whl/torch_stable.html
# https://github.com/KumaTea/pytorch-aarch64
torch = [
# { version = "1.13.1", "platform" = "linux", markers = "platform_machine == 'aarch64'"},
{ url = "https://github.com/KumaTea/pytorch-aarch64/releases/download/v1.11.0/torch-1.11.0-cp310-cp310-linux_aarch64.whl", "platform" = "linux", markers = "platform_machine == 'aarch64'" },
{ url = "https://download.pytorch.org/whl/cpu/torch-1.13.1%2Bcpu-cp310-cp310-linux_x86_64.whl", "platform" = "linux", markers = "platform_machine == 'x86_64'" },
{ url = "https://download.pytorch.org/whl/cpu/torch-1.13.1-cp310-none-macosx_11_0_arm64.whl", "platform" = "darwin", markers = "platform_machine == 'arm64'" },
]
torchvision = [
# { version = "0.14.1", "platform" = "linux", markers = "platform_machine == 'aarch64'"},
{ url = "https://github.com/KumaTea/pytorch-aarch64/releases/download/v1.11.0/torchvision-0.12.0-cp310-cp310-linux_aarch64.whl", "platform" = "linux", markers = "platform_machine == 'aarch64'" },
{ url = "https://download.pytorch.org/whl/cpu/torchvision-0.14.1%2Bcpu-cp310-cp310-linux_x86_64.whl", "platform" = "linux", markers = "platform_machine == 'x86_64'" },
{ url = "https://download.pytorch.org/whl/cpu/torchvision-0.14.1-cp310-cp310-macosx_11_0_arm64.whl", "platform" = "darwin", markers = "platform_machine == 'arm64'" },
]
# torch = { version = "*", source = "torchcpu", markers = "sys_platform == 'linux'" }
# torch = "1.13.1+cpu"
# torch = {version = "1.13.1", extras = ["cpu"]}
waitress = "^2.1.2"
sentry-sdk = { version = "^1.16.0", extras = ["flask"] }
deepmerge = "^1.1.0"
autoflake = "^2.0.1"
prisma = "^0.8.0"
pytorch-lightning = "^1.9.1"
tabulate = "^0.9.0"
pretty-traceback = "^2022.1018"
redis = { extras = ["hiredis"], version = "^4.5.1" }
funcy = "^1.18"
toolz = "^0.12.0"
[tool.poetry.group.dev.dependencies]
autopep8 = "^2.0.1"
black = "^22.12.0"
isort = "^5.11.4"
pytest = "^7.2.1"
ipdb = "^0.13.11"
pytest-flask = "^1.2.0"
pylint = "^2.16.1"
deptry = "^0.8.0"
rich = "^13.3.1"
vcrpy = "^4.2.1"
pytest-recording = "^0.12.2"
pylint-pytest = "^1.1.2"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.pytest.ini_options]
log_cli = true
log_cli_level = "WARN"
addopts = "--pdbcls=IPython.terminal.debugger:Pdb"
filterwarnings = [
"ignore::DeprecationWarning:setuptools.*:",
"ignore::DeprecationWarning:distutils.*:",
"ignore::DeprecationWarning:faiss.*:",
"ignore::DeprecationWarning:IPython.*:",
]
[tool.black]
line-length = 120
target-version = ['py310']
exclude = '''
/(
.venv
| node_modules
| migrations
)/
'''
# when changing this config, you need to restart your vscode isort server
[tool.isort]
profile = "black"
multi_line_output = 3
sections = "SETUP,FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,PRISMA,LOCALFOLDER"
known_setup = "python.setup"
known_prisma = "prisma"
[tool.pyright]
ignore = ["bin/console.py"]