sequence-base 0.8.0rc2__tar.gz → 0.8.1__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 (137) hide show
  1. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/PKG-INFO +1 -2
  2. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/pyproject.toml +2 -2
  3. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/__init__.py +1 -3
  4. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/by_name.py +8 -28
  5. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/codec/blocks.py +2 -7
  6. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/codec/compressed.py +1 -2
  7. sequence_base-0.8.1/sequence_base/constants/serving.py +52 -0
  8. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/constants/version.py +2 -1
  9. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/contract/__init__.py +8 -8
  10. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/contract/accounts.py +1 -1
  11. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/contract/adapters.py +1 -1
  12. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/contract/benchmarks.py +1 -2
  13. sequence_base-0.8.1/sequence_base/contract/connect.py +32 -0
  14. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/contract/deployments.py +6 -16
  15. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/contract/observe.py +6 -24
  16. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/contract/own_io.py +1 -7
  17. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/contract/planner.py +1 -2
  18. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/contract/policy.py +7 -47
  19. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/contract/settings.py +8 -5
  20. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/contract/templates.py +1 -1
  21. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/contract/volumes.py +3 -4
  22. sequence_base-0.8.1/sequence_base/contract/wire.py +60 -0
  23. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/msgpack_io.py +2 -8
  24. sequence_base-0.8.1/sequence_base/presets/prompts.py +11 -0
  25. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schema_export.py +1 -4
  26. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/ActRequest.json +19 -7
  27. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/ActResponse.json +1 -9
  28. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/ActionChunk.json +1 -1
  29. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/ActionContract.json +1 -1
  30. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/ActionStep.json +1 -1
  31. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/AdapterPair.json +1 -1
  32. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/AddLocal.json +1 -1
  33. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/Autoscaler.json +1 -1
  34. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/BenchmarkRegisterRequest.json +2 -2
  35. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/BenchmarkSpec.json +3 -3
  36. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/BenchmarkStatusResponse.json +1 -1
  37. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/BootstrapResponse.json +1 -1
  38. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/Camera.json +1 -1
  39. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/CodeBundle.json +1 -1
  40. sequence_base-0.8.1/sequence_base/schemas/Concurrency.json +57 -0
  41. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/DeploymentAccepted.json +1 -1
  42. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/DeploymentPolicy.json +1 -6
  43. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/DeploymentRequest.json +3 -64
  44. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/DeploymentStatusResponse.json +1 -18
  45. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/ErrorBody.json +1 -1
  46. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/ErrorCodes.json +1 -1
  47. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/Estimate.json +1 -1
  48. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/EvalDryRunResponse.json +1 -1
  49. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/EvalReport.json +1 -1
  50. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/EvalRequest.json +1 -1
  51. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/EvalResponse.json +1 -1
  52. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/ImageFrame.json +1 -1
  53. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/ImageSpec.json +2 -2
  54. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/ImageStepAddLocal.json +1 -1
  55. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/ImageStepApt.json +1 -1
  56. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/ImageStepEnv.json +1 -1
  57. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/ImageStepProject.json +1 -1
  58. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/ImageStepRun.json +1 -1
  59. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/ImageStepTemplateFiles.json +2 -2
  60. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/ImageStepUvPip.json +1 -1
  61. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/InferParam.json +1 -1
  62. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/Lease.json +1 -1
  63. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/MetricAgg.json +1 -1
  64. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/Observation.json +1 -1
  65. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/ObservationContract.json +1 -1
  66. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/ObserveRequest.json +1 -1
  67. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/ObserveResponse.json +1 -1
  68. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/PlanAppend.json +1 -1
  69. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/PlanAppended.json +1 -1
  70. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/PlannerMember.json +1 -1
  71. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/PlannerObservation.json +1 -1
  72. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/PlannerObserve.json +1 -1
  73. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/PlannerObserved.json +1 -1
  74. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/PlannerPlanIn.json +1 -1
  75. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/PlannerPlans.json +1 -1
  76. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/PlannerPlansWritten.json +1 -1
  77. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/PlannerRobot.json +1 -1
  78. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/PlannerRound.json +1 -1
  79. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/PlannerRoundRequest.json +1 -1
  80. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/PlannerSpec.json +1 -1
  81. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/PolicyRegistration.json +4 -65
  82. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/PolicySpec.json +3 -64
  83. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/Project.json +1 -1
  84. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/Proprioception.json +1 -1
  85. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/ReplaySpec.json +1 -1
  86. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/Resources.json +1 -1
  87. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/RolloutResult.json +1 -1
  88. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/SecretCreateRequest.json +1 -1
  89. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/SecretInfo.json +1 -1
  90. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/SecretRef.json +1 -1
  91. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/SeqFlags.json +1 -1
  92. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/SettingsChange.json +1 -1
  93. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/SettingsChanged.json +1 -1
  94. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/SettingsView.json +1 -1
  95. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/TaskAgg.json +1 -1
  96. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/TemplateFiles.json +2 -2
  97. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/Tensors.json +1 -1
  98. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/Timeouts.json +1 -1
  99. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/UploadTarget.json +1 -1
  100. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/VolumeFile.json +1 -1
  101. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/VolumeInfo.json +1 -1
  102. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/VolumeMount.json +1 -1
  103. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/VolumeRef.json +1 -1
  104. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/VolumeUploadRequest.json +1 -1
  105. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/VolumeUploadResponse.json +1 -1
  106. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/schemas/WarmingError.json +1 -1
  107. sequence_base-0.8.0rc2/sequence_base/contract/connect.py +0 -96
  108. sequence_base-0.8.0rc2/sequence_base/contract/wire.py +0 -47
  109. sequence_base-0.8.0rc2/sequence_base/presets/frames.py +0 -180
  110. sequence_base-0.8.0rc2/sequence_base/schemas/Concurrency.json +0 -113
  111. sequence_base-0.8.0rc2/sequence_base/schemas/ConnectRequest.json +0 -28
  112. sequence_base-0.8.0rc2/sequence_base/schemas/ConnectResponse.json +0 -204
  113. sequence_base-0.8.0rc2/sequence_base/schemas/Standby.json +0 -92
  114. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/.gitignore +0 -0
  115. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/README.md +0 -0
  116. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/auth.py +0 -0
  117. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/codec/__init__.py +0 -0
  118. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/codec/image.py +0 -0
  119. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/codec/marked.py +0 -0
  120. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/constants/__init__.py +0 -0
  121. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/constants/cards.py +0 -0
  122. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/constants/headers.py +0 -0
  123. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/constants/limits.py +0 -0
  124. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/construct.py +0 -0
  125. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/contract/errors.py +0 -0
  126. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/contract/eval.py +0 -0
  127. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/contract/flags.py +0 -0
  128. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/episode.py +0 -0
  129. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/errors/__init__.py +0 -0
  130. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/errors/transport.py +0 -0
  131. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/obs/__init__.py +0 -0
  132. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/obs/log.py +0 -0
  133. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/obs/rid.py +0 -0
  134. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/presets/__init__.py +0 -0
  135. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/presets/robot_arm.py +0 -0
  136. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/sequence_base/telemetry/__init__.py +0 -0
  137. {sequence_base-0.8.0rc2 → sequence_base-0.8.1}/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.8.0rc2
3
+ Version: 0.8.1
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.8.0rc2"
3
+ version = "0.8.1"
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):
@@ -0,0 +1,52 @@
1
+ """The platform's serving numbers, defined once here: how long an idle worker stays, how long a start, a line and an act
2
+ may take, how a robot's heartbeat and a console's teleop are held, how many robots a copy of a model seats, how many
3
+ cards one machine has and why a worker stopped serving - the gateway, the worker and the SDK each kept a copy of these.
4
+
5
+ """
6
+
7
+
8
+
9
+ IDLE_S = 600
10
+
11
+ QUEUE_TIMEOUT_S = 120
12
+
13
+
14
+ START_WAIT_S = 600
15
+
16
+
17
+
18
+
19
+ STARTUP_TIMEOUT_S = 1800
20
+ REQUEST_TIMEOUT_S = 300
21
+ EPISODE_IDLE_S = 300
22
+
23
+
24
+
25
+ HEARTBEAT_WINDOW_S = 2.0
26
+
27
+
28
+ TELEOP_BEAT_S = 0.5
29
+ TELEOP_LOST_S = 3.0
30
+
31
+
32
+
33
+
34
+
35
+ MARGIN_MS = 50.0
36
+ LOAD_MAX = 0.9
37
+ ROUND_TRIP_MS = 100.0
38
+ MAX_ROBOTS_PER_COPY = 64
39
+
40
+
41
+ MACHINE_CARDS = 8
42
+
43
+ MAX_WARM_WORKERS = 16
44
+
45
+
46
+
47
+ MAX_SOURCE_TREE_BYTES = 64 * 1024 * 1024
48
+
49
+
50
+
51
+
52
+ DEATH_CAUSES = ("gpu_out_of_memory", "host_out_of_memory", "crashed", "hung", "group_member_lost", "load_failed")
@@ -4,7 +4,8 @@
4
4
 
5
5
 
6
6
 
7
- CONTRACT_VERSION = "0.5.38"
7
+ CONTRACT_VERSION = "0.5.39"
8
+
8
9
 
9
10
 
10
11
 
@@ -46,7 +46,7 @@ from sequence_base.contract.policy import (
46
46
  )
47
47
 
48
48
 
49
- from sequence_base.contract.own_io import OBSERVATIONS_GONE, Tensors
49
+ from sequence_base.contract.own_io import Tensors
50
50
 
51
51
 
52
52
  from sequence_base.contract.deployments import (
@@ -64,7 +64,7 @@ from sequence_base.contract.deployments import (
64
64
  )
65
65
 
66
66
 
67
- from sequence_base.contract.connect import ConnectRequest, ConnectResponse, Lease, Standby
67
+ from sequence_base.contract.connect import Lease
68
68
 
69
69
 
70
70
  from sequence_base.contract.benchmarks import (
@@ -102,7 +102,6 @@ from sequence_base.contract.adapters import AdapterPair, parse_pairs
102
102
 
103
103
  from sequence_base.contract.volumes import (
104
104
  MAX_FILES,
105
- MAX_UPLOAD_BYTES,
106
105
  UploadTarget,
107
106
  VolumeFile,
108
107
  VolumeInfo,
@@ -135,7 +134,7 @@ from sequence_base.contract.planner import (
135
134
  PLANNER_ID,
136
135
  POLICY_ID,
137
136
  ROBOT_ID,
138
- TEAM_GONE,
137
+ WAITING_FOR_PLAN,
139
138
  PlanAppend,
140
139
  PlanAppended,
141
140
  PlannerMember,
@@ -165,13 +164,13 @@ __all__ = [
165
164
  "TemplateFiles", "ImageStepTemplateFiles", "Project", "ImageStepProject", "FROZEN_PATH", "ImageStep", "ImageSpec",
166
165
  "VolumeMount", "VolumeRef", "Concurrency", "ActionContract", "Camera", "ObservationContract",
167
166
  "PolicySpec", "PolicyRegistration", "PolicyConstructor", "CHUNK_NAMES",
168
- "OBSERVATIONS_GONE", "Tensors",
167
+ "Tensors",
169
168
 
170
169
  "MAX_CODE_BUNDLE_BYTES", "CodeBundle",
171
170
  "Resources", "Autoscaler", "Timeouts", "DeploymentPolicy", "InferParam", "DeploymentRequest",
172
171
  "DeploymentAccepted", "DeploymentState", "DeploymentStatusResponse",
173
172
 
174
- "Lease", "ConnectRequest", "ConnectResponse", "Standby",
173
+ "Lease",
175
174
 
176
175
  "ReplaySpec", "BenchmarkSpec", "BenchmarkRegisterRequest", "BenchmarkStatusResponse",
177
176
  "EvalRequest", "Estimate", "EvalResponse", "EvalDryRunResponse", "RolloutResult",
@@ -179,13 +178,14 @@ __all__ = [
179
178
 
180
179
  "SecretRef", "SecretCreateRequest", "SecretInfo", "BootstrapResponse",
181
180
 
182
- "MAX_FILES", "MAX_UPLOAD_BYTES", "VolumeFile", "VolumeUploadRequest", "UploadTarget", "VolumeUploadResponse",
181
+ "MAX_FILES", "VolumeFile", "VolumeUploadRequest", "UploadTarget", "VolumeUploadResponse",
183
182
  "VolumeInfo", "check_volume_name", "parse_vol",
184
183
 
185
184
  "SETTINGS", "Setting", "SettingsChange", "Applied", "SettingState", "SettingsView", "SettingChanged",
186
185
  "SettingsChanged",
187
186
 
188
- "KEPT", "MOST_LAYERS", "PLANS_MOST", "STATE_MOST", "PLAN_ON_A_POLICY", "PLANNER_ID", "POLICY_ID", "ROBOT_ID", "TEAM_GONE", "PlannerSpec",
187
+ "KEPT", "MOST_LAYERS", "PLANS_MOST", "STATE_MOST", "PLAN_ON_A_POLICY", "PLANNER_ID", "POLICY_ID", "ROBOT_ID", "WAITING_FOR_PLAN",
188
+ "PlannerSpec",
189
189
  "PlannerRoundRequest", "PlannerRobot", "PlannerMember", "PlannerObservation", "PlannerPlanIn", "PlannerRound",
190
190
  "PlannerPlans", "PlannerPlansWritten", "PlanAppend", "PlanAppended", "PlannerObserve", "PlannerObserved",
191
191
 
@@ -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
@@ -57,7 +57,7 @@ def _side(value: Any, which: str, i: int) -> str:
57
57
  return side
58
58
  if side.startswith(TEMPLATE):
59
59
  if not _TEMPLATE_NAME.fullmatch(side[len(TEMPLATE):]):
60
- raise ValueError(f"pair {i}: {which} {value!r}: a template is template:<name>, the name `seq init` takes "
60
+ raise ValueError(f"pair {i}: {which} {value!r}: a template is template:<name>, an official template's name "
61
61
  "(lowercase letters, digits or '-'), e.g. template:libero-10")
62
62
  return side
63
63
  if not _NAME.fullmatch(side):
@@ -36,8 +36,7 @@ TASK_NAME = r"^[A-Za-z0-9][A-Za-z0-9._/:-]{0,127}$"
36
36
 
37
37
  SETUP_GONE = ("@seq.setup is gone: a benchmark builds its worlds in its constructor, after the machine's snapshot - "
38
38
  'init= its arguments, "{num_worlds}" how many worlds this eval builds and "{policy.<field>}" what the '
39
- "evaluated policy declares; a benchmark registered with @seq.setup is registered again with sequence-ai "
40
- "0.51.1 or later (seq deploy)")
39
+ "evaluated policy declares; a benchmark registered with @seq.setup has to be registered again")
41
40
 
42
41
 
43
42
  def _names_worlds(constructor: PolicyConstructor | None) -> bool:
@@ -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")
@@ -56,6 +56,8 @@ class Resources(BaseModel):
56
56
 
57
57
 
58
58
 
59
+
60
+
59
61
  cpu: float | None = Field(default=None, ge=0.125, le=64)
60
62
  cpu_limit: float | None = Field(default=None, ge=0.125, le=128)
61
63
  memory_gb: float | None = Field(default=None, ge=0.125, le=1024)
@@ -207,9 +209,6 @@ class DeploymentPolicy(BaseModel):
207
209
 
208
210
 
209
211
  episodes: Episodes | None = None
210
-
211
-
212
- streaming: bool = Field(default=False, exclude=True)
213
212
  secrets: list[SecretRef] = Field(default_factory=list)
214
213
 
215
214
 
@@ -247,17 +246,6 @@ class DeploymentPolicy(BaseModel):
247
246
  raise ValueError(PLAN_ON_A_POLICY)
248
247
  return self
249
248
 
250
- @model_validator(mode="after")
251
- def _episodes_of_streaming(self) -> "DeploymentPolicy":
252
-
253
- if self.streaming and self.episodes not in (None, "own"):
254
- raise ValueError(f"streaming is what a record from before contract 0.5.24 says; beside "
255
- f"episodes={self.episodes!r}, leave it out")
256
- if self.streaming:
257
- self.episodes = "own"
258
- self.streaming = self.episodes == "own"
259
- return self
260
-
261
249
  @model_validator(mode="after")
262
250
  def _plays_what_it_holds(self) -> "DeploymentPolicy":
263
251
  check_chunk_lens(self.action_chunk_valid_len, self.action_chunk_replan_at)
@@ -380,6 +368,10 @@ class DeploymentRequest(BaseModel):
380
368
 
381
369
 
382
370
 
371
+
372
+
373
+
374
+
383
375
  _NAME = re.compile(r"[A-Za-z0-9][A-Za-z0-9._-]{0,63}")
384
376
 
385
377
 
@@ -409,5 +401,3 @@ class DeploymentStatusResponse(BaseModel):
409
401
  status: DeploymentState
410
402
  model: str
411
403
  error: str | None = Field(default=None, description="Build-failure reason; set only when FAILED")
412
-
413
- reason: Literal["gpu_out_of_memory", "host_out_of_memory", "crashed"] | None = None
@@ -1,12 +1,11 @@
1
1
  """
2
- The observation stream: a policy of its own inputs that reads every observation since its last act is sent each one as
3
- the robot makes it, on a connection of its own (POST /observe), and an act carries only the newest.
2
+ The observation stream: every observation a robot makes is sent to its worker as it is made (POST /observe), and its
3
+ act carries none.
4
4
 
5
5
  In one sentence: the robot's SDK numbers each observation of an episode from 0 → posts them as they come, each post the
6
- ones that came while the last was on its way (ObserveRequest) → the worker keeps them by episode and answers how far it
7
- has every one (ObserveResponse.through) → an act carries the newest observation and its number (ActRequest.seq) → the
8
- worker waits for the ones before it, STREAM_WAIT_S at most, and hands the policy {"observations": [...]}, oldest first,
9
- the act's own last - what an eval's since_last_act sends in one act today.
6
+ ones that came while the last was on its way (ObserveRequest) → the worker keeps them by episode, answers how far it has
7
+ every one (ObserveResponse.through) and hands each to the policy in order → an act names how many came before it
8
+ (ActRequest.seq) → the worker waits for those to reach the policy, STREAM_WAIT_S at most, then calls its act function.
10
9
 
11
10
  WHY: an act was the only upload, so every frame between two acts waited for the next one - 24 frames, 1304 KB and a read
12
11
  p50 of 425 ms from a robot at home. Sent as they are made, they
@@ -23,23 +22,7 @@ from typing import Any
23
22
 
24
23
  from pydantic import BaseModel, ConfigDict, Field
25
24
 
26
- __all__ = ["BLOCKS_FORMAT", "FORMAT", "FRAMES_MISSING", "FRAMES_OVER_LIMIT", "ObserveFrame", "ObserveRequest",
27
- "ObserveResponse", "ZSTD_FORMAT"]
28
-
29
-
30
-
31
- FORMAT = "x-seq-observe/1"
32
-
33
-
34
-
35
-
36
- ZSTD_FORMAT = "x-seq-zstd/1"
37
-
38
-
39
-
40
-
41
-
42
- BLOCKS_FORMAT = "x-seq-blocks/1"
25
+ __all__ = ["FRAMES_MISSING", "FRAMES_OVER_LIMIT", "ObserveFrame", "ObserveRequest", "ObserveResponse"]
43
26
 
44
27
 
45
28
 
@@ -68,7 +51,6 @@ class ObserveRequest(BaseModel):
68
51
  skipped: list[int] = Field(default_factory=list, description="Numbers left out on purpose, never to come")
69
52
 
70
53
 
71
-
72
54
  blocks: dict[bytes, Any] = Field(default_factory=dict,
73
55
  description="Block contents by id, for the references in the frames")
74
56
 
@@ -16,13 +16,7 @@ from typing import Any
16
16
 
17
17
  from pydantic import BaseModel, ConfigDict
18
18
 
19
- __all__ = ["OBSERVATIONS_GONE", "Tensors", "rows_of"]
20
-
21
-
22
-
23
- OBSERVATIONS_GONE = ("observations= is gone: a policy is handed every observation as its robot sends it - keep the ones "
24
- "an act reads in an @seq.observe method (on self, or in episode.state), and deploy again with the "
25
- "latest sequence-ai")
19
+ __all__ = ["Tensors", "rows_of"]
26
20
 
27
21
 
28
22
  class Tensors(BaseModel):
@@ -49,9 +49,8 @@ STATE_MOST = 256 * 1024
49
49
 
50
50
 
51
51
 
52
+ WAITING_FOR_PLAN = "waiting_for_plan"
52
53
 
53
- TEAM_GONE = ("team is gone: a team is a planner now - @seq.planner(members=[...]) names the policies policies= named, "
54
- "and planners too; a robot connects to its own policy as ever, and deploy again with the latest sequence-ai")
55
54
 
56
55
 
57
56
  PLAN_ON_A_POLICY = ("@seq.plan is a planner's now: a policy is planned by a @seq.planner that names it in members= - "
@@ -115,7 +115,7 @@ class TemplateFiles(BaseModel):
115
115
 
116
116
  model_config = ConfigDict(extra="forbid")
117
117
 
118
- template: str = Field(..., pattern=r"^[a-z0-9][a-z0-9-]{0,63}$", description="the template's name, as seq init takes it")
118
+ template: str = Field(..., pattern=r"^[a-z0-9][a-z0-9-]{0,63}$", description="the official template's name")
119
119
  version: int = Field(..., ge=1, le=999_999_999, description="the template version whose files these are")
120
120
 
121
121
 
@@ -279,11 +279,8 @@ class VolumeRef(BaseModel):
279
279
 
280
280
 
281
281
  class Concurrency(BaseModel):
282
- """How one worker serves robots, every field optional. `replicas_per_gpu` model copies share each card (each copy is
283
- its own process and serves one control loop); `gpus_per_replica` cards make one copy (None: every card of the
284
- worker). A worker's slots = cards // gpus_per_replica × replicas_per_gpu. `target_inputs` is how many robot sessions
285
- a worker holds before another starts, `max_inputs` the most it takes while a new one boots — both default to the
286
- slots.
282
+ """How one worker serves robots, every field optional. `gpus_per_replica` cards make one copy (None: every card of
283
+ the worker makes its own copy).
287
284
 
288
285
  `sizes` (contract 0.5.31) - from `@seq.concurrent(sizes=[1, 2, 4, 8])` on the policy's infer method - are the batch
289
286
  sizes its infer is called with, ascending, the largest the most acts one forward takes (None: one robot a copy,
@@ -292,25 +289,14 @@ class Concurrency(BaseModel):
292
289
  robot's act being a batch of one. A copy seats as many robots
293
290
  as the largest size whose batch answers their control loops in time, and its worker holds an early act a little so
294
291
  robots fall into one batch.
295
- `dynamic` - seating robots apart while each could be served
296
- alone, or max_concurrent a copy however late - is gone. The SDK takes `gpus_per_replica` and `replica_start` in
292
+ The SDK takes `gpus_per_replica` and `replica_start` in
297
293
  `@seq.policy(...)`.
298
-
299
-
300
- `max_concurrent` (contract 0.5.5: one number, the largest batch, every size up to it possible), `max_inputs`,
301
- `target_inputs` and `replicas_per_gpu` are older ways': kept so a stored spec and an older SDK's request still
302
- read, and refused on a new deploy by the platform; the SDK from contract 0.5.31 sends none of them.
303
-
304
- """
294
+ """
305
295
 
306
296
  model_config = ConfigDict(extra="forbid")
307
297
 
308
298
  sizes: list[int] | None = Field(default=None, min_length=1, max_length=256,
309
299
  description="The batch sizes infer is called with, ascending; the largest the most")
310
- max_concurrent: int | None = Field(default=None, ge=2, le=256)
311
- max_inputs: int | None = Field(default=None, ge=1, le=1024)
312
- target_inputs: int | None = Field(default=None, ge=1, le=1024)
313
- replicas_per_gpu: int | None = Field(default=None, ge=1, le=64)
314
300
  gpus_per_replica: int | None = Field(default=None, ge=1, le=256)
315
301
 
316
302
 
@@ -331,17 +317,6 @@ class Concurrency(BaseModel):
331
317
  raise ValueError("the batch sizes begin with 1: a lone robot's act is a batch of one")
332
318
  return v
333
319
 
334
- @model_validator(mode="after")
335
- def _consistent(self) -> "Concurrency":
336
- if self.sizes is not None and self.max_concurrent is not None:
337
- raise ValueError("a policy declares its batch sizes (sizes) or, as an older SDK did, one max_concurrent - "
338
- "not both")
339
- if self.max_inputs is not None and self.target_inputs is not None and self.max_inputs < self.target_inputs:
340
- raise ValueError("max_inputs must be at least target_inputs")
341
- if (self.gpus_per_replica or 1) > 1 and (self.replicas_per_gpu or 1) > 1:
342
- raise ValueError("a copy that spans several cards is one copy per card group: replicas_per_gpu must be 1")
343
- return self
344
-
345
320
 
346
321
 
347
322
 
@@ -385,10 +360,6 @@ class PolicySpec(BaseModel):
385
360
 
386
361
 
387
362
 
388
- streaming: bool = Field(default=False, exclude=True)
389
-
390
-
391
-
392
363
 
393
364
 
394
365
 
@@ -428,17 +399,6 @@ class PolicySpec(BaseModel):
428
399
  check_weights_uri(uri, f"weights[{name!r}]")
429
400
  return self
430
401
 
431
- @model_validator(mode="after")
432
- def _episodes_of_streaming(self) -> "PolicySpec":
433
-
434
- if self.streaming and self.episodes not in (None, "own"):
435
- raise ValueError(f"streaming is what a record from before contract 0.5.24 says; beside "
436
- f"episodes={self.episodes!r}, leave it out")
437
- if self.streaming:
438
- self.episodes = "own"
439
- self.streaming = self.episodes == "own"
440
- return self
441
-
442
402
  @model_validator(mode="after")
443
403
  def _plays_what_it_holds(self) -> "PolicySpec":
444
404
  check_chunk_lens(self.action_chunk_valid_len, self.action_chunk_replan_at)
@@ -451,7 +411,7 @@ class PolicySpec(BaseModel):
451
411
  if self.planner is not None:
452
412
  said = [name for name in ("hz", "action_chunk_valid_len", "action_chunk_replan_at", "tensors")
453
413
  if getattr(self, name) is not None]
454
- said += [f"concurrency.{name}" for name in ("sizes", "max_concurrent", "max_inputs", "target_inputs")
414
+ said += [f"concurrency.{name}" for name in ("sizes",)
455
415
  if self.concurrency is not None and getattr(self.concurrency, name) is not None]
456
416
  if said:
457
417
  raise ValueError(f"a planner answers no act, so it declares no {', '.join(said)}")
@@ -496,7 +456,7 @@ def check_weights_uri(v: str, what: str = "weights") -> str:
496
456
  if v.startswith("hf://") and len(v) > len("hf://"):
497
457
  return v
498
458
  raise ValueError(f"{what} must be a template:// official template, an hf:// repo or a vol:// volume: upload files "
499
- "of your own once as a volume (seq volume put <name> <dir>) and use vol://<name>")
459
+ "of your own once as a volume and use vol://<name>")
500
460
 
501
461
 
502
462
  def check_weights_parts(weights_name: str | None, extra: dict) -> None:
@@ -25,6 +25,8 @@ from typing import Literal
25
25
 
26
26
  from pydantic import BaseModel, ConfigDict, Field
27
27
 
28
+ from sequence_base.constants.serving import EPISODE_IDLE_S, MAX_WARM_WORKERS, STARTUP_TIMEOUT_S
29
+
28
30
  __all__ = [
29
31
  "Reads",
30
32
  "Setting",
@@ -90,14 +92,15 @@ SETTINGS: tuple[Setting, ...] = (
90
92
  minimum=1, maximum=256, unit="GPUs", code="max_gpus"),
91
93
  _s("min_workers", "int", "gateway", "scaling", "Workers kept running, and billed, whether or not a robot is "
92
94
  "connected.",
93
- minimum=0, maximum=16, unit="workers", code="min_workers", default=0),
95
+ minimum=0, maximum=MAX_WARM_WORKERS, unit="workers", code="min_workers", default=0),
94
96
  _s("buffer_workers", "int", "gateway", "scaling", "Spare running workers, billed, beside the busy ones, so a robot "
95
- "that connects or loses its worker starts at once.", minimum=0, maximum=16, unit="workers", code="buffer_workers",
97
+ "that connects or loses its worker starts at once.", minimum=0, maximum=MAX_WARM_WORKERS, unit="workers",
98
+ code="buffer_workers",
96
99
  default=0),
97
100
  _s("schedule.hours", "str", "gateway", "scaling", "Days and hours it keeps schedule.min_workers running, as "
98
101
  "'Mon-Fri 08:00-18:00'.", max_length=80),
99
102
  _s("schedule.min_workers", "int", "gateway", "scaling", "Workers kept running in schedule.hours.",
100
- minimum=0, maximum=16, unit="workers"),
103
+ minimum=0, maximum=MAX_WARM_WORKERS, unit="workers"),
101
104
  _s("schedule.tz", "str", "gateway", "scaling", "The time zone of schedule.hours, as 'America/Los_Angeles'.",
102
105
  max_length=64, default="UTC"),
103
106
 
@@ -124,9 +127,9 @@ SETTINGS: tuple[Setting, ...] = (
124
127
  "that it timed out.", minimum=1, maximum=3600, unit="s", code="seq.Timeouts(request=)"),
125
128
  _s("timeouts.episode_idle", "int", "workers", "timeouts", "How long an episode may go without an act before its "
126
129
  "place goes to a new one.", minimum=10, maximum=86400, unit="s", code="seq.Timeouts(episode_idle=)",
127
- default=300),
130
+ default=EPISODE_IDLE_S),
128
131
  _s("timeouts.startup", "int", "new_workers", "timeouts", "How long a worker may take to load.",
129
- minimum=60, maximum=18000, unit="s", code="seq.Timeouts(startup=)", default=1800),
132
+ minimum=60, maximum=18000, unit="s", code="seq.Timeouts(startup=)", default=STARTUP_TIMEOUT_S),
130
133
 
131
134
  _s("plan.every_s", "float", "workers", "planner", "Seconds between calls of its @seq.plan method.",
132
135
  above=0, unit="s", code="@seq.plan(every_s=)"),