sequence-base 0.7.2__tar.gz → 0.8.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 (138) hide show
  1. {sequence_base-0.7.2 → sequence_base-0.8.0}/PKG-INFO +1 -2
  2. {sequence_base-0.7.2 → sequence_base-0.8.0}/pyproject.toml +2 -2
  3. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/__init__.py +1 -3
  4. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/by_name.py +8 -28
  5. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/codec/blocks.py +2 -7
  6. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/codec/compressed.py +1 -2
  7. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/constants/version.py +3 -1
  8. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/construct.py +0 -6
  9. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/contract/__init__.py +13 -14
  10. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/contract/accounts.py +6 -4
  11. sequence_base-0.8.0/sequence_base/contract/connect.py +32 -0
  12. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/contract/deployments.py +45 -58
  13. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/contract/eval.py +5 -31
  14. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/contract/observe.py +10 -24
  15. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/contract/own_io.py +3 -19
  16. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/contract/planner.py +3 -12
  17. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/contract/policy.py +10 -86
  18. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/contract/settings.py +2 -2
  19. sequence_base-0.8.0/sequence_base/contract/wire.py +60 -0
  20. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/msgpack_io.py +2 -8
  21. sequence_base-0.8.0/sequence_base/presets/prompts.py +11 -0
  22. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/presets/robot_arm.py +1 -23
  23. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schema_export.py +11 -14
  24. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/ActRequest.json +19 -7
  25. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/ActResponse.json +1 -23
  26. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/ActionChunk.json +1 -1
  27. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/ActionContract.json +1 -1
  28. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/ActionStep.json +1 -1
  29. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/AdapterPair.json +1 -1
  30. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/AddLocal.json +1 -1
  31. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/Autoscaler.json +2 -2
  32. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/BenchmarkRegisterRequest.json +10 -3
  33. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/BenchmarkSpec.json +2 -2
  34. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/BenchmarkStatusResponse.json +1 -1
  35. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/BootstrapResponse.json +1 -1
  36. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/Camera.json +1 -1
  37. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/CodeBundle.json +1 -1
  38. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/Concurrency.json +2 -2
  39. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/DeploymentAccepted.json +1 -1
  40. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/DeploymentPolicy.json +11 -9
  41. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/DeploymentRequest.json +13 -11
  42. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/DeploymentStatusResponse.json +1 -1
  43. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/ErrorBody.json +1 -1
  44. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/ErrorCodes.json +1 -1
  45. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/Estimate.json +1 -1
  46. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/EvalDryRunResponse.json +1 -1
  47. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/EvalReport.json +13 -1
  48. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/EvalRequest.json +7 -1
  49. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/EvalResponse.json +1 -1
  50. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/ImageFrame.json +1 -1
  51. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/ImageSpec.json +1 -1
  52. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/ImageStepAddLocal.json +1 -1
  53. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/ImageStepApt.json +1 -1
  54. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/ImageStepEnv.json +1 -1
  55. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/ImageStepProject.json +1 -1
  56. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/ImageStepRun.json +1 -1
  57. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/ImageStepTemplateFiles.json +1 -1
  58. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/ImageStepUvPip.json +1 -1
  59. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/InferParam.json +10 -3
  60. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/Lease.json +1 -1
  61. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/MetricAgg.json +1 -1
  62. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/Observation.json +1 -1
  63. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/ObservationContract.json +1 -1
  64. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/ObserveRequest.json +15 -1
  65. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/ObserveResponse.json +1 -1
  66. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/PlanAppend.json +1 -1
  67. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/PlanAppended.json +1 -1
  68. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/PlannerMember.json +1 -1
  69. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/PlannerObservation.json +1 -1
  70. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/PlannerObserve.json +1 -1
  71. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/PlannerObserved.json +1 -1
  72. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/PlannerPlanIn.json +1 -1
  73. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/PlannerPlans.json +1 -1
  74. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/PlannerPlansWritten.json +1 -1
  75. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/PlannerRobot.json +1 -1
  76. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/PlannerRound.json +1 -1
  77. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/PlannerRoundRequest.json +1 -1
  78. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/PlannerSpec.json +1 -1
  79. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/PolicyRegistration.json +4 -9
  80. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/PolicySpec.json +3 -8
  81. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/Project.json +1 -1
  82. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/Proprioception.json +1 -1
  83. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/ReplaySpec.json +1 -1
  84. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/Resources.json +1 -1
  85. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/RolloutResult.json +1 -1
  86. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/SecretCreateRequest.json +1 -1
  87. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/SecretInfo.json +1 -1
  88. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/SecretRef.json +1 -1
  89. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/SeqFlags.json +1 -1
  90. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/SettingsChange.json +7 -1
  91. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/SettingsChanged.json +13 -1
  92. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/SettingsView.json +19 -1
  93. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/TaskAgg.json +1 -1
  94. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/TemplateFiles.json +1 -1
  95. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/Tensors.json +1 -1
  96. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/Timeouts.json +1 -1
  97. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/UploadTarget.json +1 -1
  98. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/VolumeFile.json +1 -1
  99. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/VolumeInfo.json +1 -1
  100. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/VolumeMount.json +1 -1
  101. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/VolumeRef.json +1 -1
  102. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/VolumeUploadRequest.json +1 -1
  103. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/VolumeUploadResponse.json +1 -1
  104. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/schemas/WarmingError.json +1 -1
  105. sequence_base-0.7.2/sequence_base/contract/act.py +0 -17
  106. sequence_base-0.7.2/sequence_base/contract/connect.py +0 -116
  107. sequence_base-0.7.2/sequence_base/contract/io.py +0 -20
  108. sequence_base-0.7.2/sequence_base/contract/retired.py +0 -22
  109. sequence_base-0.7.2/sequence_base/contract/wire.py +0 -72
  110. sequence_base-0.7.2/sequence_base/presets/frames.py +0 -180
  111. sequence_base-0.7.2/sequence_base/schemas/ConnectRequest.json +0 -28
  112. sequence_base-0.7.2/sequence_base/schemas/ConnectResponse.json +0 -204
  113. sequence_base-0.7.2/sequence_base/schemas/Standby.json +0 -92
  114. {sequence_base-0.7.2 → sequence_base-0.8.0}/.gitignore +0 -0
  115. {sequence_base-0.7.2 → sequence_base-0.8.0}/README.md +0 -0
  116. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/auth.py +0 -0
  117. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/codec/__init__.py +0 -0
  118. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/codec/image.py +0 -0
  119. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/codec/marked.py +0 -0
  120. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/constants/__init__.py +0 -0
  121. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/constants/cards.py +0 -0
  122. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/constants/headers.py +0 -0
  123. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/constants/limits.py +0 -0
  124. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/contract/adapters.py +0 -0
  125. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/contract/benchmarks.py +0 -0
  126. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/contract/errors.py +0 -0
  127. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/contract/flags.py +0 -0
  128. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/contract/templates.py +0 -0
  129. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/contract/volumes.py +0 -0
  130. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/episode.py +0 -0
  131. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/errors/__init__.py +0 -0
  132. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/errors/transport.py +0 -0
  133. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/obs/__init__.py +0 -0
  134. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/obs/log.py +0 -0
  135. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/obs/rid.py +0 -0
  136. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/presets/__init__.py +0 -0
  137. {sequence_base-0.7.2 → sequence_base-0.8.0}/sequence_base/telemetry/__init__.py +0 -0
  138. {sequence_base-0.7.2 → sequence_base-0.8.0}/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.0
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
@@ -13,7 +13,6 @@ Requires-Dist: av>=17; extra == 'observe'
13
13
  Requires-Dist: numpy>=1.26; extra == 'observe'
14
14
  Requires-Dist: zstandard>=0.22; extra == 'observe'
15
15
  Provides-Extra: test
16
- Requires-Dist: hypothesis>=6; extra == 'test'
17
16
  Requires-Dist: jsonschema>=4; extra == 'test'
18
17
  Requires-Dist: pytest; extra == 'test'
19
18
  Requires-Dist: pyyaml; extra == 'test'
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "sequence-base"
3
- version = "0.7.2"
3
+ version = "0.8.0"
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"]
@@ -11,7 +11,7 @@ Changelog = "https://generalsequences.com/docs/changelog/"
11
11
  [project.optional-dependencies]
12
12
  codec = ["pillow>=10", "numpy>=1.26"]
13
13
  observe = ["numpy>=1.26", "av>=17", "zstandard>=0.22"]
14
- test = ["pytest", "jsonschema>=4", "hypothesis>=6", "pyyaml"]
14
+ test = ["pytest", "jsonschema>=4", "pyyaml"]
15
15
 
16
16
  [build-system]
17
17
  requires = ["hatchling"]
@@ -55,8 +55,6 @@ from sequence_base.contract import (
55
55
  BootstrapResponse,
56
56
  CodeBundle,
57
57
  Concurrency,
58
- ConnectRequest,
59
- ConnectResponse,
60
58
  DeploymentAccepted,
61
59
  DeploymentPolicy,
62
60
  InferParam,
@@ -149,7 +147,7 @@ __all__ = [
149
147
  "Resources", "Autoscaler", "Timeouts", "DeploymentPolicy", "InferParam", "DeploymentRequest",
150
148
  "DeploymentAccepted", "DeploymentState", "DeploymentStatusResponse",
151
149
 
152
- "Lease", "ConnectRequest", "ConnectResponse",
150
+ "Lease",
153
151
 
154
152
  "ReplaySpec", "BenchmarkSpec", "BenchmarkRegisterRequest", "BenchmarkStatusResponse",
155
153
  "EvalRequest", "Estimate", "EvalResponse", "EvalDryRunResponse", "RolloutResult",
@@ -16,10 +16,9 @@ declared (seq/named.py, registry.infer_params), the worker when it calls the met
16
16
  rule on both sides.
17
17
 
18
18
  What the platform hands a method itself is `episode` - an act function, an observe function and the method an
19
- episode's end calls alike - and an eval's `seed`; `retired(parameters, what)` refuses a method that still takes what it
20
- handed once (episode_id, embodiment, feedback, and a composite's plan and robot), and `ends(parameters, what)` an end
21
- method that takes anything but the episode, each in words that say what to write instead - the SDK when a class is
22
- declared, the worker when it loads one declared before.
19
+ episode's end calls alike - and an eval's `seed`; `ends(parameters, what)` refuses an end method that needs anything but
20
+ the episode, in words that say what to write instead, when the SDK declares a class.
21
+
23
22
 
24
23
 
25
24
  A composite's planner, @seq.plan, is called on a clock with the episode alone and what it returns is kept in the
@@ -34,8 +33,8 @@ from collections.abc import Iterable, Mapping
34
33
  from dataclasses import dataclass
35
34
  from typing import Any
36
35
 
37
- __all__ = ["INFER_PLATFORM", "OBSERVE_PLATFORM", "RETIRED", "WAKE_ON", "ByName", "ends", "plan_refused", "retired",
38
- "takes_by_name", "wake_on_refused"]
36
+ __all__ = ["INFER_PLATFORM", "OBSERVE_PLATFORM", "WAKE_ON", "ByName", "ends", "plan_refused", "takes_by_name",
37
+ "wake_on_refused"]
39
38
 
40
39
 
41
40
 
@@ -43,15 +42,6 @@ INFER_PLATFORM = frozenset({"seed", "episode"})
43
42
  OBSERVE_PLATFORM = frozenset({"step", "episode"})
44
43
 
45
44
 
46
- RETIRED = {"episode_id": "take episode, a seq.Episode, and read episode.id",
47
- "embodiment": "send what the robot is with its observations, in observe(x)",
48
- "feedback": "send what the robot was playing with its observations, in observe(x)",
49
-
50
- "plan": ('take episode and read the newest plan as episode.state["seq.plans"][-1]["value"], what '
51
- '@seq.plan returned (before the first, episode.state.get("seq.plans") is None)'),
52
- "robot": ("take episode: episode.state is the robot's own dict, which @seq.plan is handed too, and "
53
- "episode.id names it")}
54
-
55
45
  WAKE_ON = ('@seq.plan(wake_on=...) is a list of the observation\'s keys whose arrival plans at once, each a string - '
56
46
  'wake_on=["say"]: an observation that holds "say" plans its episode then, its clock going on beside')
57
47
 
@@ -114,22 +104,12 @@ def takes_by_name(parameters: Iterable[inspect.Parameter], platform: frozenset[s
114
104
  rest=any(p.kind is inspect.Parameter.VAR_KEYWORD for p in every), platform=frozenset(platform))
115
105
 
116
106
 
117
- def retired(parameters: Iterable[inspect.Parameter], what: str) -> str | None:
118
- """Why `what` ("Model.infer"), a method the platform calls, cannot be deployed: it takes what the platform no longer
119
- hands it (RETIRED), said with what to write instead - or None, when it takes none of it."""
120
- names = [p.name for p in parameters if p.name in RETIRED]
121
- if not names:
122
- return None
123
- return (f"{what} takes {' and '.join(names)}, which the platform no longer hands it: "
124
- + "; ".join(RETIRED[n] for n in names))
125
-
126
-
127
107
  def ends(parameters: Iterable[inspect.Parameter], what: str) -> str | None:
128
108
  """Why `what` ("Model.end"), the method an episode's end calls (@seq.on_episode), cannot be deployed: an episode's
129
- end hands it the episode alone, so it takes `episode` or nothing - any other argument with a default, never one
130
- the platform no longer hands (RETIRED) - or None, when it does."""
109
+ end hands it the episode alone, so it takes `episode` or nothing, or any other argument with a default - or None,
110
+ when it does."""
131
111
  taken = [p.name for p in parameters if p.kind not in _VARIADIC
132
- and (p.name in RETIRED or (p.name != "episode" and p.default is inspect.Parameter.empty))]
112
+ and p.name != "episode" and p.default is inspect.Parameter.empty]
133
113
  if not taken:
134
114
  return None
135
115
  name = what.rsplit(".", 1)[-1]
@@ -4,8 +4,7 @@ of one whose content its worker already holds, and what the worker turns back -
4
4
  large input sent again with every observation, goes up once.
5
5
 
6
6
 
7
- In one sentence: the SDK, packing an observation for a worker that names FORMAT, cuts each unmarked numpy array, bytes
8
- or str of MIN_BLOCK_BYTES or more into blocks - an array stacked along its first axis, 2 to SPLIT_MAX slices each of
7
+ In one sentence: the SDK, packing an observation for its worker, cuts each unmarked numpy array, bytes or str of MIN_BLOCK_BYTES or more into blocks - an array stacked along its first axis, 2 to SPLIT_MAX slices each of
9
8
  MIN_BLOCK_BYTES or more, a block a slice - each named by the first ID_BYTES of its sha256 (block_id) → puts a reference
10
9
  in its place (encode) → its post carries the content of each block its worker does not hold (ObserveRequest.blocks), as
11
10
  both sides count what the worker holds (Retention) → the worker keeps each episode's blocks and, as each observation's
@@ -36,14 +35,10 @@ from typing import Any, Iterable, Mapping
36
35
 
37
36
  from sequence_base.codec.compressed import is_compressed
38
37
  from sequence_base.codec.marked import MARK, is_marked
39
- from sequence_base.contract.observe import BLOCKS_FORMAT
40
38
 
41
- __all__ = ["FORMAT", "ID_BYTES", "KEEP_OBSERVATIONS", "KINDS", "MIN_BLOCK_BYTES", "SPLIT_MAX", "VERSION", "BlocksError",
39
+ __all__ = ["ID_BYTES", "KEEP_OBSERVATIONS", "KINDS", "MIN_BLOCK_BYTES", "SPLIT_MAX", "VERSION", "BlocksError",
42
40
  "MissingBlock", "Retention", "block_id", "cut", "decode", "encode", "ids_of", "is_reference"]
43
41
 
44
-
45
-
46
- FORMAT = BLOCKS_FORMAT
47
42
  KINDS = ("array", "bytes", "str")
48
43
  VERSION = 1
49
44
  ID_BYTES = 16
@@ -6,8 +6,7 @@ after the worker is handed the bytes the robot built.
6
6
 
7
7
 
8
8
  In one sentence: the robot's SDK compresses an unmarked numpy array or bytes of 16 KiB or more with zstd level 1 (zlib
9
- level 1 where it has no zstd) and puts the map below in its place → the worker names contract.observe.ZSTD_FORMAT, so
10
- only it is sent such maps → as a post comes, before anything keeps it, expand() turns every map back into the array or
9
+ level 1 where it has no zstd) and puts the map below in its place → as a post comes, before anything keeps it, expand() turns every map back into the array or
11
10
  bytes it was (np.frombuffer: read-only, as msgpack_io reads an array) and says how many bytes that added.
12
11
 
13
12
  The map, version 1 (inside the observe body's msgpack; `data` is bin):
@@ -4,7 +4,9 @@
4
4
 
5
5
 
6
6
 
7
- CONTRACT_VERSION = "0.5.36"
7
+ CONTRACT_VERSION = "0.5.38"
8
+
9
+
8
10
 
9
11
 
10
12
 
@@ -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,11 +43,10 @@ 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
 
50
- from sequence_base.contract.own_io import OBSERVATIONS_GONE, Tensors
49
+ from sequence_base.contract.own_io import Tensors
51
50
 
52
51
 
53
52
  from sequence_base.contract.deployments import (
@@ -65,7 +64,7 @@ from sequence_base.contract.deployments import (
65
64
  )
66
65
 
67
66
 
68
- from sequence_base.contract.connect import ConnectRequest, ConnectResponse, Lease, Standby
67
+ from sequence_base.contract.connect import Lease
69
68
 
70
69
 
71
70
  from sequence_base.contract.benchmarks import (
@@ -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,
@@ -137,7 +135,7 @@ from sequence_base.contract.planner import (
137
135
  PLANNER_ID,
138
136
  POLICY_ID,
139
137
  ROBOT_ID,
140
- TEAM_GONE,
138
+ WAITING_FOR_PLAN,
141
139
  PlanAppend,
142
140
  PlanAppended,
143
141
  PlannerMember,
@@ -166,17 +164,17 @@ __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",
170
- "OBSERVATIONS_GONE", "Tensors",
167
+ "PolicySpec", "PolicyRegistration", "PolicyConstructor", "CHUNK_NAMES",
168
+ "Tensors",
171
169
 
172
170
  "MAX_CODE_BUNDLE_BYTES", "CodeBundle",
173
171
  "Resources", "Autoscaler", "Timeouts", "DeploymentPolicy", "InferParam", "DeploymentRequest",
174
172
  "DeploymentAccepted", "DeploymentState", "DeploymentStatusResponse",
175
173
 
176
- "Lease", "ConnectRequest", "ConnectResponse", "Standby",
174
+ "Lease",
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",
@@ -187,7 +185,8 @@ __all__ = [
187
185
  "SETTINGS", "Setting", "SettingsChange", "Applied", "SettingState", "SettingsView", "SettingChanged",
188
186
  "SettingsChanged",
189
187
 
190
- "KEPT", "MOST_LAYERS", "PLANS_MOST", "STATE_MOST", "PLAN_ON_A_POLICY", "PLANNER_ID", "POLICY_ID", "ROBOT_ID", "TEAM_GONE", "PlannerSpec",
188
+ "KEPT", "MOST_LAYERS", "PLANS_MOST", "STATE_MOST", "PLAN_ON_A_POLICY", "PLANNER_ID", "POLICY_ID", "ROBOT_ID", "WAITING_FOR_PLAN",
189
+ "PlannerSpec",
191
190
  "PlannerRoundRequest", "PlannerRobot", "PlannerMember", "PlannerObservation", "PlannerPlanIn", "PlannerRound",
192
191
  "PlannerPlans", "PlannerPlansWritten", "PlanAppend", "PlanAppended", "PlannerObserve", "PlannerObserved",
193
192
 
@@ -3,7 +3,7 @@ Contract 6 — accounts / secret / billing wire types.
3
3
 
4
4
  Secret-leak rule, mechanically checkable (goal 15). Two kinds of secret:
5
5
  (a) platform-minted — `direct_secret`, TLS private key. May appear in the DOWN direction only:
6
- ConnectResponse.direct_secret, BootstrapResponse.direct_secret + tls_key.
6
+ a connect's answer, BootstrapResponse.direct_secret + tls_key.
7
7
  (b) user Secret-Manager values. May appear in the WRITE direction only:
8
8
  SecretCreateRequest.env, BootstrapResponse.env (injected into the worker subprocess).
9
9
  These four fields are the entire allow-list for carrying a plaintext secret value. Everything returned
@@ -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
@@ -0,0 +1,32 @@
1
+ """
2
+ Contract 3 — a worker's lease, and the cold-start answer of a connect (control plane).
3
+
4
+ A connect's own body and answer are not here: the gateway reads the one by its model (routes/connect.py ConnectRequest)
5
+ and sequence-ai sends and reads a dict, and the classes kept here matched neither - no `session`, which it requires - and
6
+ were read by nothing. A lease is read by the worker's bootstrap (contract/accounts.py). The cold-start fallback is a
7
+ defined wire body, not an HTTP header alone — a 503 returns `WarmingError` (contract/errors.py), so `503 + Retry-After`
8
+ and the warming ETA are typed and checkable.
9
+ """
10
+ from __future__ import annotations
11
+
12
+ from datetime import datetime
13
+ from typing import Literal
14
+
15
+ from pydantic import BaseModel, ConfigDict, Field
16
+
17
+
18
+ from sequence_base.contract.errors import WarmingError
19
+
20
+ __all__ = ["Lease", "WarmingError"]
21
+
22
+
23
+ class Lease(BaseModel):
24
+ """A time-boxed grant of the direct coordinates. Renewed before `expires_at`; `epoch` is the
25
+ worker/secret generation — a client holding a stale epoch against a new worker gets 401 and must
26
+ re-connect."""
27
+
28
+ model_config = ConfigDict(extra="forbid")
29
+
30
+ ttl_s: int
31
+ expires_at: datetime
32
+ epoch: int = Field(..., description="Worker/secret generation counter; rolls on worker change")
@@ -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,32 +197,21 @@ 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)
203
207
 
204
208
 
205
209
  episodes: Episodes | None = None
206
-
207
-
208
- streaming: bool = Field(default=False, exclude=True)
209
210
  secrets: list[SecretRef] = Field(default_factory=list)
210
211
 
211
212
 
212
213
  io: str | None = Field(default=None, max_length=4000)
213
214
 
214
-
215
215
  family: str | None = Field(default=None, pattern=KIND_NAME)
216
216
 
217
217
 
@@ -225,12 +225,10 @@ class DeploymentPolicy(BaseModel):
225
225
 
226
226
  plan_every_s: float | None = Field(default=None, gt=0)
227
227
 
228
-
229
228
  tensors: Tensors | None = None
230
229
 
231
230
 
232
231
 
233
-
234
232
  planner: PlannerSpec | None = None
235
233
 
236
234
  @model_validator(mode="after")
@@ -246,17 +244,6 @@ class DeploymentPolicy(BaseModel):
246
244
  raise ValueError(PLAN_ON_A_POLICY)
247
245
  return self
248
246
 
249
- @model_validator(mode="after")
250
- def _episodes_of_streaming(self) -> "DeploymentPolicy":
251
-
252
- if self.streaming and self.episodes not in (None, "own"):
253
- raise ValueError(f"streaming is what a record from before contract 0.5.24 says; beside "
254
- f"episodes={self.episodes!r}, leave it out")
255
- if self.streaming:
256
- self.episodes = "own"
257
- self.streaming = self.episodes == "own"
258
- return self
259
-
260
247
  @model_validator(mode="after")
261
248
  def _plays_what_it_holds(self) -> "DeploymentPolicy":
262
249
  check_chunk_lens(self.action_chunk_valid_len, self.action_chunk_replan_at)
@@ -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")