-
Notifications
You must be signed in to change notification settings - Fork 44
/
pyproject.toml
120 lines (108 loc) · 3.65 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
[tool.poetry]
name = "chat"
version = "0.4.0"
description = "RAG ChatBot"
authors = ["Umberto Griffo <[email protected]>"]
readme = "README.md"
[tool.poetry.dependencies]
python = ">=3.10,<3.11"
torch = [
{ version = "~=2.1.2", source = "pytorch", platform = "!=darwin" },
{ version = "~=2.1.2", source = "PyPI", platform = "darwin" }
]
sentence-transformers = { version = "~=2.2.2" }
sentencepiece = "~=0.1.99"
tqdm = "~=4.65.0"
requests = "~=2.31.0"
numpy = "~=1.24.2"
streamlit = "~=1.29.0"
unstructured = "~=0.7.7"
chromadb = "~=0.4.18"
transformers = "~=4.33.0"
rich = "~=13.4.2"
pyfiglet = "~=0.7"
clean-text = "~=0.6.0"
Unidecode = "~=1.3.6"
nest_asyncio = "~=1.5.8"
# nvidia dependencies
# PyTorch automatically installs all the Nvidia libraries, even on Darwin. To prevent this behavior,
# we explicitly make them optional.
nvidia-cublas-cu12 = { version = "12.1.3.1", optional = true, platform = "!=darwin" }
nvidia-cuda-cupti-cu12 = { version = "12.1.105", optional = true, platform = "!=darwin" }
nvidia-cuda-nvrtc-cu12 = { version = "12.1.105", optional = true, platform = "!=darwin" }
nvidia-cuda-runtime-cu12 = { version = "12.1.105", optional = true, platform = "!=darwin" }
nvidia-cudnn-cu12 = { version = "8.9.2.26", optional = true, platform = "!=darwin" }
nvidia-cufft-cu12 = { version = "11.0.2.54", optional = true, platform = "!=darwin" }
nvidia-curand-cu12 = { version = "10.3.2.106", optional = true, platform = "!=darwin" }
nvidia-cusolver-cu12 = { version = "11.4.5.107", optional = true, platform = "!=darwin" }
nvidia-cusparse-cu12 = { version = "12.1.0.106", optional = true, platform = "!=darwin" }
nvidia-nccl-cu12 = { version = "2.18.1", optional = true, platform = "!=darwin" }
nvidia-nvjitlink-cu12 = { version = "12.4.127", optional = true, platform = "!=darwin" }
nvidia-nvtx-cu12 = { version = "12.1.105", optional = true, platform = "!=darwin" }
[tool.poetry.extras]
cuda-acceleration = [
"nvidia-cublas-cu12", "nvidia-cuda-cupti-cu12", "nvidia-cuda-nvrtc-cu12",
"nvidia-cuda-runtime-cu12", "nvidia-cudnn-cu12", "nvidia-cufft-cu12",
"nvidia-curand-cu12", "nvidia-cusolver-cu12", "nvidia-cusparse-cu12",
"nvidia-nccl-cu12", "nvidia-nvjitlink-cu12", "nvidia-nvtx-cu12"
]
[tool.poetry.group.dev.dependencies]
pytest = "~=7.2.1"
pytest-cov = "~=4.0.0"
pytest-mock = "~=3.10.0"
pytest-asyncio = "~=0.23.6"
pre-commit = "~=3.6.0"
ruff = "~=0.6.4"
httpx = "~=0.23.3"
[[tool.poetry.source]]
name = "pytorch"
url = "https://download.pytorch.org/whl/cu121"
priority = "explicit"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
# https://docs.astral.sh/ruff/configuration/
# https://docs.astral.sh/ruff/settings/#lint_isort_known-first-party
[tool.ruff]
exclude = [
".venv",
".ruff_cache",
".pytest_cache",
"docs"
]
line-length = 120
indent-width = 4
[tool.ruff.lint]
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
# "I" is isort, C901 is McCabe complexity
select = [
# Pyflakes
"F",
# Pycodestyle
"E",
"W",
# isort
"I",
"C901"
]
ignore = []
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
[tool.ruff.lint.mccabe]
# Flag errors (`C901`) whenever the complexity level exceeds 12.
max-complexity = 12
[tool.ruff.format]
# Like Black, use double quotes for strings.
quote-style = "double"
# Like Black, indent with spaces, rather than tabs.
indent-style = "space"
# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false
# Like Black, automatically detect the appropriate line ending.
line-ending = "auto"
[tool.pytest.ini_options]
pythonpath = [
"chatbot",
"tests"
]