value-network 0.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,209 @@
1
+ *.sh
2
+
3
+ # Byte-compiled / optimized / DLL files
4
+ __pycache__/
5
+ *.py[codz]
6
+ *$py.class
7
+
8
+ # C extensions
9
+ *.so
10
+
11
+ # Distribution / packaging
12
+ .Python
13
+ build/
14
+ develop-eggs/
15
+ dist/
16
+ downloads/
17
+ eggs/
18
+ .eggs/
19
+ lib/
20
+ lib64/
21
+ parts/
22
+ sdist/
23
+ var/
24
+ wheels/
25
+ share/python-wheels/
26
+ *.egg-info/
27
+ .installed.cfg
28
+ *.egg
29
+ MANIFEST
30
+
31
+ # PyInstaller
32
+ # Usually these files are written by a python script from a template
33
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
34
+ *.manifest
35
+ *.spec
36
+
37
+ # Installer logs
38
+ pip-log.txt
39
+ pip-delete-this-directory.txt
40
+
41
+ # Unit test / coverage reports
42
+ htmlcov/
43
+ .tox/
44
+ .nox/
45
+ .coverage
46
+ .coverage.*
47
+ .cache
48
+ nosetests.xml
49
+ coverage.xml
50
+ *.cover
51
+ *.py.cover
52
+ .hypothesis/
53
+ .pytest_cache/
54
+ cover/
55
+
56
+ # Translations
57
+ *.mo
58
+ *.pot
59
+
60
+ # Django stuff:
61
+ *.log
62
+ local_settings.py
63
+ db.sqlite3
64
+ db.sqlite3-journal
65
+
66
+ # Flask stuff:
67
+ instance/
68
+ .webassets-cache
69
+
70
+ # Scrapy stuff:
71
+ .scrapy
72
+
73
+ # Sphinx documentation
74
+ docs/_build/
75
+
76
+ # PyBuilder
77
+ .pybuilder/
78
+ target/
79
+
80
+ # Jupyter Notebook
81
+ .ipynb_checkpoints
82
+
83
+ # IPython
84
+ profile_default/
85
+ ipython_config.py
86
+
87
+ # pyenv
88
+ # For a library or package, you might want to ignore these files since the code is
89
+ # intended to run in multiple environments; otherwise, check them in:
90
+ # .python-version
91
+
92
+ # pipenv
93
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
94
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
95
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
96
+ # install all needed dependencies.
97
+ #Pipfile.lock
98
+
99
+ # UV
100
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
101
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
102
+ # commonly ignored for libraries.
103
+ #uv.lock
104
+
105
+ # poetry
106
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
107
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
108
+ # commonly ignored for libraries.
109
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
110
+ #poetry.lock
111
+ #poetry.toml
112
+
113
+ # pdm
114
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
115
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
116
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
117
+ #pdm.lock
118
+ #pdm.toml
119
+ .pdm-python
120
+ .pdm-build/
121
+
122
+ # pixi
123
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
124
+ #pixi.lock
125
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
126
+ # in the .venv directory. It is recommended not to include this directory in version control.
127
+ .pixi
128
+
129
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
130
+ __pypackages__/
131
+
132
+ # Celery stuff
133
+ celerybeat-schedule
134
+ celerybeat.pid
135
+
136
+ # SageMath parsed files
137
+ *.sage.py
138
+
139
+ # Environments
140
+ .env
141
+ .envrc
142
+ .venv
143
+ env/
144
+ venv/
145
+ ENV/
146
+ env.bak/
147
+ venv.bak/
148
+
149
+ # Spyder project settings
150
+ .spyderproject
151
+ .spyproject
152
+
153
+ # Rope project settings
154
+ .ropeproject
155
+
156
+ # mkdocs documentation
157
+ /site
158
+
159
+ # mypy
160
+ .mypy_cache/
161
+ .dmypy.json
162
+ dmypy.json
163
+
164
+ # Pyre type checker
165
+ .pyre/
166
+
167
+ # pytype static type analyzer
168
+ .pytype/
169
+
170
+ # Cython debug symbols
171
+ cython_debug/
172
+
173
+ # PyCharm
174
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
175
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
176
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
177
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
178
+ #.idea/
179
+
180
+ # Abstra
181
+ # Abstra is an AI-powered process automation framework.
182
+ # Ignore directories containing user credentials, local state, and settings.
183
+ # Learn more at https://abstra.io/docs
184
+ .abstra/
185
+
186
+ # Visual Studio Code
187
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
188
+ # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
189
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
190
+ # you could uncomment the following to ignore the entire vscode folder
191
+ # .vscode/
192
+
193
+ # Ruff stuff:
194
+ .ruff_cache/
195
+
196
+ # PyPI configuration file
197
+ .pypirc
198
+
199
+ # Cursor
200
+ # Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
201
+ # exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
202
+ # refer to https://docs.cursor.com/context/ignore-files
203
+ .cursorignore
204
+ .cursorindexingignore
205
+
206
+ # Marimo
207
+ marimo/_static/
208
+ marimo/_lsp/
209
+ __marimo__/
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Phil Wang
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,98 @@
1
+ Metadata-Version: 2.4
2
+ Name: value-network
3
+ Version: 0.0.1
4
+ Summary: Value networks
5
+ Project-URL: Homepage, https://pypi.org/project/value-network/
6
+ Project-URL: Repository, https://github.com/lucidrains/value-network
7
+ Author-email: Phil Wang <lucidrains@gmail.com>
8
+ License: MIT License
9
+
10
+ Copyright (c) 2026 Phil Wang
11
+
12
+ Permission is hereby granted, free of charge, to any person obtaining a copy
13
+ of this software and associated documentation files (the "Software"), to deal
14
+ in the Software without restriction, including without limitation the rights
15
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
+ copies of the Software, and to permit persons to whom the Software is
17
+ furnished to do so, subject to the following conditions:
18
+
19
+ The above copyright notice and this permission notice shall be included in all
20
+ copies or substantial portions of the Software.
21
+
22
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
+ SOFTWARE.
29
+ License-File: LICENSE
30
+ Keywords: artificial intelligence,deep learning,value networks
31
+ Classifier: Development Status :: 4 - Beta
32
+ Classifier: Intended Audience :: Developers
33
+ Classifier: License :: OSI Approved :: MIT License
34
+ Classifier: Programming Language :: Python :: 3.10
35
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
36
+ Requires-Python: >=3.10
37
+ Requires-Dist: einops>=0.8.2
38
+ Requires-Dist: hl-gauss-pytorch
39
+ Requires-Dist: torch-einops-utils>=0.0.20
40
+ Requires-Dist: torch>=2.5
41
+ Provides-Extra: examples
42
+ Provides-Extra: test
43
+ Requires-Dist: pytest; extra == 'test'
44
+ Description-Content-Type: text/markdown
45
+
46
+
47
+ ## Value network (wip)
48
+
49
+ Exploration into some new research surrounding value networks
50
+
51
+ ## Citations
52
+
53
+ ```bibtex
54
+ @article{Farebrother2024StopRT,
55
+ title = {Stop Regressing: Training Value Functions via Classification for Scalable Deep RL},
56
+ author = {Jesse Farebrother and Jordi Orbay and Quan Ho Vuong and Adrien Ali Taiga and Yevgen Chebotar and Ted Xiao and Alex Irpan and Sergey Levine and Pablo Samuel Castro and Aleksandra Faust and Aviral Kumar and Rishabh Agarwal},
57
+ journal = {ArXiv},
58
+ year = {2024},
59
+ volume = {abs/2403.03950},
60
+ url = {https://api.semanticscholar.org/CorpusID:268253088}
61
+ }
62
+ ```
63
+
64
+ ```bibtex
65
+ @misc{lee2025banelexplorationposteriorsgenerative,
66
+ title = {BaNEL: Exploration Posteriors for Generative Modeling Using Only Negative Rewards},
67
+ author = {Sangyun Lee and Brandon Amos and Giulia Fanti},
68
+ year = {2025},
69
+ eprint = {2510.09596},
70
+ archivePrefix = {arXiv},
71
+ primaryClass = {cs.LG},
72
+ url = {https://arxiv.org/abs/2510.09596},
73
+ }
74
+ ```
75
+
76
+ ```bibtex
77
+ @misc{ma2024visionlanguagemodelsincontext,
78
+ title = {Vision Language Models are In-Context Value Learners},
79
+ author = {Yecheng Jason Ma and Joey Hejna and Ayzaan Wahid and Chuyuan Fu and Dhruv Shah and Jacky Liang and Zhuo Xu and Sean Kirmani and Peng Xu and Danny Driess and Ted Xiao and Jonathan Tompson and Osbert Bastani and Dinesh Jayaraman and Wenhao Yu and Tingnan Zhang and Dorsa Sadigh and Fei Xia},
80
+ year = {2024},
81
+ eprint = {2411.04549},
82
+ archivePrefix = {arXiv},
83
+ primaryClass = {cs.RO},
84
+ url = {https://arxiv.org/abs/2411.04549},
85
+ }
86
+ ```
87
+
88
+ ```bibtex
89
+ @misc{yang2026riseselfimprovingrobotpolicy,
90
+ title = {RISE: Self-Improving Robot Policy with Compositional World Model},
91
+ author = {Jiazhi Yang and Kunyang Lin and Jinwei Li and Wencong Zhang and Tianwei Lin and Longyan Wu and Zhizhong Su and Hao Zhao and Ya-Qin Zhang and Li Chen and Ping Luo and Xiangyu Yue and Hongyang Li},
92
+ year = {2026},
93
+ eprint = {2602.11075},
94
+ archivePrefix = {arXiv},
95
+ primaryClass = {cs.RO},
96
+ url = {https://arxiv.org/abs/2602.11075},
97
+ }
98
+ ```
@@ -0,0 +1,53 @@
1
+
2
+ ## Value network (wip)
3
+
4
+ Exploration into some new research surrounding value networks
5
+
6
+ ## Citations
7
+
8
+ ```bibtex
9
+ @article{Farebrother2024StopRT,
10
+ title = {Stop Regressing: Training Value Functions via Classification for Scalable Deep RL},
11
+ author = {Jesse Farebrother and Jordi Orbay and Quan Ho Vuong and Adrien Ali Taiga and Yevgen Chebotar and Ted Xiao and Alex Irpan and Sergey Levine and Pablo Samuel Castro and Aleksandra Faust and Aviral Kumar and Rishabh Agarwal},
12
+ journal = {ArXiv},
13
+ year = {2024},
14
+ volume = {abs/2403.03950},
15
+ url = {https://api.semanticscholar.org/CorpusID:268253088}
16
+ }
17
+ ```
18
+
19
+ ```bibtex
20
+ @misc{lee2025banelexplorationposteriorsgenerative,
21
+ title = {BaNEL: Exploration Posteriors for Generative Modeling Using Only Negative Rewards},
22
+ author = {Sangyun Lee and Brandon Amos and Giulia Fanti},
23
+ year = {2025},
24
+ eprint = {2510.09596},
25
+ archivePrefix = {arXiv},
26
+ primaryClass = {cs.LG},
27
+ url = {https://arxiv.org/abs/2510.09596},
28
+ }
29
+ ```
30
+
31
+ ```bibtex
32
+ @misc{ma2024visionlanguagemodelsincontext,
33
+ title = {Vision Language Models are In-Context Value Learners},
34
+ author = {Yecheng Jason Ma and Joey Hejna and Ayzaan Wahid and Chuyuan Fu and Dhruv Shah and Jacky Liang and Zhuo Xu and Sean Kirmani and Peng Xu and Danny Driess and Ted Xiao and Jonathan Tompson and Osbert Bastani and Dinesh Jayaraman and Wenhao Yu and Tingnan Zhang and Dorsa Sadigh and Fei Xia},
35
+ year = {2024},
36
+ eprint = {2411.04549},
37
+ archivePrefix = {arXiv},
38
+ primaryClass = {cs.RO},
39
+ url = {https://arxiv.org/abs/2411.04549},
40
+ }
41
+ ```
42
+
43
+ ```bibtex
44
+ @misc{yang2026riseselfimprovingrobotpolicy,
45
+ title = {RISE: Self-Improving Robot Policy with Compositional World Model},
46
+ author = {Jiazhi Yang and Kunyang Lin and Jinwei Li and Wencong Zhang and Tianwei Lin and Longyan Wu and Zhizhong Su and Hao Zhao and Ya-Qin Zhang and Li Chen and Ping Luo and Xiangyu Yue and Hongyang Li},
47
+ year = {2026},
48
+ eprint = {2602.11075},
49
+ archivePrefix = {arXiv},
50
+ primaryClass = {cs.RO},
51
+ url = {https://arxiv.org/abs/2602.11075},
52
+ }
53
+ ```
@@ -0,0 +1,59 @@
1
+ [project]
2
+ name = "value-network"
3
+ version = "0.0.1"
4
+ description = "Value networks"
5
+ authors = [
6
+ { name = "Phil Wang", email = "lucidrains@gmail.com" }
7
+ ]
8
+ readme = "README.md"
9
+ requires-python = ">= 3.10"
10
+ license = { file = "LICENSE" }
11
+ keywords = [
12
+ 'artificial intelligence',
13
+ 'deep learning',
14
+ 'value networks',
15
+ ]
16
+
17
+ classifiers=[
18
+ 'Development Status :: 4 - Beta',
19
+ 'Intended Audience :: Developers',
20
+ 'Topic :: Scientific/Engineering :: Artificial Intelligence',
21
+ 'License :: OSI Approved :: MIT License',
22
+ 'Programming Language :: Python :: 3.10',
23
+ ]
24
+
25
+ dependencies = [
26
+ "einops>=0.8.2",
27
+ "hl-gauss-pytorch",
28
+ "torch>=2.5",
29
+ "torch-einops-utils>=0.0.20",
30
+ ]
31
+
32
+ [project.urls]
33
+ Homepage = "https://pypi.org/project/value-network/"
34
+ Repository = "https://github.com/lucidrains/value-network"
35
+
36
+ [project.optional-dependencies]
37
+ examples = []
38
+ test = [
39
+ "pytest"
40
+ ]
41
+
42
+ [tool.pytest.ini_options]
43
+ pythonpath = [
44
+ "."
45
+ ]
46
+
47
+ [build-system]
48
+ requires = ["hatchling"]
49
+ build-backend = "hatchling.build"
50
+
51
+ [tool.rye]
52
+ managed = true
53
+ dev-dependencies = []
54
+
55
+ [tool.hatch.metadata]
56
+ allow-direct-references = true
57
+
58
+ [tool.hatch.build.targets.wheel]
59
+ packages = ["value_network"]
@@ -0,0 +1,3 @@
1
+
2
+ def test_value():
3
+ assert True
@@ -0,0 +1 @@
1
+ from value_network.value_network import ValueNetwork
@@ -0,0 +1,24 @@
1
+ import torch
2
+ from torch.nn import Module
3
+
4
+ # functions
5
+
6
+ def exists(v):
7
+ return v is not None
8
+
9
+ def default(v, d):
10
+ return v if exists(v) else d
11
+
12
+ # network
13
+
14
+ class ValueNetwork(Module):
15
+ def __init__(
16
+ self
17
+ ):
18
+ super().__init__()
19
+
20
+ def forward(
21
+ self,
22
+ state
23
+ ):
24
+ return 0.