-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
190 lines (178 loc) · 6.25 KB
/
pyproject.toml
File metadata and controls
190 lines (178 loc) · 6.25 KB
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
[tool.poetry]
name = "oblivion"
version = "0.1.0"
description = "Oblivion: Self-Adaptive Agentic Memory Control through Decay-Driven Activation"
authors = ["Ashish Rana", "Chia-Chien Hung", "Qumeng Sun"]
readme = "README.md"
license = "Proprietary"
repository = "https://github.com/nec-research/oblivion"
packages = [
{ include = "oblivion", from = "src" }
]
[tool.poetry.dependencies]
python = ">=3.12,<3.15"
# ---- Level 1: Bare minimum for oblivion core ----
pydantic = "^2.6.0"
pyyaml = "^6.0"
openai = "^2.0.0"
aiohttp = ">=3.13.4"
requests = ">=2.33.0"
pyjwt = ">=2.12.0"
cbor2 = ">=5.9.0"
tiktoken = ">=0.7.0"
tenacity = "^8.2.0"
tqdm = "^4.66.0"
instructor = "^1.7.0"
omegaconf = "^2.3.0"
qdrant-client = "^1.12.0"
# ---- Level 2: Local model support + deployment (optional) ----
sentence-transformers = {version = "^3.4.0", optional = true}
xformers = {version = ">=0.0.33", optional = true}
torch = {version = ">=2.9.1", source = "pytorch-cu128", optional = true}
torchvision = {version = ">=0.24.1", source = "pytorch-cu128", optional = true}
torchaudio = {version = ">=2.9.1", source = "pytorch-cu128", optional = true}
vllm = {version = ">=0.19.0", optional = true, python = ">=3.10,<3.14"}
# ---- Level 3: GoodAI-LTM benchmark + visualization (optional) ----
hydra-core = {version = "^1.3.2", optional = true}
python-dotenv = {version = "^1.0.0", optional = true}
streamlit = {version = "^1.37.0", optional = true}
plotly = {version = "^5.18.0", optional = true}
matplotlib = {version = "^3.8.0", optional = true}
pandas = {version = "^2.0.0", optional = true}
litellm = {version = "^1.83.0", optional = true}
time-machine = {version = "^2.13.0", optional = true}
gdown = {version = "^5.0.0", optional = true}
zstd = {version = "^1.5.5", optional = true}
humanize = {version = "^4.9.0", optional = true}
# ---- Level 4: LongMemEval benchmark (optional) ----
rich = {version = "^13.0.0", optional = true}
backoff = {version = "^2.2.0", optional = true}
numpy = {version = ">=1.26.0", optional = true}
# ---- Deprecated (optional) ----
langfuse = {version = "^2.0.0", optional = true}
[tool.poetry.group.dev.dependencies]
pytest = "^8.0.0"
pytest-mock = "^3.12.0"
pytest-cov = "^4.1.0"
ruff = "^0.8.0"
black = "^26.3.1"
isort = "^5.13.0"
mypy = "^1.11.0"
pre-commit = "^3.7.0"
pyupgrade = "^3.16.0"
pre-commit-hooks = "^4.6.0"
ipykernel = "^7.1.0"
types-pyyaml = "^6.0.12"
[tool.poetry.extras]
# Level 2: Local models + deployment (Linux/CUDA only)
local = ["sentence-transformers", "xformers"]
deployer = ["torch", "torchvision", "torchaudio", "vllm", "sentence-transformers", "xformers"]
# Level 3: GoodAI-LTM benchmark + visualization (includes all of Level 2 deps)
goodai-benchmark = [
"hydra-core", "python-dotenv",
"streamlit", "plotly", "matplotlib", "pandas",
"litellm", "time-machine", "gdown", "zstd", "humanize",
]
# Level 4: LongMemEval benchmark (includes all of Level 3 deps)
lme-benchmark = [
"rich", "backoff", "numpy", "sentence-transformers",
"hydra-core", "python-dotenv",
"streamlit", "plotly", "matplotlib", "pandas",
"litellm", "time-machine", "gdown", "zstd", "humanize",
]
# All experiments (Level 3 + 4 combined)
experiments = [
"hydra-core", "python-dotenv",
"streamlit", "plotly", "matplotlib", "pandas",
"litellm", "time-machine", "gdown", "zstd", "humanize",
"rich", "backoff", "numpy", "sentence-transformers",
]
# Deprecated observability (Langfuse)
deprecated = ["langfuse"]
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
addopts = """
--strict-markers
--tb=short
"""
markers = [
"slow: marks tests as slow",
"integration: marks tests as integration tests",
]
[tool.ruff]
line-length = 120
target-version = "py312"
# Exclude experiments and scripts from strict linting
extend-exclude = ["experiments/*", "scripts/*"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"N", # pep8-naming
"UP", # pyupgrade
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"SIM", # flake8-simplify
"D", # pydocstyle (docstring conventions)
]
ignore = [
"E501", # line too long (handled by formatter)
"D203", # one-blank-line-before-class (conflicts with D211)
"D213", # multi-line-summary-second-line (conflicts with D212)
# Docstring issues - relaxed for flexibility
"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 period
"D401", # first line should be imperative mood
"D415", # first line should end with punctuation
"D417", # missing argument descriptions
"D205", # 1 blank line required between summary and description
# Simplification suggestions - often less readable
"SIM102", # use single if instead of nested
"SIM103", # return condition directly
"SIM108", # use ternary operator
"SIM110", # use any() instead of for loop
"SIM117", # use single with statement
# Other relaxed rules
"E402", # module level import not at top (needed for path setup)
"B904", # raise from (stylistic preference)
"B007", # unused loop variable (common pattern)
"B018", # useless expression
"C414", # unnecessary list in sorted
"UP038", # use X | Y in isinstance
"N806", # variable should be lowercase (constants in functions ok)
]
[tool.ruff.lint.isort]
known-first-party = ["oblivion", "experiments"]
[tool.black]
line-length = 120
target-version = ["py312"]
[tool.isort]
profile = "black"
line_length = 120
known_first_party = ["oblivion", "experiments"]
src_paths = ["src"]
[tool.mypy]
python_version = "3.12"
disallow_untyped_defs = true
ignore_missing_imports = true
strict_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_return_any = true
check_untyped_defs = true
[[tool.poetry.source]]
name = "pytorch-cu128"
url = "https://download.pytorch.org/whl/cu128"
priority = "explicit"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"