simulo-interfaces 0.25.0__tar.gz → 0.27.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.
Files changed (72) hide show
  1. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/PKG-INFO +2 -2
  2. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/pyproject.toml +2 -2
  3. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo/interfaces/authoring/__init__.py +2 -0
  4. simulo_interfaces-0.27.0/src/simulo/interfaces/authoring/named_actuators.py +29 -0
  5. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo/interfaces/authoring/physics.py +60 -4
  6. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo/interfaces/authoring/policy_inputs.py +63 -23
  7. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo/interfaces/authoring/prop.py +0 -4
  8. simulo_interfaces-0.27.0/src/simulo/interfaces/authoring/variants.py +65 -0
  9. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo/interfaces/authoring/visual.py +16 -1
  10. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo/interfaces/platform/__init__.py +16 -0
  11. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo/interfaces/platform/app.py +6 -0
  12. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo/interfaces/platform/asset_catalog.py +9 -1
  13. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo/interfaces/platform/enums.py +8 -8
  14. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo/interfaces/platform/evaluation.py +44 -3
  15. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo/interfaces/platform/manifest.py +8 -4
  16. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo/interfaces/platform/onnx_bundle.py +4 -0
  17. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo/interfaces/platform/outputs.py +5 -4
  18. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo/interfaces/platform/preview.py +20 -3
  19. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo/interfaces/platform/runs.py +26 -2
  20. simulo_interfaces-0.27.0/src/simulo/interfaces/platform/runtimes.py +19 -0
  21. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo/interfaces/platform/submit.py +32 -2
  22. simulo_interfaces-0.27.0/src/simulo/interfaces/platform/system_tiers.py +101 -0
  23. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo/interfaces/platform/systems.py +5 -3
  24. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo/interfaces/runtime/task.py +17 -0
  25. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo_interfaces.egg-info/PKG-INFO +2 -2
  26. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo_interfaces.egg-info/SOURCES.txt +3 -0
  27. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo_interfaces.egg-info/requires.txt +1 -1
  28. simulo_interfaces-0.25.0/src/simulo/interfaces/authoring/variants.py +0 -48
  29. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/MANIFEST.in +0 -0
  30. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/PYPI.md +0 -0
  31. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/setup.cfg +0 -0
  32. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo/interfaces/__init__.py +0 -0
  33. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo/interfaces/authoring/action_channel.py +0 -0
  34. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo/interfaces/authoring/actuator.py +0 -0
  35. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo/interfaces/authoring/asset.py +0 -0
  36. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo/interfaces/authoring/checkpoint.py +0 -0
  37. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo/interfaces/authoring/entity.py +0 -0
  38. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo/interfaces/authoring/light.py +0 -0
  39. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo/interfaces/authoring/materials.py +0 -0
  40. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo/interfaces/authoring/pose.py +0 -0
  41. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo/interfaces/authoring/primitives.py +0 -0
  42. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo/interfaces/authoring/properties.py +0 -0
  43. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo/interfaces/authoring/record.py +0 -0
  44. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo/interfaces/authoring/robot.py +0 -0
  45. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo/interfaces/authoring/robot_config.py +0 -0
  46. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo/interfaces/authoring/scene.py +0 -0
  47. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo/interfaces/authoring/sensor.py +0 -0
  48. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo/interfaces/authoring/terrain.py +0 -0
  49. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo/interfaces/authoring/world.py +0 -0
  50. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo/interfaces/exceptions.py +0 -0
  51. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo/interfaces/ids.py +0 -0
  52. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo/interfaces/platform/_payload.py +0 -0
  53. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo/interfaces/platform/asset.py +0 -0
  54. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo/interfaces/platform/callbacks.py +0 -0
  55. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo/interfaces/platform/debug.py +0 -0
  56. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo/interfaces/platform/domain.py +0 -0
  57. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo/interfaces/platform/job_events.py +0 -0
  58. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo/interfaces/platform/policy_checkpoint.py +0 -0
  59. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo/interfaces/platform/runtime.py +0 -0
  60. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo/interfaces/platform/volume.py +0 -0
  61. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo/interfaces/py.typed +0 -0
  62. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo/interfaces/runtime/__init__.py +0 -0
  63. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo/interfaces/runtime/anomaly.py +0 -0
  64. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo/interfaces/runtime/components.py +0 -0
  65. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo/interfaces/runtime/env.py +0 -0
  66. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo/interfaces/runtime/player.py +0 -0
  67. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo/interfaces/runtime/policy.py +0 -0
  68. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo/interfaces/runtime/policy_frames.py +0 -0
  69. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo/interfaces/runtime/tensors.py +0 -0
  70. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo/interfaces/runtime/trainer.py +0 -0
  71. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo_interfaces.egg-info/dependency_links.txt +0 -0
  72. {simulo_interfaces-0.25.0 → simulo_interfaces-0.27.0}/src/simulo_interfaces.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: simulo-interfaces
3
- Version: 0.25.0
3
+ Version: 0.27.0
4
4
  Summary: Typed Python contracts for the Simulo cloud robotics SDK and managed simulation runtime.
5
5
  Author-email: Simulo Team <team@simulo.ai>
6
6
  License: BSD-3-Clause
@@ -28,7 +28,7 @@ Classifier: Typing :: Typed
28
28
  Requires-Python: >=3.11
29
29
  Description-Content-Type: text/markdown
30
30
  Provides-Extra: dev
31
- Requires-Dist: black==26.5.1; extra == "dev"
31
+ Requires-Dist: black==26.10.1; extra == "dev"
32
32
  Requires-Dist: isort==8.0.1; extra == "dev"
33
33
  Requires-Dist: ruff==0.15.21; extra == "dev"
34
34
  Requires-Dist: mypy==2.3.0; extra == "dev"
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "simulo-interfaces"
7
- version = "0.25.0"
7
+ version = "0.27.0"
8
8
  description = "Typed Python contracts for the Simulo cloud robotics SDK and managed simulation runtime."
9
9
  readme = "PYPI.md"
10
10
  requires-python = ">=3.11"
@@ -51,7 +51,7 @@ dependencies = []
51
51
  # Keep in lockstep with `.github/workflows/simulo-interfaces-ci.yml`'s
52
52
  # `ruff`/`black`/`isort`/`mypy` steps, which resolve their versions from THIS extra
53
53
  # (`pip install -e ".[dev]"`).
54
- dev = ["black==26.5.1", "isort==8.0.1", "ruff==0.15.21", "mypy==2.3.0", "pytest>=8.2", "build>=1.2",
54
+ dev = ["black==26.10.1", "isort==8.0.1", "ruff==0.15.21", "mypy==2.3.0", "pytest>=8.2", "build>=1.2",
55
55
  "twine>=5.1", "packaging>=23"]
56
56
  # `packaging` is a direct test dependency, not incidental: the consumer-pin guard parses
57
57
  # PEP 508 requirements with it. It arrives transitively via pytest today, which is exactly
@@ -96,6 +96,7 @@ from simulo.interfaces.authoring.light import (
96
96
  LightConfig,
97
97
  )
98
98
  from simulo.interfaces.authoring.materials import Material, SurfaceMaterial
99
+ from simulo.interfaces.authoring.named_actuators import NamedActuatorControlsProtocol
99
100
  from simulo.interfaces.authoring.physics import (
100
101
  Collision,
101
102
  DeformableMaterial,
@@ -214,6 +215,7 @@ __all__ = [
214
215
  # the backend package and explicitly inherit these Protocols)
215
216
  "ExternalForceProtocol",
216
217
  "RobotPropertiesProtocol",
218
+ "NamedActuatorControlsProtocol",
217
219
  "PropPropertiesProtocol",
218
220
  "RobotProtocol",
219
221
  "RobotStateProtocol",
@@ -0,0 +1,29 @@
1
+ """Optional named-actuator commands, independent of the legacy robot contract."""
2
+
3
+ from typing import List, Optional, Protocol, Sequence, runtime_checkable
4
+
5
+ from simulo.interfaces.runtime.tensors import TensorLike
6
+
7
+
8
+ @runtime_checkable
9
+ class NamedActuatorControlsProtocol(Protocol):
10
+ """Control file-authored tendon and site actuators in their own units."""
11
+
12
+ def get_named_actuator_names(self) -> List[str]:
13
+ """Return item-local tendon and site actuator names after scene build."""
14
+ ...
15
+
16
+ def set_actuator_controls(
17
+ self,
18
+ values: TensorLike,
19
+ actuator_names: Optional[Sequence[str]] = None,
20
+ env_ids: Optional[TensorLike] = None,
21
+ ) -> None:
22
+ """Set persistent controls (K, A), or broadcast (A,), in file units.
23
+
24
+ None selects all names or copies. Unselected controls persist.
25
+ Authored bounds and action delay apply. Reset clears controls and
26
+ snapshots restore them. Raises RuntimeError before attach; call from
27
+ on_start onward. This capability requires the engine backend.
28
+ """
29
+ ...
@@ -6,6 +6,7 @@ definitions shared by the torch-free thin client (authoring at submit) and the
6
6
  backend runtime (execution on the worker).
7
7
  """
8
8
 
9
+ import math
9
10
  from dataclasses import dataclass
10
11
  from typing import Optional
11
12
 
@@ -61,16 +62,58 @@ class RigidPhysics:
61
62
  """Rigid body physics properties.
62
63
 
63
64
  Attributes:
64
- mass: Mass in kg
65
+ mass: Mass in kg. Defaults to 1.0. Set to ``None`` when using density.
66
+ Mutually exclusive with density.
67
+ density: Density in kg/m^3. Mutually exclusive with mass. For file
68
+ assets, derives mass and inertia from imported collision geometry.
69
+ friction: Optional Coulomb friction coefficient. ``None`` preserves
70
+ the shape's authored material.
71
+ restitution: Optional contact restitution coefficient. ``None``
72
+ preserves the shape's authored material.
65
73
  collision: Collision properties
66
74
  kinematic: If True, body is fixed in place (doesn't respond to forces)
67
75
  activate_contact_sensors: If True, enables contact reporting for sensors
68
76
  """
69
77
 
70
- mass: float = 1.0
78
+ mass: float | None = 1.0
71
79
  collision: Optional[Collision] = None
72
80
  kinematic: bool = False
73
81
  activate_contact_sensors: bool = False
82
+ density: float | None = None
83
+ friction: float | None = None
84
+ restitution: float | None = None
85
+
86
+ def __post_init__(self) -> None:
87
+ if self.mass is not None and self.density is not None:
88
+ raise ValueError("RigidPhysics.mass and RigidPhysics.density are mutually exclusive")
89
+ if self.mass is not None and (
90
+ isinstance(self.mass, bool)
91
+ or not isinstance(self.mass, (int, float))
92
+ or not math.isfinite(self.mass)
93
+ or self.mass <= 0
94
+ ):
95
+ raise ValueError("RigidPhysics.mass must be a finite positive number")
96
+ if self.density is not None and (
97
+ isinstance(self.density, bool)
98
+ or not isinstance(self.density, (int, float))
99
+ or not math.isfinite(self.density)
100
+ or self.density <= 0
101
+ ):
102
+ raise ValueError("RigidPhysics.density must be a finite positive number")
103
+ if self.friction is not None and (
104
+ isinstance(self.friction, bool)
105
+ or not isinstance(self.friction, (int, float))
106
+ or not math.isfinite(self.friction)
107
+ or self.friction < 0
108
+ ):
109
+ raise ValueError("RigidPhysics.friction must be a finite non-negative number")
110
+ if self.restitution is not None and (
111
+ isinstance(self.restitution, bool)
112
+ or not isinstance(self.restitution, (int, float))
113
+ or not math.isfinite(self.restitution)
114
+ or not 0 <= self.restitution <= 1
115
+ ):
116
+ raise ValueError("RigidPhysics.restitution must be a finite number in [0, 1]")
74
117
 
75
118
 
76
119
  @dataclass
@@ -107,15 +150,25 @@ class Physics:
107
150
 
108
151
  @staticmethod
109
152
  def rigid(
110
- mass: float = 1.0,
153
+ mass: float | None = 1.0,
111
154
  collision: Optional[Collision] = None,
112
155
  kinematic: bool = False,
113
156
  activate_contact_sensors: bool = False,
157
+ density: float | None = None,
158
+ friction: float | None = None,
159
+ restitution: float | None = None,
114
160
  ) -> RigidPhysics:
115
161
  """Create rigid body physics.
116
162
 
117
163
  Args:
118
- mass: Mass in kg
164
+ mass: Mass in kg. Defaults to 1.0. Set to ``None`` when using
165
+ density. Mutually exclusive with density.
166
+ density: Density in kg/m^3. Mutually exclusive with mass. For file
167
+ assets, derives mass and inertia from imported collision geometry.
168
+ friction: Optional Coulomb friction coefficient. ``None`` keeps
169
+ the shape's authored material.
170
+ restitution: Optional contact restitution coefficient. ``None``
171
+ keeps the shape's authored material.
119
172
  collision: Collision properties
120
173
  kinematic: If True, body is fixed in place (doesn't respond to forces).
121
174
  Useful for static obstacles, walls, etc.
@@ -127,6 +180,9 @@ class Physics:
127
180
  """
128
181
  return RigidPhysics(
129
182
  mass=mass,
183
+ density=density,
184
+ friction=friction,
185
+ restitution=restitution,
130
186
  collision=collision,
131
187
  kinematic=kinematic,
132
188
  activate_contact_sensors=activate_contact_sensors,
@@ -27,7 +27,9 @@ class PolicyInput:
27
27
  inputs require uint8, shape ``(H, W, 3)`` and a nonblank camera scene name:
28
28
  the last segment of ``scene.add(camera, at="/World/<name>")``. Full paths
29
29
  are rejected. LearningEnv setup requires that camera's purpose to be
30
- ``"policy"``. Two policy cameras cannot share a scene name.
30
+ ``"policy"``. Two policy cameras cannot share a scene name. Numeric
31
+ inputs may optionally name every flattened value with ``element_labels``;
32
+ those labels do not affect the tensor layout.
31
33
  """
32
34
 
33
35
  name: str
@@ -36,11 +38,14 @@ class PolicyInput:
36
38
  kind: Literal["numeric", "image"] = "numeric"
37
39
  camera: str | None = None
38
40
  preprocessing: Literal["none", "center"] = "none"
41
+ element_labels: tuple[str, ...] = ()
39
42
 
40
43
  def __post_init__(self) -> None:
41
44
  label = f"Input {self.name!r}"
42
45
  if isinstance(self.shape, list):
43
46
  object.__setattr__(self, "shape", tuple(self.shape))
47
+ if isinstance(self.element_labels, list):
48
+ object.__setattr__(self, "element_labels", tuple(self.element_labels))
44
49
  if not isinstance(self.name, str) or not re.fullmatch(r"[A-Za-z][A-Za-z0-9_]*", self.name):
45
50
  raise ValueError(f"{label}: name must start with a letter and contain only letters, digits or underscores.")
46
51
  if (
@@ -54,33 +59,70 @@ class PolicyInput:
54
59
  if self.preprocessing not in ("none", "center"):
55
60
  raise ValueError(f"{label}: preprocessing must be 'none' or 'center'.")
56
61
  if self.kind == "image":
57
- if self.dtype != "uint8":
58
- raise ValueError(f"{label}: image dtype must be uint8 RGB NHWC, got {self.dtype!r}.")
59
- if len(self.shape) != 3 or self.shape[-1] != 3:
60
- raise ValueError(f"{label}: image shape must be (H, W, 3) RGB NHWC, excluding batch, got {self.shape}.")
61
- if not isinstance(self.camera, str) or not self.camera.strip():
62
- raise ValueError(f"{label}: image inputs require a camera identity.")
63
- if "/" in self.camera or self.camera != self.camera.strip():
64
- raise ValueError(f"{label}: camera must be a scene name, the last segment of scene.add(..., at=...).")
62
+ _validate_image_input(self, label)
65
63
  elif self.dtype != "float32" or self.camera is not None or self.preprocessing != "none":
66
64
  raise ValueError(f"{label}: numeric inputs require float32, no camera, and preprocessing='none'.")
65
+ _validate_element_labels(self, label)
67
66
 
68
67
  def to_dict(self) -> dict[str, Any]:
69
- """Return JSON metadata, converting the stored tuple shape to a list."""
70
- return {**asdict(self), "shape": list(self.shape)}
68
+ """Return JSON metadata, converting stored tuples to lists."""
69
+ metadata = {**asdict(self), "shape": list(self.shape)}
70
+ if self.element_labels:
71
+ metadata["element_labels"] = list(self.element_labels)
72
+ else:
73
+ del metadata["element_labels"]
74
+ return metadata
71
75
 
72
76
  @classmethod
73
77
  def from_dict(cls, value: Mapping[str, Any]) -> PolicyInput:
74
78
  """Parse JSON, converting list shapes to tuples; reject unknown fields."""
75
79
  if not isinstance(value, Mapping):
76
80
  raise ValueError("Input declaration must be an object.")
77
- allowed = {"name", "shape", "dtype", "kind", "camera", "preprocessing"}
81
+ allowed = {"name", "shape", "dtype", "kind", "camera", "preprocessing", "element_labels"}
78
82
  if set(value) - allowed or not {"name", "shape"} <= set(value):
79
83
  raise ValueError(f"Input {value.get('name')!r}: declaration has missing or unknown fields.")
80
84
  shape = value["shape"]
81
85
  if not isinstance(shape, (list, tuple)):
82
86
  raise ValueError(f"Input {value['name']!r}: shape must be an array of positive dimensions.")
83
- return cls(**{**value, "shape": tuple(shape)})
87
+ element_labels = value.get("element_labels", ())
88
+ if not isinstance(element_labels, (list, tuple)):
89
+ raise ValueError(f"Input {value['name']!r}: element labels must be an array of strings.")
90
+ return cls(**{**value, "shape": tuple(shape), "element_labels": tuple(element_labels)})
91
+
92
+
93
+ def _validate_image_input(spec: PolicyInput, label: str) -> None:
94
+ if spec.dtype != "uint8":
95
+ raise ValueError(f"{label}: image dtype must be uint8 RGB NHWC, got {spec.dtype!r}.")
96
+ if len(spec.shape) != 3 or spec.shape[-1] != 3:
97
+ raise ValueError(f"{label}: image shape must be (H, W, 3) RGB NHWC, excluding batch, got {spec.shape}.")
98
+ if not isinstance(spec.camera, str) or not spec.camera.strip():
99
+ raise ValueError(f"{label}: image inputs require a camera identity.")
100
+ if "/" in spec.camera or spec.camera != spec.camera.strip():
101
+ raise ValueError(f"{label}: camera must be a scene name, the last segment of scene.add(..., at=...).")
102
+ if spec.element_labels:
103
+ raise ValueError(f"{label}: image inputs cannot name individual elements.")
104
+
105
+
106
+ def _validate_element_labels(spec: PolicyInput, label: str) -> None:
107
+ if not isinstance(spec.element_labels, tuple) or any(
108
+ not isinstance(element_label, str) or not element_label.strip() for element_label in spec.element_labels
109
+ ):
110
+ raise ValueError(f"{label}: element labels must be nonblank strings.")
111
+ if spec.element_labels and len(spec.element_labels) != _value_count(spec.shape):
112
+ raise ValueError(f"{label}: element labels must name each of {_value_count(spec.shape)} values.")
113
+
114
+
115
+ def _layout_metadata(spec: PolicyInput) -> dict[str, Any]:
116
+ """Return the fields that determine a policy tensor's layout."""
117
+ return {name: getattr(spec, name) for name in ("name", "shape", "dtype", "kind", "camera", "preprocessing")}
118
+
119
+
120
+ def _value_count(shape: tuple[int, ...]) -> int:
121
+ """Return the flattened element count without a tensor dependency."""
122
+ count = 1
123
+ for dimension in shape:
124
+ count *= dimension
125
+ return count
84
126
 
85
127
 
86
128
  @dataclass(frozen=True, slots=True, kw_only=True)
@@ -89,9 +131,10 @@ class PolicyInputSchema:
89
131
 
90
132
  ``critic=None`` means the critic uses exactly the actor declarations.
91
133
  Future export and playback consumers must use only ``actor``. A critic
92
- declaration sharing an actor name must be identical. Actor inputs omitted
93
- from an explicit critic are not supplied to that critic. Order is part of
94
- checkpoint compatibility, including numeric concatenation order.
134
+ declaration sharing an actor name must have the same tensor layout. Actor
135
+ inputs omitted from an explicit critic are not supplied to that critic.
136
+ Order is part of checkpoint compatibility, including numeric concatenation
137
+ order. Element labels are display metadata, so they may differ by role.
95
138
  """
96
139
 
97
140
  actor: tuple[PolicyInput, ...]
@@ -110,7 +153,7 @@ class PolicyInputSchema:
110
153
  seen.add(spec.name)
111
154
  actor = {spec.name: spec for spec in self.actor}
112
155
  for spec in self.critic_inputs:
113
- if spec.name in actor and spec != actor[spec.name]:
156
+ if spec.name in actor and _layout_metadata(spec) != _layout_metadata(actor[spec.name]):
114
157
  raise ValueError(
115
158
  f"critic input {spec.name!r}: declaration contradicts the actor input of the same name."
116
159
  )
@@ -148,14 +191,11 @@ class PolicyInputSchema:
148
191
  Batch size is absent, so a checkpoint can change parallelism.
149
192
  """
150
193
 
151
- def canonical(spec: PolicyInput) -> dict[str, Any]:
152
- # Pin v1's subset: future defaulted fields do not invalidate hashes.
153
- return {name: getattr(spec, name) for name in ("name", "shape", "dtype", "kind", "camera", "preprocessing")}
154
-
155
194
  metadata = {
156
195
  "version": "simulo.policy-input-fingerprint.v1",
157
- "actor": [canonical(spec) for spec in self.actor],
158
- "critic": [canonical(spec) for spec in self.critic_inputs],
196
+ # Pin v1's subset: future defaulted fields do not invalidate hashes.
197
+ "actor": [_layout_metadata(spec) for spec in self.actor],
198
+ "critic": [_layout_metadata(spec) for spec in self.critic_inputs],
159
199
  }
160
200
  return hashlib.sha256(json.dumps(metadata, sort_keys=True, separators=(",", ":")).encode()).hexdigest()
161
201
 
@@ -228,7 +228,3 @@ class VariantPropProtocol(PropProtocol, Protocol):
228
228
  def variant_index(self) -> TensorLike:
229
229
  """Active option index for every environment copy, shape ``(num_envs,)``."""
230
230
  ...
231
-
232
- def set_variant(self, index: TensorLike, env_ids: Optional[TensorLike] = ...) -> None:
233
- """Switch selected copies to an option index. Supported for pool variants."""
234
- ...
@@ -0,0 +1,65 @@
1
+ """Dependency-free authoring data for opt-in per-copy scene variants."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from dataclasses import dataclass
6
+ from numbers import Integral
7
+ from typing import Literal, Sequence, cast
8
+
9
+ from simulo.interfaces.authoring.asset import AssetSource
10
+ from simulo.interfaces.authoring.primitives import PrimitiveShape
11
+
12
+
13
+ @dataclass(frozen=True, init=False)
14
+ class ObjectVariants:
15
+ """The objects one authored prop can represent across environment copies.
16
+
17
+ ``assign="blocks"`` assigns each option to contiguous copies. ``"cycle"``
18
+ repeats options in order. A sequence selects the option for each copy; the
19
+ engine validates that its length matches the scene's environment count.
20
+ """
21
+
22
+ options: Sequence[PrimitiveShape | AssetSource]
23
+ assign: Literal["blocks", "cycle"] | Sequence[int] = "blocks"
24
+
25
+ def __init__(
26
+ self,
27
+ options: Sequence[PrimitiveShape | AssetSource],
28
+ assign: Literal["blocks", "cycle"] | Sequence[int] = "blocks",
29
+ **kwargs: object,
30
+ ) -> None:
31
+ if "mode" in kwargs:
32
+ raise TypeError(
33
+ "ObjectVariants.mode was removed. Use assign=... and rebuild the scene to change variant assignments."
34
+ )
35
+ if kwargs:
36
+ unexpected = next(iter(kwargs))
37
+ raise TypeError(f"ObjectVariants.__init__() got an unexpected keyword argument {unexpected!r}")
38
+ object.__setattr__(self, "options", options)
39
+ object.__setattr__(self, "assign", assign)
40
+ self.__post_init__()
41
+
42
+ def __post_init__(self) -> None:
43
+ options = tuple(self.options)
44
+ if len(options) < 2:
45
+ raise ValueError("ObjectVariants.options must contain at least 2 options")
46
+ if not all(isinstance(option, (PrimitiveShape, AssetSource)) for option in options):
47
+ raise TypeError("ObjectVariants.options must contain PrimitiveShape or AssetSource values")
48
+ assign = self.assign
49
+ if isinstance(assign, str):
50
+ if assign not in {"blocks", "cycle"}:
51
+ raise ValueError("ObjectVariants.assign must be 'blocks', 'cycle', or a sequence of option indices")
52
+ else:
53
+ if not isinstance(assign, Sequence):
54
+ raise TypeError("ObjectVariants.assign must be 'blocks', 'cycle', or a sequence of option indices")
55
+ indices = tuple(cast(Sequence[object], assign))
56
+ if any(isinstance(index, bool) or not isinstance(index, Integral) for index in indices):
57
+ raise TypeError("ObjectVariants.assign indices must be integers")
58
+ assign = tuple(int(cast(Integral, index)) for index in indices)
59
+ if any(index < 0 or index >= len(options) for index in assign):
60
+ raise ValueError("ObjectVariants.assign indices must select an option")
61
+ object.__setattr__(self, "options", options)
62
+ object.__setattr__(self, "assign", assign)
63
+
64
+
65
+ __all__ = ["ObjectVariants"]
@@ -159,11 +159,17 @@ class LineMarker(VisualMarkerBase):
159
159
  these points.
160
160
  width: Line width in meters
161
161
  color: Line color as RGB or RGBA tuple
162
+ static: ``True`` for a line that never changes, such as a track edge
163
+ or a zone boundary. ``points`` are then in each copy's own frame
164
+ and every copy draws the same line. The scene sends it once and
165
+ the viewer builds it once, so it costs nothing per step or per
166
+ frame. ``set_points`` raises on a static line.
162
167
  """
163
168
 
164
169
  points: Any = None
165
170
  width: float = 0.01
166
171
  color: Color = (0.0, 0.8, 1.0) # Cyan by default
172
+ static: bool = False
167
173
  _num_points: int = field(default=0, init=False, repr=False)
168
174
 
169
175
  def __post_init__(self) -> None:
@@ -185,7 +191,12 @@ class LineMarker(VisualMarkerBase):
185
191
  world coordinates. Pass float32 tensors on the simulation
186
192
  device; other inputs (lists, CPU or float64 tensors) may
187
193
  allocate or synchronize the host.
194
+
195
+ Raises:
196
+ TypeError: The line is ``static``.
188
197
  """
198
+ if self.static:
199
+ raise TypeError(f"line marker {self.name!r} is static; its points never change")
189
200
  if self._backend_handle is None:
190
201
  return
191
202
 
@@ -362,15 +373,18 @@ class Visual:
362
373
  width: float = 0.01,
363
374
  color: Color = (0.0, 0.8, 1.0),
364
375
  num_instances: int = 1,
376
+ static: bool = False,
365
377
  ) -> LineMarker:
366
378
  """Create a line or polyline marker.
367
379
 
368
380
  Args:
369
381
  name: Unique marker name
370
- points: Initial ``(P, 3)`` points, at least two, in world coordinates
382
+ points: Initial ``(P, 3)`` points, at least two, in world coordinates,
383
+ or in each copy's own frame when ``static`` is ``True``
371
384
  width: Line width in meters
372
385
  color: RGB or RGBA color tuple
373
386
  num_instances: Number of instances for multi-env
387
+ static: ``True`` for a line that never changes (see ``LineMarker``)
374
388
 
375
389
  Returns:
376
390
  LineMarker instance
@@ -388,4 +402,5 @@ class Visual:
388
402
  width=width,
389
403
  color=color,
390
404
  num_instances=num_instances,
405
+ static=static,
391
406
  )
@@ -19,6 +19,7 @@ from simulo.interfaces.platform.asset_catalog import (
19
19
  ASSET_MISSING_CODE,
20
20
  ASSET_NOT_EXPORTABLE_CODE,
21
21
  ASSET_NOT_FOUND_CODE,
22
+ ASSET_NOT_IN_CATALOG_CODE,
22
23
  ASSET_ORIGIN_TYPES,
23
24
  ASSET_PUBLISH_ROLES,
24
25
  ASSET_RECONVERT_ROUTE_TEMPLATE,
@@ -98,6 +99,7 @@ from simulo.interfaces.platform.evaluation import (
98
99
  EPISODES_CSV_COLUMNS_BEFORE_CHECKS,
99
100
  EPISODES_CSV_FIRST_FAILURE_AT_S_PREFIX,
100
101
  EPISODES_CSV_FIRST_FAILURE_STEP_PREFIX,
102
+ EPISODES_CSV_REPLAY_COLUMNS,
101
103
  EVALUATION_ACTIONS,
102
104
  EVALUATION_REPORT_SCHEMA_VERSION,
103
105
  MAX_CHECK_NAME_CHARS,
@@ -111,6 +113,7 @@ from simulo.interfaces.platform.evaluation import (
111
113
  MAX_NEXT_LINES,
112
114
  MAX_RECORDED_EPISODES,
113
115
  MAX_RECORDING_PROBLEM_CHARS,
116
+ MAX_REPLAYED_FAILURES,
114
117
  CheckCount,
115
118
  ComparisonVerdict,
116
119
  EndingCount,
@@ -127,6 +130,7 @@ from simulo.interfaces.platform.evaluation import (
127
130
  ListedEpisode,
128
131
  NextLine,
129
132
  NextRule,
133
+ Recording3D,
130
134
  ReplayFrame,
131
135
  ReplayPose,
132
136
  ReplayTrace,
@@ -303,6 +307,11 @@ from simulo.interfaces.platform.runs import (
303
307
  normalize_job_tags,
304
308
  )
305
309
  from simulo.interfaces.platform.runtime import RuntimeProtocol
310
+ from simulo.interfaces.platform.runtimes import (
311
+ ENGINE_RUNTIME_ID,
312
+ LEGACY_ISAAC_RUNTIME_ID,
313
+ RUNTIME_ID_BY_ASSET_RUNTIME,
314
+ )
306
315
  from simulo.interfaces.platform.submit import (
307
316
  CHECKPOINT_IS_INPUT_CODE,
308
317
  CHECKPOINT_KINDS,
@@ -564,6 +573,9 @@ __all__ = [
564
573
  "MAX_ASSET_REF_CHARS",
565
574
  "MAX_ASSETS_RESOLVE_BATCH",
566
575
  "DEFAULT_ASSET_RUNTIME",
576
+ "LEGACY_ISAAC_RUNTIME_ID",
577
+ "ENGINE_RUNTIME_ID",
578
+ "RUNTIME_ID_BY_ASSET_RUNTIME",
567
579
  "ASSET_UPLOAD_PART_BYTES",
568
580
  "ASSET_FACTS_SCHEMA_VERSION",
569
581
  "ASSET_NOT_EXPORTABLE_CODE",
@@ -571,6 +583,7 @@ __all__ = [
571
583
  "ASSET_DIGEST_MISMATCH_CODE",
572
584
  "ASSET_CORRUPT_CODE",
573
585
  "ASSET_NOT_FOUND_CODE",
586
+ "ASSET_NOT_IN_CATALOG_CODE",
574
587
  # asset catalog — wire dataclasses
575
588
  "FileManifestEntry",
576
589
  "AssetRecord",
@@ -681,6 +694,7 @@ __all__ = [
681
694
  "MAX_CHECK_NAME_CHARS",
682
695
  "MAX_FAILURE_GROUPS",
683
696
  "MAX_RECORDED_EPISODES",
697
+ "MAX_REPLAYED_FAILURES",
684
698
  "MAX_RECORDING_PROBLEM_CHARS",
685
699
  "MAX_LISTED_EPISODES",
686
700
  "MAX_LISTED_SIMULATION_PROBLEMS",
@@ -691,6 +705,7 @@ __all__ = [
691
705
  "EvaluationActions",
692
706
  "ComparisonVerdict",
693
707
  "NextRule",
708
+ "Recording3D",
694
709
  "SimulationProblem",
695
710
  "EvaluationCheckpoint",
696
711
  "EvaluationTask",
@@ -712,6 +727,7 @@ __all__ = [
712
727
  "EPISODES_CSV_COLUMNS_BEFORE_CHECKS",
713
728
  "EPISODES_CSV_CHECK_PREFIX",
714
729
  "EPISODES_CSV_COLUMNS_AFTER_CHECKS",
730
+ "EPISODES_CSV_REPLAY_COLUMNS",
715
731
  "EPISODES_CSV_FIRST_FAILURE_STEP_PREFIX",
716
732
  "EPISODES_CSV_FIRST_FAILURE_AT_S_PREFIX",
717
733
  "episodes_csv_columns",
@@ -83,6 +83,8 @@ class AppProtocol(Protocol):
83
83
  type: Union[JobType, str],
84
84
  callbacks: Sequence[JobCallbackProtocol] = ...,
85
85
  system: Optional[SystemType] = ...,
86
+ gpus: Optional[int] = ...,
87
+ gpus_per_node: Optional[int] = ...,
86
88
  timeout: Optional[int] = ...,
87
89
  retries: int = ...,
88
90
  **extra: Any,
@@ -95,6 +97,8 @@ class AppProtocol(Protocol):
95
97
  type: Union[JobType, str],
96
98
  callbacks: Sequence[JobCallbackProtocol] = ...,
97
99
  system: Optional[SystemType] = ...,
100
+ gpus: Optional[int] = ...,
101
+ gpus_per_node: Optional[int] = ...,
98
102
  timeout: Optional[int] = ...,
99
103
  retries: int = ...,
100
104
  **extra: Any,
@@ -106,6 +110,8 @@ class AppProtocol(Protocol):
106
110
  type: Optional[Union[JobType, str]] = None,
107
111
  callbacks: Sequence[JobCallbackProtocol] = (),
108
112
  system: Optional[SystemType] = None,
113
+ gpus: Optional[int] = None,
114
+ gpus_per_node: Optional[int] = None,
109
115
  timeout: Optional[int] = None,
110
116
  retries: int = 0,
111
117
  **extra: Any,
@@ -611,6 +611,7 @@ MAX_ASSETS_RESOLVE_BATCH = 64
611
611
  #: VALIDATOR's finalize call to send the IDENTICAL string — one shared constant is the
612
612
  #: only way to prevent string drift.
613
613
  DEFAULT_ASSET_RUNTIME = "isaac"
614
+ """The catalog label used by the legacy validation default."""
614
615
 
615
616
  # --------------------------------------------------------------------------
616
617
  # Publish options envelope
@@ -672,6 +673,13 @@ ASSET_DIGEST_MISMATCH_CODE = "asset_digest_mismatch"
672
673
  #: from both :data:`ASSET_MISSING_CODE` (bytes never arrived) and
673
674
  #: :data:`ASSET_DIGEST_MISMATCH_CODE` (bytes don't match what was promised).
674
675
  ASSET_CORRUPT_CODE = "asset_corrupt"
676
+ #: Error code the worker uses to **fail a job in place** when a claimed
677
+ #: Simulo Engine catalog asset names a version the catalog does not hold, or a
678
+ #: version for another asset kind. The claim is checked against the catalog
679
+ #: index with no download, so the answer cannot change on a retry. A download or
680
+ #: cache fault keeps :data:`ASSET_MISSING_CODE` or :data:`ASSET_DIGEST_MISMATCH_CODE`;
681
+ #: the control plane retries those and fails a validation only on this code.
682
+ ASSET_NOT_IN_CATALOG_CODE = "asset_not_in_catalog"
675
683
  #: The uniform per-ref miss code the batch resolver (:data:`ASSETS_RESOLVE_ROUTE`)
676
684
  #: and the job-submit pin re-verify both answer for a ref that does not resolve —
677
685
  #: unknown, cross-org, deleted, or malformed, **all reported identically**
@@ -1059,7 +1067,7 @@ class WorkerAssetInfo:
1059
1067
  """The pinned asset ref in the wire canonical form (module docstring's
1060
1068
  "Canonical form (wire)" note) — publisher always explicit, version always
1061
1069
  pinned, e.g. ``acme-robotics/world/warehouse:v2`` for an org asset or
1062
- ``simulo/world/warehouse:v2`` for a global one. Same form as
1070
+ ``simulo/world/warehouse:v3`` for a global one. Same form as
1063
1071
  :attr:`ResolvedAssetPin.canonical_ref`."""
1064
1072
 
1065
1073
  kind: str
@@ -78,23 +78,23 @@ class JobStatus(StrEnum):
78
78
  class SystemType(StrEnum):
79
79
  """An abstract GPU system tier.
80
80
 
81
- Each tier's hardware profile and fleet-provisioning state lives in
82
- :data:`simulo.interfaces.platform.systems.SYSTEM_SPECS`, keyed by these
83
- members. The AWS instance type behind a tier is never part of this name —
84
- see :class:`simulo.interfaces.platform.systems.SystemSpec`'s own docstring.
81
+ Memory classes and enabled layouts live in
82
+ :data:`simulo.interfaces.platform.system_tiers.SYSTEM_TIERS`.
83
+ Hardware can change within a class. The older ``systems.SYSTEM_SPECS``
84
+ remains a compatibility snapshot for consumers awaiting adoption.
85
85
  """
86
86
 
87
87
  TIER_1 = "tier1"
88
- """Entry tier — always available."""
88
+ """16 GB per accelerator; enabled on staging."""
89
89
 
90
90
  TIER_2 = "tier2"
91
- """Mid tier — always available."""
91
+ """24 GB per accelerator; enabled on staging."""
92
92
 
93
93
  TIER_3 = "tier3"
94
- """High tier — not yet available on the deployable fleet."""
94
+ """48 GB per accelerator; no enabled staging hardware."""
95
95
 
96
96
  TIER_4 = "tier4"
97
- """Top tier — not yet available on the deployable fleet."""
97
+ """96 GB per accelerator; no enabled staging hardware."""
98
98
 
99
99
 
100
100
  class ResourceKind(StrEnum):