armnet-runtime 0.2.0__tar.gz → 0.3.0__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.
- armnet_runtime-0.3.0/LICENSE +202 -0
- {armnet_runtime-0.2.0 → armnet_runtime-0.3.0}/PKG-INFO +7 -6
- {armnet_runtime-0.2.0 → armnet_runtime-0.3.0}/README.md +1 -1
- {armnet_runtime-0.2.0 → armnet_runtime-0.3.0}/pyproject.toml +5 -4
- {armnet_runtime-0.2.0 → armnet_runtime-0.3.0}/src/armnet_runtime/cli.py +1 -1
- {armnet_runtime-0.2.0 → armnet_runtime-0.3.0}/src/armnet_runtime/context.py +10 -5
- armnet_runtime-0.3.0/src/armnet_runtime/env.py +9 -0
- {armnet_runtime-0.2.0 → armnet_runtime-0.3.0}/src/armnet_runtime/lerobot/import_swap.py +1 -1
- {armnet_runtime-0.2.0 → armnet_runtime-0.3.0}/src/armnet_runtime/lerobot/remote_arx5.py +1 -1
- {armnet_runtime-0.2.0 → armnet_runtime-0.3.0}/src/armnet_runtime/lerobot/remote_camera.py +1 -1
- {armnet_runtime-0.2.0 → armnet_runtime-0.3.0}/src/armnet_runtime/lerobot/remote_feetech.py +1 -1
- armnet_runtime-0.3.0/src/armnet_runtime/markers.py +9 -0
- {armnet_runtime-0.2.0 → armnet_runtime-0.3.0}/src/armnet_runtime/rerun.py +1 -1
- armnet_runtime-0.3.0/src/armnet_runtime/volume_sync.py +9 -0
- armnet_runtime-0.2.0/src/armnet_runtime/env.py +0 -54
- armnet_runtime-0.2.0/src/armnet_runtime/markers.py +0 -51
- armnet_runtime-0.2.0/src/armnet_runtime/volume_sync.py +0 -610
- armnet_runtime-0.2.0/tests/test_volume_sync.py +0 -166
- {armnet_runtime-0.2.0 → armnet_runtime-0.3.0}/.gitignore +0 -0
- {armnet_runtime-0.2.0 → armnet_runtime-0.3.0}/proto/rerun.proto +0 -0
- {armnet_runtime-0.2.0 → armnet_runtime-0.3.0}/scripts/gen_proto.sh +0 -0
- {armnet_runtime-0.2.0 → armnet_runtime-0.3.0}/src/armnet_runtime/__init__.py +0 -0
- {armnet_runtime-0.2.0 → armnet_runtime-0.3.0}/src/armnet_runtime/_rerun_pb2.py +0 -0
- {armnet_runtime-0.2.0 → armnet_runtime-0.3.0}/src/armnet_runtime/decorator.py +0 -0
- {armnet_runtime-0.2.0 → armnet_runtime-0.3.0}/src/armnet_runtime/leaderboard.py +0 -0
- {armnet_runtime-0.2.0 → armnet_runtime-0.3.0}/src/armnet_runtime/lerobot/__init__.py +0 -0
- {armnet_runtime-0.2.0 → armnet_runtime-0.3.0}/src/armnet_runtime/lerobot/_remote_protocol.py +0 -0
- {armnet_runtime-0.2.0 → armnet_runtime-0.3.0}/tests/test_cell_instrument.py +0 -0
- {armnet_runtime-0.2.0 → armnet_runtime-0.3.0}/tests/test_completion.py +0 -0
- {armnet_runtime-0.2.0 → armnet_runtime-0.3.0}/tests/test_context_arms.py +0 -0
- {armnet_runtime-0.2.0 → armnet_runtime-0.3.0}/tests/test_edge_goal_clamp.py +0 -0
- {armnet_runtime-0.2.0 → armnet_runtime-0.3.0}/tests/test_embodiment.py +0 -0
- {armnet_runtime-0.2.0 → armnet_runtime-0.3.0}/tests/test_leaderboard.py +0 -0
- {armnet_runtime-0.2.0 → armnet_runtime-0.3.0}/tests/test_persistent_connection.py +0 -0
- {armnet_runtime-0.2.0 → armnet_runtime-0.3.0}/tests/test_proxy_method_cache.py +0 -0
- {armnet_runtime-0.2.0 → armnet_runtime-0.3.0}/tests/test_robot_telemetry.py +0 -0
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright 2026 Ville Kuosmanen
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
2
|
Name: armnet-runtime
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: armnet runtime SDK — used by code running inside customer containers on a cell.
|
|
5
5
|
Project-URL: Homepage, https://armnet.dev
|
|
6
|
-
Project-URL: Documentation, https://
|
|
6
|
+
Project-URL: Documentation, https://docs.armnet.dev/packages/runtime/
|
|
7
7
|
Author: Ville Kuosmanen
|
|
8
|
-
License: Apache-2.0
|
|
8
|
+
License-Expression: Apache-2.0
|
|
9
|
+
License-File: LICENSE
|
|
9
10
|
Requires-Python: <3.13,>=3.12
|
|
10
|
-
Requires-Dist: armnet-core>=0.
|
|
11
|
+
Requires-Dist: armnet-core>=0.3.0
|
|
11
12
|
Requires-Dist: protobuf<7,>=5
|
|
12
13
|
Requires-Dist: pydantic<3,>=2.6
|
|
13
14
|
Provides-Extra: dev
|
|
@@ -50,4 +51,4 @@ pip install armnet-runtime
|
|
|
50
51
|
|
|
51
52
|
## Documentation
|
|
52
53
|
|
|
53
|
-
Full guides and API reference: **<https://
|
|
54
|
+
Full guides and API reference: **<https://docs.armnet.dev/packages/runtime/>**
|
|
@@ -6,15 +6,16 @@ build-backend = "hatchling.build"
|
|
|
6
6
|
name = "armnet-runtime"
|
|
7
7
|
# 0.2.0 follows armnet-core: ctx.cell now carries an environment and hands
|
|
8
8
|
# reset/scoring to it, and CompletionStatus moved to armnet-core.
|
|
9
|
-
version = "0.
|
|
9
|
+
version = "0.3.0"
|
|
10
10
|
description = "armnet runtime SDK \u2014 used by code running inside customer containers on a cell."
|
|
11
11
|
readme = "README.md"
|
|
12
12
|
requires-python = ">=3.12,<3.13"
|
|
13
|
-
license =
|
|
13
|
+
license = "Apache-2.0"
|
|
14
|
+
license-files = ["LICENSE"]
|
|
14
15
|
authors = [{ name = "Ville Kuosmanen" }]
|
|
15
16
|
|
|
16
17
|
dependencies = [
|
|
17
|
-
"armnet-core>=0.
|
|
18
|
+
"armnet-core>=0.3.0",
|
|
18
19
|
"pydantic>=2.6,<3",
|
|
19
20
|
# Wire format for Rerun visualization packets (armnet_runtime.rerun).
|
|
20
21
|
"protobuf>=5,<7",
|
|
@@ -22,7 +23,7 @@ dependencies = [
|
|
|
22
23
|
|
|
23
24
|
[project.urls]
|
|
24
25
|
Homepage = "https://armnet.dev"
|
|
25
|
-
Documentation = "https://
|
|
26
|
+
Documentation = "https://docs.armnet.dev/packages/runtime/"
|
|
26
27
|
|
|
27
28
|
[project.optional-dependencies]
|
|
28
29
|
dev = [
|
|
@@ -39,7 +39,7 @@ from typing import Sequence
|
|
|
39
39
|
|
|
40
40
|
from armnet_runtime.context import build_context
|
|
41
41
|
from armnet_runtime.decorator import registered_main
|
|
42
|
-
from
|
|
42
|
+
from armnet_core.markers import (
|
|
43
43
|
MAX_TRACEBACK_BYTES,
|
|
44
44
|
RESULT_MARKER,
|
|
45
45
|
RESULT_MARKER_JSON,
|
|
@@ -31,7 +31,7 @@ from armnet_core import (
|
|
|
31
31
|
environment_for,
|
|
32
32
|
)
|
|
33
33
|
|
|
34
|
-
from
|
|
34
|
+
from armnet_core import env as env_keys
|
|
35
35
|
|
|
36
36
|
logger = logging.getLogger(__name__)
|
|
37
37
|
|
|
@@ -810,7 +810,7 @@ class Cell:
|
|
|
810
810
|
|
|
811
811
|
# Imported locally to avoid pulling markers into the public API
|
|
812
812
|
# surface of `Context`.
|
|
813
|
-
from
|
|
813
|
+
from armnet_core.markers import PROGRESS_MARKER
|
|
814
814
|
print(f"{PROGRESS_MARKER} {message}", flush=True)
|
|
815
815
|
time.sleep(0.01)
|
|
816
816
|
|
|
@@ -984,7 +984,7 @@ class Context:
|
|
|
984
984
|
|
|
985
985
|
# Imported locally to avoid pulling markers into the public API
|
|
986
986
|
# surface of `Context`.
|
|
987
|
-
from
|
|
987
|
+
from armnet_core.markers import PROGRESS_MARKER
|
|
988
988
|
print(f"{PROGRESS_MARKER} {message}", flush=True)
|
|
989
989
|
|
|
990
990
|
def is_shutting_down(self) -> bool:
|
|
@@ -1281,8 +1281,8 @@ def build_context() -> Context:
|
|
|
1281
1281
|
camera_configs=_build_camera_configs(
|
|
1282
1282
|
cell_config.camera_configs if cell_config else {}
|
|
1283
1283
|
),
|
|
1284
|
-
cache_home=
|
|
1285
|
-
volume=Volume(root=
|
|
1284
|
+
cache_home=_mount_path(env_keys.CACHE_HOME, env_keys.LEGACY_CACHE_HOME),
|
|
1285
|
+
volume=Volume(root=_mount_path(env_keys.VOLUME_HOME, env_keys.LEGACY_VOLUME_HOME)),
|
|
1286
1286
|
secrets=_load_secrets(),
|
|
1287
1287
|
timeout_seconds=timeout,
|
|
1288
1288
|
)
|
|
@@ -1369,6 +1369,11 @@ def _path_from_env_or_config(env_key: str, configured: str | None) -> Path | Non
|
|
|
1369
1369
|
return Path(value) if value else None
|
|
1370
1370
|
|
|
1371
1371
|
|
|
1372
|
+
def _mount_path(env_key: str, legacy_env_key: str) -> Path | None:
|
|
1373
|
+
value = os.environ.get(env_key) or os.environ.get(legacy_env_key)
|
|
1374
|
+
return Path(value) if value else None
|
|
1375
|
+
|
|
1376
|
+
|
|
1372
1377
|
def _build_camera_configs(camera_configs: dict[str, Any] | None) -> dict[str, Any]:
|
|
1373
1378
|
if not camera_configs:
|
|
1374
1379
|
return {}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"""Deprecated alias for :mod:`armnet_core.env`.
|
|
2
|
+
|
|
3
|
+
These keys are a contract between the cell that sets them and everything that
|
|
4
|
+
reads them, so they live in ``armnet-core`` where every side can reach them
|
|
5
|
+
without depending on the runtime. Re-exported here so existing
|
|
6
|
+
``from armnet_runtime import env`` imports keep working.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from armnet_core.env import * # noqa: F401,F403
|
|
@@ -6,7 +6,7 @@ import importlib
|
|
|
6
6
|
import logging
|
|
7
7
|
import os
|
|
8
8
|
|
|
9
|
-
from
|
|
9
|
+
from armnet_core import env as env_keys
|
|
10
10
|
from armnet_runtime.lerobot.remote_camera import RemoteOpenCVCamera
|
|
11
11
|
from armnet_runtime.lerobot.remote_arx5 import RemoteARX5Arm
|
|
12
12
|
from armnet_runtime.lerobot.remote_feetech import RemoteFeetechMotorsBus
|
|
@@ -20,7 +20,7 @@ import time
|
|
|
20
20
|
from pathlib import Path
|
|
21
21
|
from typing import Any
|
|
22
22
|
|
|
23
|
-
from
|
|
23
|
+
from armnet_core import env as env_keys
|
|
24
24
|
from armnet_runtime.lerobot._remote_protocol import (
|
|
25
25
|
IS_CONNECTED_TTL_S,
|
|
26
26
|
PersistentConnection,
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"""Deprecated alias for :mod:`armnet_core.markers`.
|
|
2
|
+
|
|
3
|
+
The marker prefixes are a wire format between whatever writes them and
|
|
4
|
+
whatever scans stdout for them, so they live in ``armnet-core``. Re-exported
|
|
5
|
+
here so existing ``from armnet_runtime.markers import ...`` imports keep
|
|
6
|
+
working.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from armnet_core.markers import * # noqa: F401,F403
|
|
@@ -30,7 +30,7 @@ from collections import deque
|
|
|
30
30
|
from typing import Any, Mapping, Optional
|
|
31
31
|
|
|
32
32
|
from armnet_runtime import _rerun_pb2 as pb
|
|
33
|
-
from
|
|
33
|
+
from armnet_core.markers import RERUN_MARKER_B64
|
|
34
34
|
|
|
35
35
|
OBS_PREFIX = "observation"
|
|
36
36
|
ACTION_PREFIX = "action"
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"""Deprecated alias for :mod:`armnet_core.volume_sync`.
|
|
2
|
+
|
|
3
|
+
The mirroring engine is shared by the client CLI, the runtime, and the cell, so
|
|
4
|
+
it lives in ``armnet-core``. Re-exported here so existing
|
|
5
|
+
``from armnet_runtime import volume_sync`` imports keep working.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from armnet_core.volume_sync import * # noqa: F401,F403
|
|
9
|
+
from armnet_core.volume_sync import ProgressReporter # noqa: F401
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"""Env var keys the cell injects into customer containers.
|
|
2
|
-
|
|
3
|
-
Single source of truth shared by the cell (which sets them) and the runtime
|
|
4
|
-
SDK (which reads them).
|
|
5
|
-
"""
|
|
6
|
-
|
|
7
|
-
JOB_ID = "ARMNET_JOB_ID"
|
|
8
|
-
EMBODIMENT = "ARMNET_EMBODIMENT"
|
|
9
|
-
TASK = "ARMNET_TASK"
|
|
10
|
-
# The kind of workcell the cell is set up as ("busybox"). Assigned in the FMS,
|
|
11
|
-
# so it overrides whatever the cell's own config file happens to say.
|
|
12
|
-
ENVIRONMENT = "ARMNET_ENVIRONMENT"
|
|
13
|
-
TIMEOUT_SECONDS = "ARMNET_TIMEOUT_SECONDS"
|
|
14
|
-
|
|
15
|
-
# JSON-encoded `dict[str, Any]`; decoded into `Context.args`. Optional \u2014
|
|
16
|
-
# defaults to `{}` when absent (e.g. when developers run the runtime
|
|
17
|
-
# outside the cell with no orchestrator-provided args).
|
|
18
|
-
ARGS = "ARMNET_ARGS"
|
|
19
|
-
|
|
20
|
-
# JSON-encoded `RobotCellConfig` for the physical cell hosting the container.
|
|
21
|
-
# This is the preferred M2+ path for robot metadata; individual env vars below
|
|
22
|
-
# remain as dev/backcompat overrides while the config shape settles.
|
|
23
|
-
CELL_CONFIG = "ARMNET_CELL_CONFIG"
|
|
24
|
-
|
|
25
|
-
# Robot connector endpoint mounted into customer containers. When set,
|
|
26
|
-
# ctx.cell.robot_port points here and the runtime's LeRobot import replacement
|
|
27
|
-
# routes Feetech bus access through it.
|
|
28
|
-
CELL_SOCKET = "ARMNET_CELL_SOCKET"
|
|
29
|
-
|
|
30
|
-
# Operator-call endpoint served by the `armnet-cell` process (localhost).
|
|
31
|
-
# Operator-facing, human-in-the-loop calls (manual reset confirmation) are
|
|
32
|
-
# routed here so the prompt lands on the cell's stdin (the operator's terminal),
|
|
33
|
-
# not on a headless robot connector.
|
|
34
|
-
OPERATOR_CALL_ENDPOINT = "ARMNET_OPERATOR_CALL_ENDPOINT"
|
|
35
|
-
|
|
36
|
-
# Local-container-only control endpoint. Used by developer runs to provide
|
|
37
|
-
# keyboard-driven completion/stop/reset behavior without cloud cell services.
|
|
38
|
-
LOCAL_CONTROL_ENDPOINT = "ARMNET_LOCAL_CONTROL_ENDPOINT"
|
|
39
|
-
LOCAL_CONTAINER = "ARMNET_LOCAL_CONTAINER"
|
|
40
|
-
|
|
41
|
-
# Robot metadata provided by the cell. `ROBOT_ID` is used by LeRobot to look
|
|
42
|
-
# up calibration; `CALIBRATION_DIR` points at the calibration store mounted
|
|
43
|
-
# into the container when needed.
|
|
44
|
-
ROBOT_ID = "ARMNET_ROBOT_ID"
|
|
45
|
-
CALIBRATION_DIR = "ARMNET_CALIBRATION_DIR"
|
|
46
|
-
CALIBRATION_FILE_PATH = "ARMNET_CALIBRATION_FILE_PATH"
|
|
47
|
-
|
|
48
|
-
# Per-user persistent cache volume mounted by the robot cell.
|
|
49
|
-
CACHE_HOME = "REMOTEROBOT_CACHE_HOME"
|
|
50
|
-
VOLUME_HOME = "REMOTEROBOT_VOLUME_HOME"
|
|
51
|
-
HF_HOME = "HF_HOME"
|
|
52
|
-
|
|
53
|
-
# JSON-encoded mapping of injected secret env var names to values.
|
|
54
|
-
SECRETS = "ARMNET_SECRETS"
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"""Stdout marker constants.
|
|
2
|
-
|
|
3
|
-
The runtime CLI prints distinctively-prefixed lines to stdout so the cell
|
|
4
|
-
can extract structured information from otherwise-arbitrary container
|
|
5
|
-
output. These prefixes are part of the wire format between the runtime CLI
|
|
6
|
-
and the cell program; both must use the same constants.
|
|
7
|
-
|
|
8
|
-
Why stdout and not stderr: the cell only scans stdout for markers, which
|
|
9
|
-
keeps stderr semantically clean for human-facing log noise. The runtime
|
|
10
|
-
CLI writes the human-readable traceback to stderr separately (via
|
|
11
|
-
``traceback.print_exc()``) so unaided ``docker logs`` is still useful.
|
|
12
|
-
"""
|
|
13
|
-
|
|
14
|
-
# Human-readable result line prefix (e.g. "[armnet:result] {'ok': True}").
|
|
15
|
-
RESULT_MARKER = "[armnet:result]"
|
|
16
|
-
|
|
17
|
-
# Parseable result line prefix \u2014 the cell scans for this and JSON-decodes
|
|
18
|
-
# everything after it into `JobResult.return_value`. Note the trailing
|
|
19
|
-
# space: the JSON payload starts immediately after.
|
|
20
|
-
RESULT_MARKER_JSON = f"{RESULT_MARKER}:json "
|
|
21
|
-
|
|
22
|
-
# Parseable traceback line prefix \u2014 emitted by the runtime CLI when the
|
|
23
|
-
# user's @main raises. JSON-decoded payload is the traceback string. The
|
|
24
|
-
# cell lifts this onto `JobResult.traceback`.
|
|
25
|
-
TRACEBACK_MARKER_JSON = "[armnet:traceback]:json "
|
|
26
|
-
|
|
27
|
-
# Soft cap on the traceback string emitted via the marker, to keep NATS
|
|
28
|
-
# message sizes sane. The cell's NATS server has `max_payload: 4 MiB`; a
|
|
29
|
-
# 64 KiB cap leaves comfortable headroom for stdout/stderr alongside.
|
|
30
|
-
# The full untruncated traceback is still in the container's stderr (which
|
|
31
|
-
# the cell captures into `JobResult.stderr`), so power users have it.
|
|
32
|
-
#
|
|
33
|
-
# TODO(armnet): if real workloads start hitting this we should swap to
|
|
34
|
-
# transparent gzip+base64 inside the marker (the model field stays a
|
|
35
|
-
# string), or upload as an artifact and reference it.
|
|
36
|
-
MAX_TRACEBACK_BYTES = 64 * 1024
|
|
37
|
-
|
|
38
|
-
# Progress line prefix emitted by ``Context.report_progress(...)``.
|
|
39
|
-
# Currently only used for visual grep in stdout; M1+ may add a structured
|
|
40
|
-
# channel.
|
|
41
|
-
PROGRESS_MARKER = "[armnet:progress]"
|
|
42
|
-
|
|
43
|
-
# Rerun packet line prefix emitted by ``Context.log_rerun_data(...)``. The
|
|
44
|
-
# payload after the prefix is base64-encoded ``armnet.rerun.RerunPacket``
|
|
45
|
-
# bytes. The cell lifts these lines off stdout, base64-decodes them, and
|
|
46
|
-
# republishes the raw protobuf bytes on ``logs.<job_id>.rerun`` (they are NOT
|
|
47
|
-
# surfaced as normal log lines). stdout is the transport because the customer
|
|
48
|
-
# container has no NATS access; base64 keeps the binary payload on a single
|
|
49
|
-
# newline-delimited line.
|
|
50
|
-
RERUN_MARKER = "[armnet:rerun]"
|
|
51
|
-
RERUN_MARKER_B64 = f"{RERUN_MARKER}:b64 "
|