simulo-interfaces 0.21.0__tar.gz → 0.22.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 (60) hide show
  1. {simulo_interfaces-0.21.0/src/simulo_interfaces.egg-info → simulo_interfaces-0.22.0}/PKG-INFO +1 -1
  2. {simulo_interfaces-0.21.0 → simulo_interfaces-0.22.0}/pyproject.toml +1 -1
  3. {simulo_interfaces-0.21.0 → simulo_interfaces-0.22.0}/src/simulo/interfaces/__init__.py +4 -0
  4. {simulo_interfaces-0.21.0 → simulo_interfaces-0.22.0}/src/simulo/interfaces/authoring/__init__.py +11 -7
  5. simulo_interfaces-0.22.0/src/simulo/interfaces/authoring/checkpoint.py +84 -0
  6. {simulo_interfaces-0.21.0 → simulo_interfaces-0.22.0}/src/simulo/interfaces/authoring/record.py +1 -1
  7. {simulo_interfaces-0.21.0 → simulo_interfaces-0.22.0}/src/simulo/interfaces/platform/__init__.py +78 -72
  8. {simulo_interfaces-0.21.0 → simulo_interfaces-0.22.0}/src/simulo/interfaces/platform/enums.py +9 -3
  9. simulo_interfaces-0.21.0/src/simulo/interfaces/platform/policy_bundle.py → simulo_interfaces-0.22.0/src/simulo/interfaces/platform/onnx_bundle.py +115 -117
  10. {simulo_interfaces-0.21.0 → simulo_interfaces-0.22.0}/src/simulo/interfaces/platform/outputs.py +18 -3
  11. {simulo_interfaces-0.21.0 → simulo_interfaces-0.22.0}/src/simulo/interfaces/platform/submit.py +1 -0
  12. {simulo_interfaces-0.21.0 → simulo_interfaces-0.22.0}/src/simulo/interfaces/runtime/__init__.py +2 -2
  13. {simulo_interfaces-0.21.0 → simulo_interfaces-0.22.0}/src/simulo/interfaces/runtime/policy.py +3 -3
  14. {simulo_interfaces-0.21.0 → simulo_interfaces-0.22.0/src/simulo_interfaces.egg-info}/PKG-INFO +1 -1
  15. {simulo_interfaces-0.21.0 → simulo_interfaces-0.22.0}/src/simulo_interfaces.egg-info/SOURCES.txt +2 -1
  16. {simulo_interfaces-0.21.0 → simulo_interfaces-0.22.0}/MANIFEST.in +0 -0
  17. {simulo_interfaces-0.21.0 → simulo_interfaces-0.22.0}/PYPI.md +0 -0
  18. {simulo_interfaces-0.21.0 → simulo_interfaces-0.22.0}/setup.cfg +0 -0
  19. {simulo_interfaces-0.21.0 → simulo_interfaces-0.22.0}/src/simulo/interfaces/authoring/actuator.py +0 -0
  20. {simulo_interfaces-0.21.0 → simulo_interfaces-0.22.0}/src/simulo/interfaces/authoring/asset.py +0 -0
  21. {simulo_interfaces-0.21.0 → simulo_interfaces-0.22.0}/src/simulo/interfaces/authoring/entity.py +0 -0
  22. {simulo_interfaces-0.21.0 → simulo_interfaces-0.22.0}/src/simulo/interfaces/authoring/light.py +0 -0
  23. {simulo_interfaces-0.21.0 → simulo_interfaces-0.22.0}/src/simulo/interfaces/authoring/materials.py +0 -0
  24. {simulo_interfaces-0.21.0 → simulo_interfaces-0.22.0}/src/simulo/interfaces/authoring/physics.py +0 -0
  25. {simulo_interfaces-0.21.0 → simulo_interfaces-0.22.0}/src/simulo/interfaces/authoring/pose.py +0 -0
  26. {simulo_interfaces-0.21.0 → simulo_interfaces-0.22.0}/src/simulo/interfaces/authoring/primitives.py +0 -0
  27. {simulo_interfaces-0.21.0 → simulo_interfaces-0.22.0}/src/simulo/interfaces/authoring/prop.py +0 -0
  28. {simulo_interfaces-0.21.0 → simulo_interfaces-0.22.0}/src/simulo/interfaces/authoring/robot.py +0 -0
  29. {simulo_interfaces-0.21.0 → simulo_interfaces-0.22.0}/src/simulo/interfaces/authoring/scene.py +0 -0
  30. {simulo_interfaces-0.21.0 → simulo_interfaces-0.22.0}/src/simulo/interfaces/authoring/sensor.py +0 -0
  31. {simulo_interfaces-0.21.0 → simulo_interfaces-0.22.0}/src/simulo/interfaces/authoring/terrain.py +0 -0
  32. {simulo_interfaces-0.21.0 → simulo_interfaces-0.22.0}/src/simulo/interfaces/authoring/visual.py +0 -0
  33. {simulo_interfaces-0.21.0 → simulo_interfaces-0.22.0}/src/simulo/interfaces/authoring/world.py +0 -0
  34. {simulo_interfaces-0.21.0 → simulo_interfaces-0.22.0}/src/simulo/interfaces/exceptions.py +0 -0
  35. {simulo_interfaces-0.21.0 → simulo_interfaces-0.22.0}/src/simulo/interfaces/ids.py +0 -0
  36. {simulo_interfaces-0.21.0 → simulo_interfaces-0.22.0}/src/simulo/interfaces/platform/_payload.py +0 -0
  37. {simulo_interfaces-0.21.0 → simulo_interfaces-0.22.0}/src/simulo/interfaces/platform/app.py +0 -0
  38. {simulo_interfaces-0.21.0 → simulo_interfaces-0.22.0}/src/simulo/interfaces/platform/asset.py +0 -0
  39. {simulo_interfaces-0.21.0 → simulo_interfaces-0.22.0}/src/simulo/interfaces/platform/asset_catalog.py +0 -0
  40. {simulo_interfaces-0.21.0 → simulo_interfaces-0.22.0}/src/simulo/interfaces/platform/callbacks.py +0 -0
  41. {simulo_interfaces-0.21.0 → simulo_interfaces-0.22.0}/src/simulo/interfaces/platform/debug.py +0 -0
  42. {simulo_interfaces-0.21.0 → simulo_interfaces-0.22.0}/src/simulo/interfaces/platform/domain.py +0 -0
  43. {simulo_interfaces-0.21.0 → simulo_interfaces-0.22.0}/src/simulo/interfaces/platform/job_events.py +0 -0
  44. {simulo_interfaces-0.21.0 → simulo_interfaces-0.22.0}/src/simulo/interfaces/platform/manifest.py +0 -0
  45. {simulo_interfaces-0.21.0 → simulo_interfaces-0.22.0}/src/simulo/interfaces/platform/preview.py +0 -0
  46. {simulo_interfaces-0.21.0 → simulo_interfaces-0.22.0}/src/simulo/interfaces/platform/runs.py +0 -0
  47. {simulo_interfaces-0.21.0 → simulo_interfaces-0.22.0}/src/simulo/interfaces/platform/runtime.py +0 -0
  48. {simulo_interfaces-0.21.0 → simulo_interfaces-0.22.0}/src/simulo/interfaces/platform/systems.py +0 -0
  49. {simulo_interfaces-0.21.0 → simulo_interfaces-0.22.0}/src/simulo/interfaces/platform/volume.py +0 -0
  50. {simulo_interfaces-0.21.0 → simulo_interfaces-0.22.0}/src/simulo/interfaces/py.typed +0 -0
  51. {simulo_interfaces-0.21.0 → simulo_interfaces-0.22.0}/src/simulo/interfaces/runtime/anomaly.py +0 -0
  52. {simulo_interfaces-0.21.0 → simulo_interfaces-0.22.0}/src/simulo/interfaces/runtime/components.py +0 -0
  53. {simulo_interfaces-0.21.0 → simulo_interfaces-0.22.0}/src/simulo/interfaces/runtime/env.py +0 -0
  54. {simulo_interfaces-0.21.0 → simulo_interfaces-0.22.0}/src/simulo/interfaces/runtime/player.py +0 -0
  55. {simulo_interfaces-0.21.0 → simulo_interfaces-0.22.0}/src/simulo/interfaces/runtime/task.py +0 -0
  56. {simulo_interfaces-0.21.0 → simulo_interfaces-0.22.0}/src/simulo/interfaces/runtime/tensors.py +0 -0
  57. {simulo_interfaces-0.21.0 → simulo_interfaces-0.22.0}/src/simulo/interfaces/runtime/trainer.py +0 -0
  58. {simulo_interfaces-0.21.0 → simulo_interfaces-0.22.0}/src/simulo_interfaces.egg-info/dependency_links.txt +0 -0
  59. {simulo_interfaces-0.21.0 → simulo_interfaces-0.22.0}/src/simulo_interfaces.egg-info/requires.txt +0 -0
  60. {simulo_interfaces-0.21.0 → simulo_interfaces-0.22.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.21.0
3
+ Version: 0.22.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
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "simulo-interfaces"
7
- version = "0.21.0"
7
+ version = "0.22.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"
@@ -19,6 +19,7 @@ namespace that ``simulo-backend`` also contributes to; it ships NO
19
19
  """
20
20
 
21
21
  from simulo.interfaces import platform, runtime
22
+ from simulo.interfaces.authoring import PolicyCheckpoint
22
23
  from simulo.interfaces.exceptions import (
23
24
  ContractViolationError,
24
25
  ImportResolutionError,
@@ -50,12 +51,15 @@ from simulo.interfaces.ids import (
50
51
  policy_id_for_job,
51
52
  )
52
53
  from simulo.interfaces.platform.enums import JobType
54
+ from simulo.interfaces.runtime import PolicyNetworkProtocol
53
55
 
54
56
  __all__ = [
55
57
  # subpackages
56
58
  "platform",
57
59
  "runtime",
58
60
  "JobType",
61
+ "PolicyCheckpoint",
62
+ "PolicyNetworkProtocol",
59
63
  # exception hierarchy
60
64
  "SimuloError",
61
65
  "ContractViolationError",
@@ -41,13 +41,14 @@ waves add the remaining RELOCATE-classified types and MIRROR Protocols.
41
41
  **R-C3 is the hard constraint on everything that lands here:** no module in
42
42
  this package — or anywhere else in ``simulo-interfaces`` — may import
43
43
  ``simulo.core``, ``simulo.backend``, or the thin client's private internal
44
- package, at import time or at call time (the ``Scene`` trap: zero torch
45
- imports, but call-time imports of torch-coupled ``core`` modules deep inside a
46
- method body). Guarded by ``tests/test_no_core_dependency.py`` in this package —
47
- both a static import-statement guard and a runtime ``sys.modules`` check that
48
- imports every submodule AND instantiates/calls the relocated API, because the
49
- static guard alone cannot see ``from simulo import core``, dynamic access, or a
50
- call-time-only import buried in a method body.
44
+ package at import time. Calls must remain dependency-free too (the ``Scene``
45
+ trap), with one explicit execution-only bridge: ``PolicyCheckpoint.load()``
46
+ lazily imports ``simulo.core.policy.load_policy_network`` inside a job and
47
+ raises the documented submit-time error when the backend is absent. Guarded by
48
+ ``tests/test_no_core_dependency.py`` in this package — both a static
49
+ import-statement guard and isolated runtime checks that exercise the relocated
50
+ API, prove ordinary imports remain backend-free, and prove the loader fails
51
+ clearly in a submit-only installation.
51
52
 
52
53
  Two relocation mechanisms select which types land here and how (see the derived
53
54
  plan for the full worked example and rejected alternatives):
@@ -87,6 +88,7 @@ docstring, is the source of truth for what lands here and when.
87
88
 
88
89
  from simulo.interfaces.authoring.actuator import ActuatorProtocol
89
90
  from simulo.interfaces.authoring.asset import AssetSource, URDFAsset, USDAsset
91
+ from simulo.interfaces.authoring.checkpoint import PolicyCheckpoint
90
92
  from simulo.interfaces.authoring.entity import AssetEntity, Entity
91
93
  from simulo.interfaces.authoring.light import DistantLight, DomeLight, Light, LightConfig
92
94
  from simulo.interfaces.authoring.materials import Material, SurfaceMaterial
@@ -171,6 +173,8 @@ __all__ = [
171
173
  # record (RELOCATED Wave C4 — the MCAP recording config; its helper
172
174
  # functions stay importable from ``simulo.interfaces.authoring.record``)
173
175
  "RecordConfig",
176
+ # injected policy input (dependency-free; loading is deferred to execution)
177
+ "PolicyCheckpoint",
174
178
  # visual
175
179
  "VisualMarkerBase",
176
180
  "AxesMarker",
@@ -0,0 +1,84 @@
1
+ """Dependency-free handle for a policy checkpoint injected into a job."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from collections.abc import Mapping
6
+ from dataclasses import dataclass
7
+ from importlib import import_module
8
+ from pathlib import Path
9
+ from typing import Any, cast
10
+
11
+ from simulo.interfaces.runtime.policy import PolicyNetworkProtocol
12
+
13
+
14
+ @dataclass(frozen=True)
15
+ class PolicyCheckpoint:
16
+ """A resolved policy checkpoint supplied to a play or evaluation job.
17
+
18
+ The contract contains only standard-library values. Loading the policy is
19
+ deliberately deferred until execution, where ``simulo-backend`` provides
20
+ the concrete policy-network loader.
21
+ """
22
+
23
+ checkpoint: str
24
+ policy_id: str
25
+ kind: str
26
+ path: Path
27
+ meta: Mapping[str, Any]
28
+
29
+ @property
30
+ def iteration(self) -> int:
31
+ """Training iteration stored in the checkpoint sidecar."""
32
+
33
+ return cast(int, self.meta["completed_iterations"])
34
+
35
+ @property
36
+ def max_iterations(self) -> int:
37
+ """Configured training limit stored in the checkpoint sidecar."""
38
+
39
+ return cast(int, self.meta["max_iterations"])
40
+
41
+ @property
42
+ def reward(self) -> float | None:
43
+ """Best-checkpoint reward, or ``None`` when the sidecar has none."""
44
+
45
+ return cast(float | None, self.meta.get("reward"))
46
+
47
+ @property
48
+ def obs_dim(self) -> int:
49
+ """Observation width used to train the checkpoint."""
50
+
51
+ return cast(int, self.meta["obs_dim"])
52
+
53
+ @property
54
+ def act_dim(self) -> int:
55
+ """Action width produced by the checkpoint."""
56
+
57
+ return cast(int, self.meta["act_dim"])
58
+
59
+ @property
60
+ def task_name(self) -> str:
61
+ """Name of the task class used for training, if the sidecar has it."""
62
+
63
+ return cast(str, self.meta.get("task_name", "unknown"))
64
+
65
+ @property
66
+ def task_digest(self) -> str:
67
+ """Digest of the file that defined the training task, if available."""
68
+
69
+ return cast(str, self.meta.get("task_digest", "unknown"))
70
+
71
+ def load(self, device: str = "cuda") -> PolicyNetworkProtocol:
72
+ """Load the checkpoint as a policy network inside a Simulo job."""
73
+
74
+ try:
75
+ policy_module = import_module("simulo.core.policy")
76
+ except ImportError as exc:
77
+ raise RuntimeError(
78
+ "PolicyCheckpoint.load() runs inside a job on Simulo; it is not available at submit."
79
+ ) from exc
80
+ loader = getattr(policy_module, "load_policy_network")
81
+ return cast(PolicyNetworkProtocol, loader(self, device=device))
82
+
83
+
84
+ __all__ = ["PolicyCheckpoint"]
@@ -194,7 +194,7 @@ class RecordConfig:
194
194
  mitigation depends on the tri-state.
195
195
  """
196
196
 
197
- output_path: Union[str, "os.PathLike[str]", Path]
197
+ output_path: Optional[Union[str, "os.PathLike[str]", Path]] = None
198
198
 
199
199
  # Identity
200
200
  run_id: Optional[str] = None
@@ -71,6 +71,8 @@ from simulo.interfaces.platform.callbacks import JobCallbackProtocol
71
71
  from simulo.interfaces.platform.debug import DebugSessionProtocol, ReplaySessionProtocol, VisualizationSessionProtocol
72
72
  from simulo.interfaces.platform.domain import Checkpoint, Job, Package, Project, Resource, Tag
73
73
  from simulo.interfaces.platform.enums import (
74
+ INPUT_CHECKPOINT_JOB_TYPES,
75
+ INPUT_CHECKPOINT_REQUIRED_JOB_TYPES,
74
76
  UNAVAILABLE_JOB_TYPES,
75
77
  USER_SUBMITTABLE_JOB_TYPES,
76
78
  JobType,
@@ -117,50 +119,29 @@ from simulo.interfaces.platform.manifest import (
117
119
  PreflightResponse,
118
120
  RuntimeManifest,
119
121
  )
120
- from simulo.interfaces.platform.outputs import (
121
- DECLARED_OUTPUT_MISSING_CODE,
122
- JOB_OUTPUT_DOWNLOAD_ROUTE_TEMPLATE,
123
- JOB_OUTPUTS_ROUTE_TEMPLATE,
124
- MAX_OUTPUT_FLAG_CODE_CHARS,
125
- MAX_OUTPUT_FLAG_DETAIL_CHARS,
126
- MAX_OUTPUT_NAME_BYTES,
127
- MAX_OUTPUT_PATH_BYTES,
128
- MAX_OUTPUTS_BYTES,
129
- OUTPUT_DROPPED_DETAILS,
130
- OUTPUT_FLAG_ANOMALY,
131
- OUTPUT_FLAG_OUTPUT_DROPPED,
132
- OUTPUTS_UNDELIVERED_CODE,
133
- WORKER_JOB_ARTIFACTS_PRESIGN_ROUTE_TEMPLATE,
134
- WORKER_JOB_ARTIFACTS_ROUTE_TEMPLATE,
135
- JobOutputsSummary,
136
- Output,
137
- OutputDeclaration,
138
- OutputFlag,
139
- OutputRecord,
140
- )
141
- from simulo.interfaces.platform.policy_bundle import (
122
+ from simulo.interfaces.platform.onnx_bundle import (
142
123
  EXPORT_JOB_TYPE,
143
124
  EXPORT_VALIDATION_JOB_TYPE,
144
125
  JOB_EXPORTS_ROUTE_TEMPLATE,
145
- MAX_POLICY_BUNDLE_UNCOMPRESSED_BYTES,
126
+ MAX_ONNX_BUNDLE_UNCOMPRESSED_BYTES,
146
127
  MAX_POLICY_NAME_TOKEN_CHARS,
147
- POLICY_BUNDLE_ACTION_SCHEMA_FILE,
148
- POLICY_BUNDLE_ARCHIVE_NAME_TEMPLATE,
149
- POLICY_BUNDLE_FILES,
150
- POLICY_BUNDLE_MANIFEST_FILE,
151
- POLICY_BUNDLE_MODEL_ONNX_FILE,
152
- POLICY_BUNDLE_MODEL_PT_FILE,
153
- POLICY_BUNDLE_NORMALIZATION_FILE,
154
- POLICY_BUNDLE_OBSERVATION_SCHEMA_FILE,
155
- POLICY_BUNDLE_OPTIONAL_FILES,
156
- POLICY_BUNDLE_OUTPUT_KIND,
157
- POLICY_BUNDLE_README_FILE,
158
- POLICY_BUNDLE_REQUIRED_FILES,
159
- POLICY_BUNDLE_REQUIREMENTS_FILE,
160
- POLICY_BUNDLE_ROOT_DIR_TEMPLATE,
161
- POLICY_BUNDLE_SCHEMA_VERSION,
162
- POLICY_BUNDLE_TEST_VECTORS_FILE,
163
- POLICY_BUNDLE_VERIFY_FILE,
128
+ ONNX_BUNDLE_ACTION_SCHEMA_FILE,
129
+ ONNX_BUNDLE_ARCHIVE_NAME_TEMPLATE,
130
+ ONNX_BUNDLE_FILES,
131
+ ONNX_BUNDLE_MANIFEST_FILE,
132
+ ONNX_BUNDLE_MODEL_ONNX_FILE,
133
+ ONNX_BUNDLE_MODEL_PT_FILE,
134
+ ONNX_BUNDLE_NORMALIZATION_FILE,
135
+ ONNX_BUNDLE_OBSERVATION_SCHEMA_FILE,
136
+ ONNX_BUNDLE_OPTIONAL_FILES,
137
+ ONNX_BUNDLE_OUTPUT_KIND,
138
+ ONNX_BUNDLE_README_FILE,
139
+ ONNX_BUNDLE_REQUIRED_FILES,
140
+ ONNX_BUNDLE_REQUIREMENTS_FILE,
141
+ ONNX_BUNDLE_ROOT_DIR_TEMPLATE,
142
+ ONNX_BUNDLE_SCHEMA_VERSION,
143
+ ONNX_BUNDLE_TEST_VECTORS_FILE,
144
+ ONNX_BUNDLE_VERIFY_FILE,
164
145
  POLICY_EQUIVALENCE_ABS_TOLERANCE,
165
146
  POLICY_EQUIVALENCE_REL_TOLERANCE,
166
147
  POLICY_GOLDEN_VECTOR_COUNT,
@@ -168,12 +149,12 @@ from simulo.interfaces.platform.policy_bundle import (
168
149
  POLICY_TENSOR_DTYPES,
169
150
  POLICY_TEST_VECTOR_EXPECTED_OUTPUTS_KEY,
170
151
  POLICY_TEST_VECTOR_INPUTS_KEY,
171
- SUPPORTED_POLICY_BUNDLE_SCHEMA_MAJORS,
152
+ SUPPORTED_ONNX_BUNDLE_SCHEMA_MAJORS,
172
153
  UNKNOWN,
154
+ OnnxBundleManifest,
173
155
  PolicyActionComponent,
174
156
  PolicyActionSchema,
175
157
  PolicyBounds,
176
- PolicyBundleManifest,
177
158
  PolicyEquivalenceSpec,
178
159
  PolicyExportFailureReason,
179
160
  PolicyExportFormat,
@@ -186,12 +167,34 @@ from simulo.interfaces.platform.policy_bundle import (
186
167
  PolicySourceSpec,
187
168
  PolicyTensorSpec,
188
169
  Unknown,
189
- is_supported_policy_bundle_schema,
190
- policy_bundle_archive_name,
191
- policy_bundle_root_dir,
192
- policy_bundle_schema_major,
170
+ is_supported_onnx_bundle_schema,
171
+ onnx_bundle_archive_name,
172
+ onnx_bundle_root_dir,
173
+ onnx_bundle_schema_major,
193
174
  policy_name_token,
194
- validate_policy_bundle,
175
+ validate_onnx_bundle,
176
+ )
177
+ from simulo.interfaces.platform.outputs import (
178
+ DECLARED_OUTPUT_MISSING_CODE,
179
+ JOB_OUTPUT_DOWNLOAD_ROUTE_TEMPLATE,
180
+ JOB_OUTPUTS_ROUTE_TEMPLATE,
181
+ MAX_OUTPUT_FLAG_CODE_CHARS,
182
+ MAX_OUTPUT_FLAG_DETAIL_CHARS,
183
+ MAX_OUTPUT_NAME_BYTES,
184
+ MAX_OUTPUT_PATH_BYTES,
185
+ MAX_OUTPUTS_BYTES,
186
+ OUTPUT_DROPPED_DETAILS,
187
+ OUTPUT_FLAG_ANOMALY,
188
+ OUTPUT_FLAG_OUTPUT_DROPPED,
189
+ OUTPUTS_UNDELIVERED_CODE,
190
+ WORKER_JOB_ARTIFACTS_PRESIGN_ROUTE_TEMPLATE,
191
+ WORKER_JOB_ARTIFACTS_ROUTE_TEMPLATE,
192
+ JobOutputsSummary,
193
+ Output,
194
+ OutputDeclaration,
195
+ OutputFlag,
196
+ OutputRecord,
197
+ tier0_declarations,
195
198
  )
196
199
  from simulo.interfaces.platform.preview import (
197
200
  PREVIEW_CHECKS,
@@ -289,6 +292,8 @@ __all__ = [
289
292
  "JobType",
290
293
  "USER_SUBMITTABLE_JOB_TYPES",
291
294
  "UNAVAILABLE_JOB_TYPES",
295
+ "INPUT_CHECKPOINT_JOB_TYPES",
296
+ "INPUT_CHECKPOINT_REQUIRED_JOB_TYPES",
292
297
  "OutputKind",
293
298
  "SystemType",
294
299
  # systems (GPU system-tier catalog, issue #1362)
@@ -343,6 +348,7 @@ __all__ = [
343
348
  # registration, projection row, completion announcement, routes, caps,
344
349
  # pinned wire codes
345
350
  "OutputDeclaration",
351
+ "tier0_declarations",
346
352
  "Output",
347
353
  "OutputRecord",
348
354
  "OutputFlag",
@@ -507,34 +513,34 @@ __all__ = [
507
513
  # bundle layout, naming rule, export routes/job type, equivalence
508
514
  # defaults, enums, explicit-unknown marker, manifest dataclasses, the
509
515
  # export-validation result, and the cross-file coherence check
510
- "POLICY_BUNDLE_SCHEMA_VERSION",
511
- "SUPPORTED_POLICY_BUNDLE_SCHEMA_MAJORS",
512
- "policy_bundle_schema_major",
513
- "is_supported_policy_bundle_schema",
514
- "POLICY_BUNDLE_MODEL_ONNX_FILE",
515
- "POLICY_BUNDLE_MODEL_PT_FILE",
516
- "POLICY_BUNDLE_MANIFEST_FILE",
517
- "POLICY_BUNDLE_OBSERVATION_SCHEMA_FILE",
518
- "POLICY_BUNDLE_ACTION_SCHEMA_FILE",
519
- "POLICY_BUNDLE_NORMALIZATION_FILE",
520
- "POLICY_BUNDLE_TEST_VECTORS_FILE",
521
- "POLICY_BUNDLE_VERIFY_FILE",
522
- "POLICY_BUNDLE_REQUIREMENTS_FILE",
523
- "POLICY_BUNDLE_README_FILE",
524
- "POLICY_BUNDLE_FILES",
525
- "POLICY_BUNDLE_REQUIRED_FILES",
526
- "POLICY_BUNDLE_OPTIONAL_FILES",
527
- "MAX_POLICY_BUNDLE_UNCOMPRESSED_BYTES",
516
+ "ONNX_BUNDLE_SCHEMA_VERSION",
517
+ "SUPPORTED_ONNX_BUNDLE_SCHEMA_MAJORS",
518
+ "onnx_bundle_schema_major",
519
+ "is_supported_onnx_bundle_schema",
520
+ "ONNX_BUNDLE_MODEL_ONNX_FILE",
521
+ "ONNX_BUNDLE_MODEL_PT_FILE",
522
+ "ONNX_BUNDLE_MANIFEST_FILE",
523
+ "ONNX_BUNDLE_OBSERVATION_SCHEMA_FILE",
524
+ "ONNX_BUNDLE_ACTION_SCHEMA_FILE",
525
+ "ONNX_BUNDLE_NORMALIZATION_FILE",
526
+ "ONNX_BUNDLE_TEST_VECTORS_FILE",
527
+ "ONNX_BUNDLE_VERIFY_FILE",
528
+ "ONNX_BUNDLE_REQUIREMENTS_FILE",
529
+ "ONNX_BUNDLE_README_FILE",
530
+ "ONNX_BUNDLE_FILES",
531
+ "ONNX_BUNDLE_REQUIRED_FILES",
532
+ "ONNX_BUNDLE_OPTIONAL_FILES",
533
+ "MAX_ONNX_BUNDLE_UNCOMPRESSED_BYTES",
528
534
  "POLICY_TEST_VECTOR_INPUTS_KEY",
529
535
  "POLICY_TEST_VECTOR_EXPECTED_OUTPUTS_KEY",
530
- "POLICY_BUNDLE_OUTPUT_KIND",
531
- "POLICY_BUNDLE_ROOT_DIR_TEMPLATE",
532
- "POLICY_BUNDLE_ARCHIVE_NAME_TEMPLATE",
536
+ "ONNX_BUNDLE_OUTPUT_KIND",
537
+ "ONNX_BUNDLE_ROOT_DIR_TEMPLATE",
538
+ "ONNX_BUNDLE_ARCHIVE_NAME_TEMPLATE",
533
539
  "MAX_POLICY_NAME_TOKEN_CHARS",
534
540
  "POLICY_NAME_TOKEN_FALLBACK",
535
541
  "policy_name_token",
536
- "policy_bundle_root_dir",
537
- "policy_bundle_archive_name",
542
+ "onnx_bundle_root_dir",
543
+ "onnx_bundle_archive_name",
538
544
  "JOB_EXPORTS_ROUTE_TEMPLATE",
539
545
  "EXPORT_JOB_TYPE",
540
546
  "EXPORT_VALIDATION_JOB_TYPE",
@@ -555,11 +561,11 @@ __all__ = [
555
561
  "PolicyEquivalenceSpec",
556
562
  "PolicyObservationComponent",
557
563
  "PolicyActionComponent",
558
- "PolicyBundleManifest",
564
+ "OnnxBundleManifest",
559
565
  "PolicyObservationSchema",
560
566
  "PolicyActionSchema",
561
567
  "PolicyNormalization",
562
- "validate_policy_bundle",
568
+ "validate_onnx_bundle",
563
569
  # preview report wire contract — schema version, check names, and the
564
570
  # row/stage/report shapes the preview job returns
565
571
  "PREVIEW_REPORT_SCHEMA_VERSION",
@@ -19,10 +19,16 @@ class JobType(StrEnum):
19
19
 
20
20
 
21
21
  #: Types a user can submit today. Platform-owned jobs use the remaining types.
22
- USER_SUBMITTABLE_JOB_TYPES = frozenset({JobType.TRAIN})
22
+ USER_SUBMITTABLE_JOB_TYPES = frozenset({JobType.PREVIEW, JobType.TRAIN, JobType.PLAY})
23
23
 
24
24
  #: Declared job types whose user-submission workflows are not available yet.
25
- UNAVAILABLE_JOB_TYPES = frozenset({JobType.PREVIEW, JobType.EVAL, JobType.PLAY})
25
+ UNAVAILABLE_JOB_TYPES = frozenset({JobType.EVAL})
26
+
27
+ #: Job types whose submission may carry an input policy checkpoint.
28
+ INPUT_CHECKPOINT_JOB_TYPES = frozenset({JobType.TRAIN, JobType.PLAY, JobType.EVAL})
29
+
30
+ #: Job types that cannot run without an input policy checkpoint.
31
+ INPUT_CHECKPOINT_REQUIRED_JOB_TYPES = frozenset({JobType.PLAY, JobType.EVAL})
26
32
 
27
33
 
28
34
  class JobStatus(StrEnum):
@@ -143,7 +149,7 @@ class OutputKind(StrEnum):
143
149
  Training jobs publish this output through the policy checkpoint pipeline."""
144
150
 
145
151
  ONNX_BUNDLE = "onnx_bundle"
146
- """A standalone ONNX policy bundle produced by an export job."""
152
+ """A standalone ONNX bundle produced by an export job."""
147
153
 
148
154
  LOG = "log"
149
155
  """The job's captured log stream."""