sequence-base 0.7.2__tar.gz → 0.8.0rc1__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 (135) hide show
  1. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/PKG-INFO +1 -1
  2. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/pyproject.toml +1 -1
  3. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/constants/version.py +2 -1
  4. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/construct.py +0 -6
  5. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/contract/__init__.py +6 -8
  6. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/contract/accounts.py +5 -3
  7. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/contract/connect.py +4 -24
  8. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/contract/deployments.py +45 -44
  9. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/contract/eval.py +5 -31
  10. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/contract/own_io.py +3 -13
  11. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/contract/planner.py +2 -10
  12. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/contract/policy.py +10 -71
  13. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/contract/retired.py +4 -3
  14. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/contract/settings.py +2 -2
  15. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/presets/robot_arm.py +1 -23
  16. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schema_export.py +10 -10
  17. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/ActRequest.json +1 -1
  18. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/ActResponse.json +1 -1
  19. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/ActionChunk.json +1 -1
  20. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/ActionContract.json +1 -1
  21. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/ActionStep.json +1 -1
  22. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/AdapterPair.json +1 -1
  23. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/AddLocal.json +1 -1
  24. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/Autoscaler.json +2 -2
  25. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/BenchmarkRegisterRequest.json +10 -3
  26. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/BenchmarkSpec.json +2 -2
  27. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/BenchmarkStatusResponse.json +1 -1
  28. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/BootstrapResponse.json +1 -1
  29. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/Camera.json +1 -1
  30. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/CodeBundle.json +1 -1
  31. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/Concurrency.json +2 -2
  32. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/ConnectRequest.json +1 -1
  33. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/ConnectResponse.json +1 -1
  34. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/DeploymentAccepted.json +1 -1
  35. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/DeploymentPolicy.json +11 -4
  36. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/DeploymentRequest.json +13 -6
  37. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/DeploymentStatusResponse.json +1 -1
  38. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/ErrorBody.json +1 -1
  39. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/ErrorCodes.json +1 -1
  40. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/Estimate.json +1 -1
  41. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/EvalDryRunResponse.json +1 -1
  42. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/EvalReport.json +13 -1
  43. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/EvalRequest.json +7 -1
  44. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/EvalResponse.json +1 -1
  45. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/ImageFrame.json +1 -1
  46. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/ImageSpec.json +1 -1
  47. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/ImageStepAddLocal.json +1 -1
  48. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/ImageStepApt.json +1 -1
  49. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/ImageStepEnv.json +1 -1
  50. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/ImageStepProject.json +1 -1
  51. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/ImageStepRun.json +1 -1
  52. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/ImageStepTemplateFiles.json +1 -1
  53. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/ImageStepUvPip.json +1 -1
  54. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/InferParam.json +10 -3
  55. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/Lease.json +1 -1
  56. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/MetricAgg.json +1 -1
  57. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/Observation.json +1 -1
  58. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/ObservationContract.json +1 -1
  59. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/ObserveRequest.json +1 -1
  60. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/ObserveResponse.json +1 -1
  61. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/PlanAppend.json +1 -1
  62. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/PlanAppended.json +1 -1
  63. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/PlannerMember.json +1 -1
  64. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/PlannerObservation.json +1 -1
  65. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/PlannerObserve.json +1 -1
  66. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/PlannerObserved.json +1 -1
  67. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/PlannerPlanIn.json +1 -1
  68. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/PlannerPlans.json +1 -1
  69. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/PlannerPlansWritten.json +1 -1
  70. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/PlannerRobot.json +1 -1
  71. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/PlannerRound.json +1 -1
  72. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/PlannerRoundRequest.json +1 -1
  73. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/PlannerSpec.json +1 -1
  74. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/PolicyRegistration.json +4 -4
  75. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/PolicySpec.json +3 -3
  76. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/Project.json +1 -1
  77. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/Proprioception.json +1 -1
  78. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/ReplaySpec.json +1 -1
  79. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/Resources.json +1 -1
  80. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/RolloutResult.json +1 -1
  81. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/SecretCreateRequest.json +1 -1
  82. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/SecretInfo.json +1 -1
  83. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/SecretRef.json +1 -1
  84. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/SeqFlags.json +1 -1
  85. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/SettingsChange.json +7 -1
  86. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/SettingsChanged.json +13 -1
  87. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/SettingsView.json +19 -1
  88. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/Standby.json +1 -1
  89. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/TaskAgg.json +1 -1
  90. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/TemplateFiles.json +1 -1
  91. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/Tensors.json +1 -1
  92. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/Timeouts.json +1 -1
  93. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/UploadTarget.json +1 -1
  94. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/VolumeFile.json +1 -1
  95. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/VolumeInfo.json +1 -1
  96. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/VolumeMount.json +1 -1
  97. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/VolumeRef.json +1 -1
  98. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/VolumeUploadRequest.json +1 -1
  99. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/VolumeUploadResponse.json +1 -1
  100. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/schemas/WarmingError.json +1 -1
  101. sequence_base-0.7.2/sequence_base/contract/act.py +0 -17
  102. sequence_base-0.7.2/sequence_base/contract/io.py +0 -20
  103. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/.gitignore +0 -0
  104. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/README.md +0 -0
  105. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/__init__.py +0 -0
  106. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/auth.py +0 -0
  107. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/by_name.py +0 -0
  108. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/codec/__init__.py +0 -0
  109. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/codec/blocks.py +0 -0
  110. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/codec/compressed.py +0 -0
  111. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/codec/image.py +0 -0
  112. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/codec/marked.py +0 -0
  113. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/constants/__init__.py +0 -0
  114. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/constants/cards.py +0 -0
  115. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/constants/headers.py +0 -0
  116. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/constants/limits.py +0 -0
  117. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/contract/adapters.py +0 -0
  118. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/contract/benchmarks.py +0 -0
  119. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/contract/errors.py +0 -0
  120. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/contract/flags.py +0 -0
  121. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/contract/observe.py +0 -0
  122. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/contract/templates.py +0 -0
  123. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/contract/volumes.py +0 -0
  124. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/contract/wire.py +0 -0
  125. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/episode.py +0 -0
  126. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/errors/__init__.py +0 -0
  127. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/errors/transport.py +0 -0
  128. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/msgpack_io.py +0 -0
  129. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/obs/__init__.py +0 -0
  130. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/obs/log.py +0 -0
  131. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/obs/rid.py +0 -0
  132. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/presets/__init__.py +0 -0
  133. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/presets/frames.py +0 -0
  134. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/telemetry/__init__.py +0 -0
  135. {sequence_base-0.7.2 → sequence_base-0.8.0rc1}/sequence_base/telemetry/events.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: sequence-base
3
- Version: 0.7.2
3
+ Version: 0.8.0rc1
4
4
  Summary: Shared foundation for the Sequences platform — wire contract, correlation, error taxonomy, constants. Used by the robot SDK, gateway, and container harness.
5
5
  Project-URL: Changelog, https://generalsequences.com/docs/changelog/
6
6
  Requires-Python: >=3.10
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "sequence-base"
3
- version = "0.7.2"
3
+ version = "0.8.0rc1"
4
4
  description = "Shared foundation for the Sequences platform — wire contract, correlation, error taxonomy, constants. Used by the robot SDK, gateway, and container harness."
5
5
  requires-python = ">=3.10"
6
6
  dependencies = ["pydantic>=2.0"]
@@ -4,7 +4,8 @@
4
4
 
5
5
 
6
6
 
7
- CONTRACT_VERSION = "0.5.36"
7
+ CONTRACT_VERSION = "0.5.37"
8
+
8
9
 
9
10
 
10
11
 
@@ -38,9 +38,6 @@ CONFIG_KEY, SET_KEY = "$config", "$set"
38
38
  POLICY_FIELDS = ("hz", "action_chunk_valid_len", "action_chunk_replan_at")
39
39
 
40
40
 
41
- _RENAMED = {"action_chunk_len": "action_chunk_valid_len", "action_chunk_exec_len": "action_chunk_replan_at"}
42
-
43
-
44
41
  FORMS = re.compile(r"\{(?:weights(?:\.(?P<part>[A-Za-z_][A-Za-z0-9_-]*))?|(?P<worlds>num_worlds)"
45
42
  r"|policy\.(?P<field>[A-Za-z_][A-Za-z0-9_]*))\}")
46
43
 
@@ -115,9 +112,6 @@ def _filled(form: re.Match, weights: Any, worlds: int | None, policy: Any) -> An
115
112
  return worlds
116
113
  field = form.group("field")
117
114
  if field is not None:
118
- if field in _RENAMED:
119
- raise ConstructError(f"{{policy.{field}}} is now {{policy.{_RENAMED[field]}}}: a policy declares "
120
- f"{', '.join(POLICY_FIELDS)}")
121
115
  if field not in POLICY_FIELDS:
122
116
  raise ConstructError(f"{{policy.{field}}}: a policy declares {', '.join(POLICY_FIELDS)}")
123
117
  if policy is None:
@@ -3,12 +3,15 @@ The shared wire contract — one definition per shape, imported (never redeclare
3
3
  and container harness. Grouped by contract number.
4
4
  """
5
5
 
6
- from sequence_base.contract.act import (
6
+ from sequence_base.presets.robot_arm import (
7
7
  ActionChunk,
8
+ ActionContract,
8
9
  ActionSpace,
9
10
  ActionStep,
11
+ Camera,
10
12
  ImageFrame,
11
13
  Observation,
14
+ ObservationContract,
12
15
  Proprioception,
13
16
  )
14
17
 
@@ -21,9 +24,6 @@ from sequence_base.contract.observe import ObserveFrame, ObserveRequest, Observe
21
24
  from sequence_base.contract.flags import SeqFlags
22
25
  from sequence_base.contract.policy import (
23
26
  CHUNK_NAMES,
24
- Camera,
25
- ObservationContract,
26
- ActionContract,
27
27
  Concurrency,
28
28
  ImageSpec,
29
29
  ImageStep,
@@ -43,7 +43,6 @@ from sequence_base.contract.policy import (
43
43
  PolicySpec,
44
44
  VolumeMount,
45
45
  VolumeRef,
46
- chunk_names_said,
47
46
  )
48
47
 
49
48
 
@@ -75,7 +74,6 @@ from sequence_base.contract.benchmarks import (
75
74
  ReplaySpec,
76
75
  )
77
76
  from sequence_base.contract.eval import (
78
- LATENCY_GONE,
79
77
  Estimate,
80
78
  EvalDryRunResponse,
81
79
  EvalReport,
@@ -166,7 +164,7 @@ __all__ = [
166
164
  "ImageStepUvPip", "ImageStepApt", "ImageStepEnv", "ImageStepRun", "AddLocal", "ImageStepAddLocal",
167
165
  "TemplateFiles", "ImageStepTemplateFiles", "Project", "ImageStepProject", "FROZEN_PATH", "ImageStep", "ImageSpec",
168
166
  "VolumeMount", "VolumeRef", "Concurrency", "ActionContract", "Camera", "ObservationContract",
169
- "PolicySpec", "PolicyRegistration", "PolicyConstructor", "CHUNK_NAMES", "chunk_names_said",
167
+ "PolicySpec", "PolicyRegistration", "PolicyConstructor", "CHUNK_NAMES",
170
168
  "OBSERVATIONS_GONE", "Tensors",
171
169
 
172
170
  "MAX_CODE_BUNDLE_BYTES", "CodeBundle",
@@ -176,7 +174,7 @@ __all__ = [
176
174
  "Lease", "ConnectRequest", "ConnectResponse", "Standby",
177
175
 
178
176
  "ReplaySpec", "BenchmarkSpec", "BenchmarkRegisterRequest", "BenchmarkStatusResponse",
179
- "LATENCY_GONE", "EvalRequest", "Estimate", "EvalResponse", "EvalDryRunResponse", "RolloutResult",
177
+ "EvalRequest", "Estimate", "EvalResponse", "EvalDryRunResponse", "RolloutResult",
180
178
  "EvalStatus", "TaskAgg", "MetricAgg", "EvalReport",
181
179
 
182
180
  "SecretRef", "SecretCreateRequest", "SecretInfo", "BootstrapResponse",
@@ -67,12 +67,14 @@ class BootstrapResponse(BaseModel):
67
67
 
68
68
 
69
69
 
70
+
71
+
70
72
  model_config = ConfigDict(extra="forbid", hide_input_in_errors=True)
71
73
 
72
- direct_secret: str = Field(..., description="Platform-minted bearer the worker's guard checks")
73
- tls_key: str = Field(..., description="Self-signed TLS private key (down-direction platform secret)")
74
+ direct_secret: str = Field(..., repr=False, description="Platform-minted bearer the worker's guard checks")
75
+ tls_key: str = Field(..., repr=False, description="Self-signed TLS private key (down-direction platform secret)")
74
76
  tls_cert: str = Field(..., description="Self-signed TLS certificate (public)")
75
- env: dict[str, str] = Field(..., description="Policy's user secrets, expanded ENV_KEY → value")
77
+ env: dict[str, str] = Field(..., repr=False, description="Policy's user secrets, expanded ENV_KEY → value")
76
78
 
77
79
  weights_uri: str | None = None
78
80
  lease: Lease
@@ -10,14 +10,12 @@ and the warming ETA are typed and checkable.
10
10
  from __future__ import annotations
11
11
 
12
12
  from datetime import datetime
13
- from typing import Any, Literal
13
+ from typing import Literal
14
14
 
15
- from pydantic import BaseModel, ConfigDict, Field, model_validator
15
+ from pydantic import BaseModel, ConfigDict, Field
16
16
 
17
17
 
18
18
  from sequence_base.contract.errors import WarmingError
19
- from sequence_base.contract.planner import TEAM_GONE
20
- from sequence_base.contract.retired import dropped
21
19
 
22
20
  __all__ = ["Lease", "ConnectRequest", "ConnectResponse", "Standby", "WarmingError"]
23
21
 
@@ -46,15 +44,6 @@ class ConnectRequest(BaseModel):
46
44
 
47
45
 
48
46
  switched: bool = Field(default=False, description="this robot just switched to the standby copy it was handed")
49
- @model_validator(mode="before")
50
- @classmethod
51
- def _retired(cls, data: Any) -> Any:
52
-
53
-
54
-
55
- if isinstance(data, dict) and any(data.get(k) is not None for k in ("team", "group", "team_key")):
56
- raise ValueError(TEAM_GONE)
57
- return dropped(data, "embodiment", "team", "group", "team_key")
58
47
 
59
48
 
60
49
  class Standby(BaseModel):
@@ -71,7 +60,7 @@ class Standby(BaseModel):
71
60
 
72
61
  cert_fingerprint: str | None = Field(..., description="Its certificate's fingerprint the SDK pins; null where "
73
62
  "tls is public")
74
- direct_secret: str = Field(..., description="Bearer for its /act; valid within its lease")
63
+ direct_secret: str = Field(..., repr=False, description="Bearer for its /act; valid within its lease")
75
64
  tls: Literal["pinned", "public"] = Field(default="pinned", description="how its certificate is checked")
76
65
  tls_name: str | None = Field(default=None, description="the name a public certificate is checked for, masked")
77
66
  lease: Lease
@@ -87,7 +76,7 @@ class ConnectResponse(BaseModel):
87
76
 
88
77
  worker_url: str = Field(..., description="Worker static-IP direct URL, e.g. https://<ip>:8080")
89
78
  cert_fingerprint: str = Field(..., description="Self-signed cert fingerprint the SDK pins")
90
- direct_secret: str = Field(..., description="Bearer for the worker /act; valid within the lease")
79
+ direct_secret: str = Field(..., repr=False, description="Bearer for the worker /act; valid within the lease")
91
80
  lease: Lease
92
81
 
93
82
 
@@ -105,12 +94,3 @@ class ConnectResponse(BaseModel):
105
94
 
106
95
  standby_retry_s: float | None = Field(default=None, gt=0, le=3600,
107
96
  description="no standby could be held yet: ask again in this many seconds")
108
-
109
- @model_validator(mode="before")
110
- @classmethod
111
- def _retired(cls, data: Any) -> Any:
112
-
113
-
114
-
115
- return dropped(data, "embodiment", "feedback", "action", "observation", "actions", "observations",
116
- "action_chunk_len", "action_chunk_exec_len")
@@ -21,18 +21,15 @@ from typing import Any, Literal
21
21
  from pydantic import BaseModel, ConfigDict, Field, field_validator, model_validator
22
22
 
23
23
  from sequence_base.contract.accounts import SecretRef
24
- from sequence_base.contract.own_io import Tensors, observations_gone
25
- from sequence_base.contract.planner import PLAN_ON_A_POLICY, PlannerSpec, team_gone
26
- from sequence_base.contract.retired import dropped
24
+ from sequence_base.contract.own_io import Tensors
25
+ from sequence_base.contract.planner import PLAN_ON_A_POLICY, PlannerSpec
27
26
  from sequence_base.contract.policy import (
28
27
  KIND_NAME,
29
- SCALING_RETIRED,
30
28
  Concurrency,
31
29
  Episodes,
32
30
  ImageSpec,
33
31
  VolumeMount,
34
32
  check_chunk_lens,
35
- chunk_names_renamed,
36
33
  )
37
34
 
38
35
  __all__ = [
@@ -85,16 +82,10 @@ class Resources(BaseModel):
85
82
 
86
83
  class Autoscaler(BaseModel):
87
84
  """How the deployment scales. Defaults mirror PolicySpec so an omitted block scales to zero: machines always on,
88
- spare ones beside those in use, and the most GPUs it holds - the rest the platform's (contract 0.5.31;
89
- policy.SCALING_RETIRED, read and dropped)."""
85
+ spare ones beside those in use, and the most GPUs it holds - the rest the platform's (contract 0.5.31)."""
90
86
 
91
87
  model_config = ConfigDict(extra="forbid")
92
88
 
93
- @model_validator(mode="before")
94
- @classmethod
95
- def _retired(cls, data: Any) -> Any:
96
- return dropped(data, *SCALING_RETIRED)
97
-
98
89
  min_containers: int = 0
99
90
 
100
91
 
@@ -120,28 +111,42 @@ class Timeouts(BaseModel):
120
111
  episode_idle: int | None = Field(default=None, ge=10, le=86400)
121
112
 
122
113
 
114
+
115
+ MAX_LIST_ITEMS = 64
116
+
117
+ ParamValue = int | float | bool | str | list[float]
118
+
119
+
123
120
  class InferParam(BaseModel):
124
- """One inference parameter the policy's `@seq.infer` declares — `def infer(self, obs, *, num_steps: int = 10)`
125
- — with its type and default. An /act or an eval may set it; the worker passes only declared names, cast to
126
- this type, and refuses any other.
121
+ """One inference parameter the policy declares - a keyword argument with a default of its `@seq.infer` method, or
122
+ of its `@seq.observe` method: `def infer(self, obs, *, num_steps: int = 10)` - with its type and default. An eval
123
+ may set it, and its deployment's settings (`params.<name>`); the worker passes only declared names, cast to this
124
+ type, and refuses any other.
127
125
 
128
126
  `min` / `max` (a number's bounds, inclusive) and `choices` (the values it may take) — declared as
129
127
  `Annotated[int, seq.Range(1, 10)]` / `seq.OneOf(...)` — refuse any other value before inference, saying which are
130
- allowed; None (left off the wire) holds it to its type alone."""
128
+ allowed; None (left off the wire) holds it to its type alone.
129
+ A "list" parameter (`list[float]`) is a list of at most MAX_LIST_ITEMS numbers - a camera's crop, as
130
+ `crop: list[float] = [0.42, 0.18, 0.82]` - its bounds holding each of them; it takes no choices. {the user 10-30,
131
+ through TEST USER: "yes you are right we shuld support ucsotmized", of a crop changed with no rebuild}"""
131
132
 
132
133
  model_config = ConfigDict(extra="forbid")
133
134
 
134
- type: Literal["int", "float", "bool", "str"]
135
- default: int | float | bool | str | None = None
135
+ type: Literal["int", "float", "bool", "str", "list"]
136
+ default: ParamValue | None = None
136
137
  min: int | float | None = None
137
138
  max: int | float | None = None
138
139
  choices: list[int | float | bool | str] | None = Field(default=None, min_length=1, max_length=64)
139
140
 
140
141
  @model_validator(mode="after")
141
142
  def _bounds_fit(self) -> "InferParam":
142
- numeric = self.type in ("int", "float")
143
+ numeric = self.type in ("int", "float", "list")
143
144
  if (self.min is not None or self.max is not None) and not numeric:
144
145
  raise ValueError(f"min / max bound a number; a {self.type} parameter takes choices instead")
146
+ if self.type == "list" and self.choices is not None:
147
+ raise ValueError("a list parameter takes min / max, which hold each of its numbers, not choices")
148
+ if self.default is not None and isinstance(self.default, list) != (self.type == "list"):
149
+ raise ValueError(f"the default {self.default!r} is no {self.type}")
145
150
  if self.min is not None and self.max is not None and self.min > self.max:
146
151
  raise ValueError(f"min {self.min} is above max {self.max}")
147
152
  if self.default is not None and not allowed(self, self.default):
@@ -150,33 +155,39 @@ class InferParam(BaseModel):
150
155
 
151
156
 
152
157
  def allowed(param: "InferParam", value) -> bool:
153
- """Whether a value (already cast to the parameter's type) is one the parameter allows."""
158
+ """Whether a value (already cast to the parameter's type) is one the parameter allows: a list's every number."""
159
+ if param.type == "list":
160
+ return len(value) <= MAX_LIST_ITEMS and all(_within(param, v) for v in value)
154
161
  if param.choices is not None and value not in param.choices:
155
162
  return False
156
- if param.min is not None and value < param.min:
157
- return False
158
- return not (param.max is not None and value > param.max)
163
+ return _within(param, value)
164
+
165
+
166
+ def _within(param: "InferParam", number) -> bool:
167
+ return not ((param.min is not None and number < param.min) or (param.max is not None and number > param.max))
159
168
 
160
169
 
161
170
  def describe(param: "InferParam") -> str:
162
- """What a parameter allows, in words: "one of 5, 10", "from 1 to 10", "at least 1", "at most 10"."""
171
+ """What a parameter allows, in words: "one of 5, 10", "from 1 to 10", "at least 1", "at most 10", "a list of at
172
+ most 64 numbers, each from 0 to 1"."""
163
173
  if param.choices is not None:
164
174
  return "one of " + ", ".join(repr(c) for c in param.choices)
165
175
  if param.min is not None and param.max is not None:
166
- return f"from {param.min} to {param.max}"
167
- if param.min is not None:
168
- return f"at least {param.min}"
169
- if param.max is not None:
170
- return f"at most {param.max}"
171
- return f"any {param.type}"
176
+ bounds = f"from {param.min} to {param.max}"
177
+ elif param.min is not None:
178
+ bounds = f"at least {param.min}"
179
+ elif param.max is not None:
180
+ bounds = f"at most {param.max}"
181
+ else:
182
+ bounds = None
183
+ if param.type == "list":
184
+ return f"a list of at most {MAX_LIST_ITEMS} numbers" + (f", each {bounds}" if bounds else "")
185
+ return bounds or f"any {param.type}"
172
186
 
173
187
 
174
188
  class DeploymentPolicy(BaseModel):
175
189
  """The policy block of the deployments body. Only `handler_ref` is required. Its inputs and outputs are its own
176
- (north star 5): they pass through the worker untouched. One stored from before contract 0.5.29 reads with its
177
- `embodiments` and `feedback` dropped, and one from before 0.5.31 with the robot-arm preset's `action`,
178
- `observation` and `action_declared` and its `actions` (seq.Actions; its hz and action chunk lengths are fields of
179
- its own now) dropped (contract.retired).
190
+ (north star 5): they pass through the worker untouched.
180
191
 
181
192
  `secrets` carries the policy's declared secret BUNDLES BY NAME ONLY (list[SecretRef]) — the gateway
182
193
  validates each name exists and belongs to the deployer at submit time, and the
@@ -186,17 +197,10 @@ class DeploymentPolicy(BaseModel):
186
197
 
187
198
  model_config = ConfigDict(extra="forbid")
188
199
 
189
- @model_validator(mode="before")
190
- @classmethod
191
- def _retired(cls, data: Any) -> Any:
192
- return dropped(chunk_names_renamed(team_gone(observations_gone(data))), "embodiments", "feedback", "action",
193
- "observation", "action_declared", "actions")
194
-
195
200
  handler_ref: str
196
201
 
197
202
 
198
203
 
199
-
200
204
  hz: float | None = Field(default=None, gt=0, le=1000)
201
205
  action_chunk_valid_len: int | None = Field(default=None, ge=1, le=100_000)
202
206
  action_chunk_replan_at: int | None = Field(default=None, ge=1, le=100_000)
@@ -211,7 +215,6 @@ class DeploymentPolicy(BaseModel):
211
215
 
212
216
  io: str | None = Field(default=None, max_length=4000)
213
217
 
214
-
215
218
  family: str | None = Field(default=None, pattern=KIND_NAME)
216
219
 
217
220
 
@@ -225,12 +228,10 @@ class DeploymentPolicy(BaseModel):
225
228
 
226
229
  plan_every_s: float | None = Field(default=None, gt=0)
227
230
 
228
-
229
231
  tensors: Tensors | None = None
230
232
 
231
233
 
232
234
 
233
-
234
235
  planner: PlannerSpec | None = None
235
236
 
236
237
  @model_validator(mode="after")
@@ -12,13 +12,12 @@ from __future__ import annotations
12
12
  from enum import Enum
13
13
  from typing import Annotated, Literal
14
14
 
15
- from pydantic import BaseModel, ConfigDict, Field, field_validator, model_validator
15
+ from pydantic import BaseModel, ConfigDict, Field, model_validator
16
16
 
17
17
  from sequence_base.constants.limits import MAX_USD
18
- from sequence_base.contract.retired import dropped
18
+ from sequence_base.contract.deployments import ParamValue
19
19
 
20
20
  __all__ = [
21
- "LATENCY_GONE",
22
21
  "EvalRequest",
23
22
  "ArmReport",
24
23
  "EvalTiming",
@@ -42,15 +41,6 @@ __all__ = [
42
41
  _Trials = Annotated[int, Field(ge=1, le=100000)]
43
42
 
44
43
 
45
-
46
-
47
-
48
-
49
- LATENCY_GONE = ("latency_ms is gone: an eval models no network - it sends each act at the policy's "
50
- "action_chunk_replan_at step and swaps its answer in at the action_chunk_valid_len step, the world "
51
- "paused until the answer comes; leave latency_ms out")
52
-
53
-
54
44
  class EvalRequest(BaseModel):
55
45
  """`POST /v1/eval`. A real eval names `model` + `benchmark`; a rerun (`rerun_of` / `rerun_unsuccessful_of`) may
56
46
  leave them out and take the earlier eval's. `dry_run` selects the estimate-only response shape below.
@@ -102,22 +92,13 @@ class EvalRequest(BaseModel):
102
92
 
103
93
 
104
94
 
105
- params: dict[str, int | float | bool | str] | None = Field(default=None, max_length=32)
95
+ params: dict[str, ParamValue] | None = Field(default=None, max_length=32)
106
96
 
107
97
 
108
98
 
109
99
 
110
100
  replay: Literal["3d", "none"] | None = None
111
101
 
112
-
113
-
114
- @model_validator(mode="before")
115
- @classmethod
116
- def _latency_gone(cls, data: object) -> object:
117
- if isinstance(data, dict) and data.get("latency_ms") is not None:
118
- raise ValueError(LATENCY_GONE)
119
- return dropped(data, "latency_ms")
120
-
121
102
  @model_validator(mode="after")
122
103
  def _selection(self) -> "EvalRequest":
123
104
  """The selection's own bounds, as the platform holds them: a count 1-100000, at most 5000 seeds in a list and
@@ -300,7 +281,7 @@ class ArmReport(BaseModel):
300
281
  model: str
301
282
 
302
283
 
303
- params: dict[str, int | float | bool | str] = Field(default_factory=dict)
284
+ params: dict[str, ParamValue] = Field(default_factory=dict)
304
285
  metrics: dict[str, MetricAgg] = Field(default_factory=dict)
305
286
  episodes: int = 0
306
287
  failed: int = 0
@@ -316,7 +297,7 @@ class ParamUsed(BaseModel):
316
297
 
317
298
  model_config = ConfigDict(extra="forbid")
318
299
 
319
- value: int | float | bool | str | None = None
300
+ value: ParamValue | None = None
320
301
  source: Literal["cli", "policy", "adapter", "benchmark", "platform", "deployment"]
321
302
 
322
303
 
@@ -382,10 +363,3 @@ class EvalReport(BaseModel):
382
363
 
383
364
 
384
365
  arm_params: list[ArmParams] | None = None
385
-
386
-
387
-
388
- @model_validator(mode="before")
389
- @classmethod
390
- def _latency_gone(cls, data: object) -> object:
391
- return dropped(data, "latency_ms")
@@ -4,9 +4,8 @@ eval plays of its answers (rows_of). A policy that declares nothing is sent and
4
4
 
5
5
  `observations=seq.Observations(...)` and `seq.Stream(...)`, which said which keys of an observation a policy read at
6
6
  which steps, are gone: a policy is handed every observation as its robot sends it, and one that reads more than the
7
- newest keeps them in an @seq.observe method (on self, or in episode.state). A spec or a deploy that still declares them
8
- is refused (OBSERVATIONS_GONE); one stored with `observations: null` reads as it did.
9
-
7
+ newest keeps them in an @seq.observe method (on self, or in episode.state). A spec or a deploy that still names them
8
+ is refused as any unknown field is.
10
9
 
11
10
  """
12
11
  from __future__ import annotations
@@ -17,9 +16,8 @@ from typing import Any
17
16
 
18
17
  from pydantic import BaseModel, ConfigDict
19
18
 
20
- from sequence_base.contract.retired import dropped
19
+ __all__ = ["OBSERVATIONS_GONE", "Tensors", "rows_of"]
21
20
 
22
- __all__ = ["OBSERVATIONS_GONE", "Tensors", "observations_gone", "rows_of"]
23
21
 
24
22
 
25
23
  OBSERVATIONS_GONE = ("observations= is gone: a policy is handed every observation as its robot sends it - keep the ones "
@@ -27,14 +25,6 @@ OBSERVATIONS_GONE = ("observations= is gone: a policy is handed every observatio
27
25
  "latest sequence-ai")
28
26
 
29
27
 
30
- def observations_gone(data: Any) -> Any:
31
- """A model's before-validator for a body that may name `observations`: refused (OBSERVATIONS_GONE) when it declares
32
- some, read without it when it is null - as a spec stored before it went holds it."""
33
- if isinstance(data, dict) and data.get("observations") is not None:
34
- raise ValueError(OBSERVATIONS_GONE)
35
- return dropped(data, "observations")
36
-
37
-
38
28
  class Tensors(BaseModel):
39
29
  """A policy's inputs reach its code as torch tensors on its device - a batch dimension first when `batch` - and the
40
30
  tensors it answers with go back as arrays; float64 arrays arrive as float32. Converted in the replica, last before
@@ -28,8 +28,6 @@ from typing import Any, Literal
28
28
 
29
29
  from pydantic import BaseModel, ConfigDict, Field, field_validator
30
30
 
31
- from sequence_base.contract.retired import dropped
32
-
33
31
 
34
32
  NAME = re.compile(r"[A-Za-z0-9][A-Za-z0-9._-]{0,63}")
35
33
  MOST_MEMBERS = 64
@@ -50,6 +48,8 @@ STATE_MOST = 256 * 1024
50
48
 
51
49
 
52
50
 
51
+
52
+
53
53
  TEAM_GONE = ("team is gone: a team is a planner now - @seq.planner(members=[...]) names the policies policies= named, "
54
54
  "and planners too; a robot connects to its own policy as ever, and deploy again with the latest sequence-ai")
55
55
 
@@ -68,14 +68,6 @@ def check_name(value: str, what: str) -> str:
68
68
  return value
69
69
 
70
70
 
71
- def team_gone(data: Any) -> Any:
72
- """A model's before-validator for a body that may name `team`: refused (TEAM_GONE) when it says one, read without it
73
- when it is null - as every spec stored while teams were holds it."""
74
- if isinstance(data, dict) and data.get("team") is not None:
75
- raise ValueError(TEAM_GONE)
76
- return dropped(data, "team")
77
-
78
-
79
71
  class PlannerSpec(BaseModel):
80
72
  """What `@seq.planner(members=[...])` says on the planner's spec (PolicySpec.planner): the policies and planners it
81
73
  plans for, by name, each once - deployed ones of its account, of its tier, in no other planner, making no loop, at