strands-vjepa 0.1.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.
Files changed (85) hide show
  1. strands_vjepa-0.1.1/.github/workflows/auto-release.yml +71 -0
  2. strands_vjepa-0.1.1/.github/workflows/docs.yml +30 -0
  3. strands_vjepa-0.1.1/.gitignore +28 -0
  4. strands_vjepa-0.1.1/LICENSE +201 -0
  5. strands_vjepa-0.1.1/PKG-INFO +164 -0
  6. strands_vjepa-0.1.1/README.md +108 -0
  7. strands_vjepa-0.1.1/demo/demo.sh +64 -0
  8. strands_vjepa-0.1.1/demo/strands-vjepa.cast +17 -0
  9. strands_vjepa-0.1.1/demo/strands-vjepa.gif +0 -0
  10. strands_vjepa-0.1.1/demo/strands-vjepa.mp4 +0 -0
  11. strands_vjepa-0.1.1/docs/api-reference.md +217 -0
  12. strands_vjepa-0.1.1/docs/architecture.md +112 -0
  13. strands_vjepa-0.1.1/docs/assets/strands-vjepa.cast +17 -0
  14. strands_vjepa-0.1.1/docs/assets/strands-vjepa.gif +0 -0
  15. strands_vjepa-0.1.1/docs/assets/strands-vjepa.mp4 +0 -0
  16. strands_vjepa-0.1.1/docs/examples/agent-planning.md +75 -0
  17. strands_vjepa-0.1.1/docs/examples/encode-video.md +53 -0
  18. strands_vjepa-0.1.1/docs/examples/load-model.md +35 -0
  19. strands_vjepa-0.1.1/docs/examples/overview.md +40 -0
  20. strands_vjepa-0.1.1/docs/examples/plan-to-goal.md +79 -0
  21. strands_vjepa-0.1.1/docs/examples/pretrained-e2e.md +134 -0
  22. strands_vjepa-0.1.1/docs/examples/robot-policy.md +96 -0
  23. strands_vjepa-0.1.1/docs/getting-started/installation.md +78 -0
  24. strands_vjepa-0.1.1/docs/getting-started/quickstart.md +103 -0
  25. strands_vjepa-0.1.1/docs/getting-started/smoke-test.md +47 -0
  26. strands_vjepa-0.1.1/docs/guide/evaluation.md +136 -0
  27. strands_vjepa-0.1.1/docs/guide/planner.md +88 -0
  28. strands_vjepa-0.1.1/docs/guide/pretrained.md +94 -0
  29. strands_vjepa-0.1.1/docs/guide/robot-policy.md +103 -0
  30. strands_vjepa-0.1.1/docs/guide/tools.md +225 -0
  31. strands_vjepa-0.1.1/docs/guide/training.md +179 -0
  32. strands_vjepa-0.1.1/docs/guide/why-vjepa.md +58 -0
  33. strands_vjepa-0.1.1/docs/guide/world-model.md +87 -0
  34. strands_vjepa-0.1.1/docs/index.md +181 -0
  35. strands_vjepa-0.1.1/docs/strands-vjepa-logo.png +0 -0
  36. strands_vjepa-0.1.1/docs/strands-vjepa-logo.svg +135 -0
  37. strands_vjepa-0.1.1/docs/stylesheets/extra.css +29 -0
  38. strands_vjepa-0.1.1/examples/01_load_model.py +8 -0
  39. strands_vjepa-0.1.1/examples/02_encode_video.py +15 -0
  40. strands_vjepa-0.1.1/examples/03_plan_to_goal.py +26 -0
  41. strands_vjepa-0.1.1/examples/04_agent_uses_planner.py +17 -0
  42. strands_vjepa-0.1.1/examples/05_robot_policy.py +42 -0
  43. strands_vjepa-0.1.1/examples/06_pretrained_e2e.py +57 -0
  44. strands_vjepa-0.1.1/mkdocs.yml +99 -0
  45. strands_vjepa-0.1.1/pyproject.toml +96 -0
  46. strands_vjepa-0.1.1/setup.cfg +4 -0
  47. strands_vjepa-0.1.1/strands_vjepa/__init__.py +77 -0
  48. strands_vjepa-0.1.1/strands_vjepa/_version.py +24 -0
  49. strands_vjepa-0.1.1/strands_vjepa/eval/__init__.py +6 -0
  50. strands_vjepa-0.1.1/strands_vjepa/eval/attentive_pooler.py +169 -0
  51. strands_vjepa-0.1.1/strands_vjepa/eval/config.py +51 -0
  52. strands_vjepa-0.1.1/strands_vjepa/eval/datasets.py +167 -0
  53. strands_vjepa-0.1.1/strands_vjepa/eval/video_classification.py +268 -0
  54. strands_vjepa-0.1.1/strands_vjepa/planner.py +207 -0
  55. strands_vjepa-0.1.1/strands_vjepa/policy.py +298 -0
  56. strands_vjepa-0.1.1/strands_vjepa/tools/__init__.py +39 -0
  57. strands_vjepa-0.1.1/strands_vjepa/tools/_cache.py +36 -0
  58. strands_vjepa-0.1.1/strands_vjepa/tools/vjepa_encode.py +113 -0
  59. strands_vjepa-0.1.1/strands_vjepa/tools/vjepa_eval.py +98 -0
  60. strands_vjepa-0.1.1/strands_vjepa/tools/vjepa_inspect.py +138 -0
  61. strands_vjepa-0.1.1/strands_vjepa/tools/vjepa_plan.py +107 -0
  62. strands_vjepa-0.1.1/strands_vjepa/tools/vjepa_pretrain.py +127 -0
  63. strands_vjepa-0.1.1/strands_vjepa/tools/vjepa_rollout.py +92 -0
  64. strands_vjepa-0.1.1/strands_vjepa/tools/vjepa_train.py +110 -0
  65. strands_vjepa-0.1.1/strands_vjepa/training/__init__.py +22 -0
  66. strands_vjepa-0.1.1/strands_vjepa/training/ac_finetune.py +406 -0
  67. strands_vjepa-0.1.1/strands_vjepa/training/config.py +85 -0
  68. strands_vjepa-0.1.1/strands_vjepa/training/droid_dataset.py +317 -0
  69. strands_vjepa-0.1.1/strands_vjepa/training/masking.py +210 -0
  70. strands_vjepa-0.1.1/strands_vjepa/training/predictor.py +241 -0
  71. strands_vjepa-0.1.1/strands_vjepa/training/pretrain.py +427 -0
  72. strands_vjepa-0.1.1/strands_vjepa/training/schedulers.py +62 -0
  73. strands_vjepa-0.1.1/strands_vjepa/training/transforms.py +110 -0
  74. strands_vjepa-0.1.1/strands_vjepa/world_model.py +614 -0
  75. strands_vjepa-0.1.1/strands_vjepa.egg-info/PKG-INFO +164 -0
  76. strands_vjepa-0.1.1/strands_vjepa.egg-info/SOURCES.txt +83 -0
  77. strands_vjepa-0.1.1/strands_vjepa.egg-info/dependency_links.txt +1 -0
  78. strands_vjepa-0.1.1/strands_vjepa.egg-info/requires.txt +49 -0
  79. strands_vjepa-0.1.1/strands_vjepa.egg-info/top_level.txt +1 -0
  80. strands_vjepa-0.1.1/test_vjepa.py +69 -0
  81. strands_vjepa-0.1.1/tests/__init__.py +0 -0
  82. strands_vjepa-0.1.1/tests/test_deep.py +322 -0
  83. strands_vjepa-0.1.1/tests/test_hf_integration.py +43 -0
  84. strands_vjepa-0.1.1/tests/test_planner.py +39 -0
  85. strands_vjepa-0.1.1/tests/test_world_model.py +65 -0
@@ -0,0 +1,71 @@
1
+ name: Auto Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v*.*.*'
7
+
8
+ permissions:
9
+ contents: write
10
+ packages: write
11
+ id-token: write
12
+
13
+ jobs:
14
+ auto-release:
15
+ runs-on: ubuntu-latest
16
+
17
+ steps:
18
+ - name: Checkout code
19
+ uses: actions/checkout@v4
20
+ with:
21
+ fetch-depth: 0
22
+
23
+ - name: Set up Python
24
+ uses: actions/setup-python@v4
25
+ with:
26
+ python-version: "3.12"
27
+
28
+ - name: Install dependencies
29
+ run: |
30
+ python -m pip install --upgrade pip
31
+ pip install build twine
32
+
33
+ - name: Extract version from tag
34
+ id: get_version
35
+ run: |
36
+ VERSION=${GITHUB_REF#refs/tags/v}
37
+ echo "version=$VERSION" >> $GITHUB_OUTPUT
38
+ echo "Version: $VERSION"
39
+
40
+ - name: Build package
41
+ run: python -m build
42
+
43
+ - name: Publish to PyPI
44
+ env:
45
+ TWINE_USERNAME: __token__
46
+ TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
47
+ run: twine upload dist/*
48
+
49
+ - name: Create GitHub Release
50
+ uses: actions/create-release@v1
51
+ env:
52
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53
+ with:
54
+ tag_name: ${{ github.ref }}
55
+ release_name: strands-vjepa v${{ steps.get_version.outputs.version }}
56
+ body: |
57
+ ## 🌀 strands-vjepa v${{ steps.get_version.outputs.version }}
58
+
59
+ V-JEPA 2 world model, planner & robot policy for Strands Agents.
60
+
61
+ ### Install
62
+ ```bash
63
+ pip install strands-vjepa==${{ steps.get_version.outputs.version }}
64
+ ```
65
+
66
+ ### Upgrade
67
+ ```bash
68
+ pip install --upgrade strands-vjepa
69
+ ```
70
+ draft: false
71
+ prerelease: false
@@ -0,0 +1,30 @@
1
+ name: Deploy Docs
2
+ on:
3
+ push:
4
+ branches: [main]
5
+ pull_request:
6
+ branches: [main]
7
+
8
+ permissions:
9
+ contents: write
10
+
11
+ jobs:
12
+ deploy:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+
17
+ - uses: actions/setup-python@v5
18
+ with:
19
+ python-version: '3.12'
20
+
21
+ - name: Install mkdocs
22
+ run: |
23
+ pip install mkdocs-material pymdown-extensions
24
+
25
+ - name: Build docs
26
+ run: mkdocs build --strict
27
+
28
+ - name: Deploy to GitHub Pages
29
+ if: github.ref == 'refs/heads/main' && github.event_name == 'push'
30
+ run: mkdocs gh-deploy --force
@@ -0,0 +1,28 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ *$py.class
4
+ *.so
5
+ .Python
6
+ build/
7
+ dist/
8
+ *.egg-info/
9
+ .eggs/
10
+ .venv/
11
+ venv/
12
+ env/
13
+ .env
14
+ .ipynb_checkpoints/
15
+ .pytest_cache/
16
+ .ruff_cache/
17
+ .DS_Store
18
+ *.pth
19
+ *.pt
20
+ *.ckpt
21
+ checkpoints/
22
+ .cache/
23
+
24
+ # Sibling clones (for local dev/testing)
25
+ robots/
26
+
27
+ site/
28
+ strands_vjepa/_version.py
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,164 @@
1
+ Metadata-Version: 2.4
2
+ Name: strands-vjepa
3
+ Version: 0.1.1
4
+ Summary: V-JEPA 2 world model & action-conditioned planner for Strands Agents
5
+ Author-email: Cagatay Cali <cagataycali@icloud.com>
6
+ License: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/cagataycali/strands-vjepa
8
+ Project-URL: Repository, https://github.com/cagataycali/strands-vjepa
9
+ Project-URL: Issues, https://github.com/cagataycali/strands-vjepa/issues
10
+ Keywords: strands,agents,vjepa,vjepa2,world-model,physical-ai,robotics,planning,cem
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: Apache Software License
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
20
+ Requires-Python: >=3.10
21
+ Description-Content-Type: text/markdown
22
+ License-File: LICENSE
23
+ Requires-Dist: strands-agents
24
+ Requires-Dist: cc-vjepa2>=0.0.3
25
+ Requires-Dist: torch>=2.0.0
26
+ Requires-Dist: torchvision
27
+ Requires-Dist: timm>=0.9.0
28
+ Requires-Dist: einops>=0.7.0
29
+ Requires-Dist: numpy
30
+ Requires-Dist: pillow>=10.0.0
31
+ Requires-Dist: pyyaml>=6.0
32
+ Provides-Extra: video
33
+ Requires-Dist: decord>=0.6.0; platform_machine == "x86_64" and extra == "video"
34
+ Requires-Dist: decord2>=3.3.0; platform_machine == "aarch64" and extra == "video"
35
+ Requires-Dist: decord2>=3.3.0; (platform_system == "Darwin" and platform_machine == "arm64") and extra == "video"
36
+ Requires-Dist: av>=11.0.0; extra == "video"
37
+ Provides-Extra: hf
38
+ Requires-Dist: transformers>=4.40.0; extra == "hf"
39
+ Requires-Dist: huggingface_hub>=0.20.0; extra == "hf"
40
+ Provides-Extra: robots
41
+ Provides-Extra: dev
42
+ Requires-Dist: pytest>=7.0; extra == "dev"
43
+ Requires-Dist: pytest-asyncio; extra == "dev"
44
+ Requires-Dist: ruff; extra == "dev"
45
+ Provides-Extra: all
46
+ Requires-Dist: strands-agents-tools; extra == "all"
47
+ Requires-Dist: transformers>=4.40.0; extra == "all"
48
+ Requires-Dist: huggingface_hub>=0.20.0; extra == "all"
49
+ Requires-Dist: av>=11.0.0; extra == "all"
50
+ Requires-Dist: decord>=0.6.0; platform_machine == "x86_64" and extra == "all"
51
+ Requires-Dist: decord2>=3.3.0; platform_machine == "aarch64" and extra == "all"
52
+ Requires-Dist: decord2>=3.3.0; (platform_system == "Darwin" and platform_machine == "arm64") and extra == "all"
53
+ Requires-Dist: pytest>=7.0; extra == "all"
54
+ Requires-Dist: ruff; extra == "all"
55
+ Dynamic: license-file
56
+
57
+ <div align="center">
58
+ <img src="docs/strands-vjepa-logo.svg" alt="strands-vjepa" width="140">
59
+
60
+ # strands-vjepa
61
+
62
+ **V-JEPA 2 as a world model, planner, and robot policy for [Strands Agents](https://github.com/strands-agents/strands-agents).**
63
+
64
+ [![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)
65
+ [![Python 3.10+](https://img.shields.io/badge/python-3.10%2B-blue.svg)]()
66
+ </div>
67
+
68
+ ---
69
+
70
+ ## Install
71
+
72
+ ```bash
73
+ pip install strands-vjepa
74
+ ```
75
+
76
+ ## What you get
77
+
78
+ | Layer | What it does |
79
+ |-------|-------------|
80
+ | `WorldModel` / `HFWorldModel` | Encode video → latents, predict next state |
81
+ | `CEMPlanner` | Cross-Entropy Method search over action space |
82
+ | `VJepaPolicy` | Drop-in `strands-robots` Policy (zero-shot action head) |
83
+ | 7 agent tools | `vjepa_encode`, `vjepa_plan`, `vjepa_rollout`, `vjepa_train`, `vjepa_pretrain`, `vjepa_eval`, `vjepa_inspect` |
84
+ | Training | AC fine-tuning + JEPA self-supervised pretraining |
85
+ | Evaluation | Frozen-backbone probes (SSv2, K400, IN1K) |
86
+
87
+ ## Quick start
88
+
89
+ ### Encode + plan (zero-shot, no training)
90
+
91
+ ```python
92
+ from strands_vjepa import WorldModel, CEMPlanner
93
+ from strands_vjepa.planner import CEMConfig
94
+ import torch
95
+
96
+ wm = WorldModel.from_pretrained("facebook/vjepa2-ac-vitl", device="cuda")
97
+ obs = wm.encode(torch.rand(1, 3, 16, 256, 256))
98
+ goal = wm.encode(torch.rand(1, 3, 16, 256, 256))
99
+
100
+ planner = CEMPlanner(wm, CEMConfig(horizon=8, n_samples=256))
101
+ result = planner.plan(obs, goal)
102
+ print(result.actions.shape) # [8, 7]
103
+ ```
104
+
105
+ ### HuggingFace pretrained (real weights)
106
+
107
+ ```python
108
+ from strands_vjepa import HFWorldModel
109
+
110
+ wm = HFWorldModel.from_hf("facebook/vjepa2-vitl-fpc16-256-ssv2")
111
+ latents = wm.encode(video) # [1, 2048, 1024]
112
+ logits = wm.classify(video) # [1, 174] (SSv2 classes)
113
+ ```
114
+
115
+ ### As Strands Agent tools
116
+
117
+ ```python
118
+ from strands import Agent
119
+ from strands_vjepa.tools import vjepa_encode, vjepa_plan, vjepa_rollout
120
+
121
+ agent = Agent(tools=[vjepa_encode, vjepa_plan, vjepa_rollout])
122
+ agent("Plan 8 actions from obs.jpg to goal.jpg for a 7-DoF arm")
123
+ ```
124
+
125
+ ### As a robot policy
126
+
127
+ ```python
128
+ import strands_vjepa # auto-registers with strands-robots
129
+ from strands_robots.policies import create_policy
130
+
131
+ policy = create_policy("vjepa", world_model=wm, action_dim=7, horizon=8)
132
+ actions = await policy.get_actions(obs_dict, "goal.jpg")
133
+ ```
134
+
135
+ ### Fine-tune on your data
136
+
137
+ ```python
138
+ from strands_vjepa.training import ACFineTuner, ACTrainingConfig
139
+
140
+ config = ACTrainingConfig(data_path="/data/trajectories", epochs=100)
141
+ ACFineTuner(config).train()
142
+ ```
143
+
144
+ ## Architecture
145
+
146
+ ```
147
+ strands_vjepa/
148
+ ├── world_model.py # Encoder + AC predictor
149
+ ├── planner.py # CEM planner
150
+ ├── policy.py # strands-robots Policy
151
+ ├── tools/ # 7 @tool-decorated agent tools
152
+ ├── training/ # AC fine-tune + JEPA pretrain + DROID dataset
153
+ ├── eval/ # Frozen-backbone classification probes
154
+ └── vendored/ # V-JEPA 2 model code (MIT, from Meta)
155
+ ```
156
+
157
+ ## Upstream
158
+
159
+ Built on [V-JEPA 2](https://github.com/facebookresearch/vjepa2) (Meta AI, Apache 2.0).
160
+ This package depends on [`cagataycali/vjepa2`](https://github.com/cagataycali/vjepa2) — a fork with 10 community patches (MPS, ST-A², bugfixes).
161
+
162
+ ## License
163
+
164
+ Apache 2.0
@@ -0,0 +1,108 @@
1
+ <div align="center">
2
+ <img src="docs/strands-vjepa-logo.svg" alt="strands-vjepa" width="140">
3
+
4
+ # strands-vjepa
5
+
6
+ **V-JEPA 2 as a world model, planner, and robot policy for [Strands Agents](https://github.com/strands-agents/strands-agents).**
7
+
8
+ [![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)
9
+ [![Python 3.10+](https://img.shields.io/badge/python-3.10%2B-blue.svg)]()
10
+ </div>
11
+
12
+ ---
13
+
14
+ ## Install
15
+
16
+ ```bash
17
+ pip install strands-vjepa
18
+ ```
19
+
20
+ ## What you get
21
+
22
+ | Layer | What it does |
23
+ |-------|-------------|
24
+ | `WorldModel` / `HFWorldModel` | Encode video → latents, predict next state |
25
+ | `CEMPlanner` | Cross-Entropy Method search over action space |
26
+ | `VJepaPolicy` | Drop-in `strands-robots` Policy (zero-shot action head) |
27
+ | 7 agent tools | `vjepa_encode`, `vjepa_plan`, `vjepa_rollout`, `vjepa_train`, `vjepa_pretrain`, `vjepa_eval`, `vjepa_inspect` |
28
+ | Training | AC fine-tuning + JEPA self-supervised pretraining |
29
+ | Evaluation | Frozen-backbone probes (SSv2, K400, IN1K) |
30
+
31
+ ## Quick start
32
+
33
+ ### Encode + plan (zero-shot, no training)
34
+
35
+ ```python
36
+ from strands_vjepa import WorldModel, CEMPlanner
37
+ from strands_vjepa.planner import CEMConfig
38
+ import torch
39
+
40
+ wm = WorldModel.from_pretrained("facebook/vjepa2-ac-vitl", device="cuda")
41
+ obs = wm.encode(torch.rand(1, 3, 16, 256, 256))
42
+ goal = wm.encode(torch.rand(1, 3, 16, 256, 256))
43
+
44
+ planner = CEMPlanner(wm, CEMConfig(horizon=8, n_samples=256))
45
+ result = planner.plan(obs, goal)
46
+ print(result.actions.shape) # [8, 7]
47
+ ```
48
+
49
+ ### HuggingFace pretrained (real weights)
50
+
51
+ ```python
52
+ from strands_vjepa import HFWorldModel
53
+
54
+ wm = HFWorldModel.from_hf("facebook/vjepa2-vitl-fpc16-256-ssv2")
55
+ latents = wm.encode(video) # [1, 2048, 1024]
56
+ logits = wm.classify(video) # [1, 174] (SSv2 classes)
57
+ ```
58
+
59
+ ### As Strands Agent tools
60
+
61
+ ```python
62
+ from strands import Agent
63
+ from strands_vjepa.tools import vjepa_encode, vjepa_plan, vjepa_rollout
64
+
65
+ agent = Agent(tools=[vjepa_encode, vjepa_plan, vjepa_rollout])
66
+ agent("Plan 8 actions from obs.jpg to goal.jpg for a 7-DoF arm")
67
+ ```
68
+
69
+ ### As a robot policy
70
+
71
+ ```python
72
+ import strands_vjepa # auto-registers with strands-robots
73
+ from strands_robots.policies import create_policy
74
+
75
+ policy = create_policy("vjepa", world_model=wm, action_dim=7, horizon=8)
76
+ actions = await policy.get_actions(obs_dict, "goal.jpg")
77
+ ```
78
+
79
+ ### Fine-tune on your data
80
+
81
+ ```python
82
+ from strands_vjepa.training import ACFineTuner, ACTrainingConfig
83
+
84
+ config = ACTrainingConfig(data_path="/data/trajectories", epochs=100)
85
+ ACFineTuner(config).train()
86
+ ```
87
+
88
+ ## Architecture
89
+
90
+ ```
91
+ strands_vjepa/
92
+ ├── world_model.py # Encoder + AC predictor
93
+ ├── planner.py # CEM planner
94
+ ├── policy.py # strands-robots Policy
95
+ ├── tools/ # 7 @tool-decorated agent tools
96
+ ├── training/ # AC fine-tune + JEPA pretrain + DROID dataset
97
+ ├── eval/ # Frozen-backbone classification probes
98
+ └── vendored/ # V-JEPA 2 model code (MIT, from Meta)
99
+ ```
100
+
101
+ ## Upstream
102
+
103
+ Built on [V-JEPA 2](https://github.com/facebookresearch/vjepa2) (Meta AI, Apache 2.0).
104
+ This package depends on [`cagataycali/vjepa2`](https://github.com/cagataycali/vjepa2) — a fork with 10 community patches (MPS, ST-A², bugfixes).
105
+
106
+ ## License
107
+
108
+ Apache 2.0
@@ -0,0 +1,64 @@
1
+ #!/bin/bash
2
+ # strands-vjepa e2e demo — record with:
3
+ # asciinema rec demo/strands-vjepa.cast -c "bash demo/demo.sh" --overwrite --cols 100 --rows 30
4
+ set -e
5
+ cd "$(dirname "$0")/.."
6
+ source .venv/bin/activate
7
+
8
+ export TRANSFORMERS_VERBOSITY=error
9
+ export TRANSFORMERS_NO_ADVISORY_WARNINGS=1
10
+ export PYTHONWARNINGS=ignore
11
+ export LC_ALL=en_US.UTF-8
12
+ export LANG=en_US.UTF-8
13
+
14
+ clear
15
+ sleep 0.4
16
+
17
+ cat << 'BANNER'
18
+
19
+ ╭──────────────────────────────────────────────────────────────────╮
20
+ │ 🌀 strands-vjepa — V-JEPA 2 world model for Strands Agents │
21
+ │ │
22
+ │ encode · step · plan · policy → robotics via strands-robots │
23
+ ╰──────────────────────────────────────────────────────────────────╯
24
+ BANNER
25
+ sleep 1.5
26
+
27
+ echo ""
28
+ echo " \$ pytest tests/ -q"
29
+ sleep 0.6
30
+ python -m pytest tests/ -q --tb=no 2>/dev/null | tail -3
31
+ sleep 1.5
32
+
33
+ echo ""
34
+ echo " \$ python examples/06_pretrained_e2e.py"
35
+ echo " # loads 326M-param V-JEPA 2 ViT-L from HuggingFace"
36
+ sleep 0.8
37
+ python examples/06_pretrained_e2e.py 2>/dev/null
38
+ sleep 1.5
39
+
40
+ echo ""
41
+ echo " \$ python - <<< 'strands-robots factory'"
42
+ sleep 0.5
43
+ python - << 'PY' 2>/dev/null
44
+ from strands_robots.policies import Policy, create_policy
45
+ from strands_vjepa import HFWorldModel
46
+
47
+ wm = HFWorldModel.from_hf("facebook/vjepa2-vitl-fpc16-256-ssv2")
48
+ policy = create_policy("vjepa", world_model=wm, action_dim=6, horizon=4)
49
+ print(f" isinstance(policy, Policy) → {isinstance(policy, Policy)}")
50
+ print(f" policy.provider_name → {policy.provider_name!r}")
51
+ print(f" type(policy).__name__ → {type(policy).__name__!r}")
52
+ PY
53
+ sleep 1.5
54
+
55
+ cat << 'FOOTER'
56
+
57
+ ╭──────────────────────────────────────────────────────────────────╮
58
+ │ ✅ V-JEPA 2 → Strands Agents → strands-robots. All green. │
59
+ │ │
60
+ │ github.com/cagataycali/strands-vjepa │
61
+ ╰──────────────────────────────────────────────────────────────────╯
62
+
63
+ FOOTER
64
+ sleep 2