sequence-ai 0.32.0__tar.gz → 0.32.2__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 (149) hide show
  1. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/PKG-INFO +22 -2
  2. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/README.md +21 -1
  3. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/eval.md +3 -3
  4. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/pyproject.toml +8 -1
  5. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/seq/capacity_cli.py +19 -0
  6. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_parallel_cli.py +17 -0
  7. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/.github/workflows/ci.yml +0 -0
  8. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/.github/workflows/publish.yml +0 -0
  9. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/.gitignore +0 -0
  10. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/LICENSE +0 -0
  11. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/observability.md +0 -0
  12. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/seq/__init__.py +0 -0
  13. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/seq/_account.py +0 -0
  14. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/seq/_deploy_gateway.py +0 -0
  15. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/seq/_eval_gateway.py +0 -0
  16. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/seq/_gateway.py +0 -0
  17. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/seq/_mock.py +0 -0
  18. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/seq/_observe_gateway.py +0 -0
  19. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/seq/_partial.py +0 -0
  20. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/seq/adapter.py +0 -0
  21. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/seq/base.py +0 -0
  22. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/seq/benchmark.py +0 -0
  23. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/seq/benchmark_registry.py +0 -0
  24. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/seq/cli.py +0 -0
  25. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/seq/code_bundle.py +0 -0
  26. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/seq/data_cli.py +0 -0
  27. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/seq/deploy.py +0 -0
  28. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/seq/deployments_cli.py +0 -0
  29. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/seq/errors.py +0 -0
  30. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/seq/eval.py +0 -0
  31. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/seq/eval_cli.py +0 -0
  32. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/seq/eval_engine.py +0 -0
  33. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/seq/image.py +0 -0
  34. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/seq/observe.py +0 -0
  35. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/seq/ops_cli.py +0 -0
  36. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/seq/orgs_cli.py +0 -0
  37. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/seq/policy.py +0 -0
  38. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/seq/presets/__init__.py +0 -0
  39. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/seq/presets/robot_arm.py +0 -0
  40. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/seq/registry.py +0 -0
  41. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/seq/safety.py +0 -0
  42. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/seq/secret.py +0 -0
  43. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/seq/template_fetch.py +0 -0
  44. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/seq/templates/__init__.py +0 -0
  45. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/seq/templates/composite_ref.py +0 -0
  46. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/seq/templates/pi05_droid.py +0 -0
  47. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/seq/templates/pi05_libero.py +0 -0
  48. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/seq/templates/toy_adapter.py +0 -0
  49. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/seq/templates/toy_policy.py +0 -0
  50. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/seq/templates/toy_sim.py +0 -0
  51. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/seq/tf.py +0 -0
  52. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/seq/volume.py +0 -0
  53. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/seq/volume_upload.py +0 -0
  54. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/seq/weights.py +0 -0
  55. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/seq_launch.py +0 -0
  56. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/sequence_ai/__init__.py +0 -0
  57. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/sequence_ai/_core/__init__.py +0 -0
  58. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/sequence_ai/_core/_mock_assets/worker.cert.pem +0 -0
  59. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/sequence_ai/_core/_mock_assets/worker.key.pem +0 -0
  60. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/sequence_ai/_core/capacity.py +0 -0
  61. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/sequence_ai/_core/catalogue.py +0 -0
  62. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/sequence_ai/_core/diagnostics.py +0 -0
  63. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/sequence_ai/_core/direct.py +0 -0
  64. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/sequence_ai/_core/encode.py +0 -0
  65. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/sequence_ai/_core/error_codes.py +0 -0
  66. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/sequence_ai/_core/logsource.py +0 -0
  67. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/sequence_ai/_core/mock_direct.py +0 -0
  68. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/sequence_ai/_core/reporting.py +0 -0
  69. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/sequence_ai/_core/rid.py +0 -0
  70. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/sequence_ai/_core/transport.py +0 -0
  71. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/sequence_ai/act/__init__.py +0 -0
  72. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/sequence_ai/act/frames.py +0 -0
  73. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/sequence_ai/act/observation.py +0 -0
  74. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/sequence_ai/act/policy.py +0 -0
  75. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/sequence_ai/act/run_loop.py +0 -0
  76. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/sequence_ai/act/types.py +0 -0
  77. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/sequence_ai/chat/__init__.py +0 -0
  78. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/sequence_ai/chat/content.py +0 -0
  79. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/sequence_ai/chat/conversation.py +0 -0
  80. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/sequence_ai/chat/infer.py +0 -0
  81. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/sequence_ai/chat/types.py +0 -0
  82. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/sequence_ai/decide/__init__.py +0 -0
  83. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/sequence_ai/decide/infer.py +0 -0
  84. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/sequence_ai/decide/types.py +0 -0
  85. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/sequence_ai/errors.py +0 -0
  86. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/sequence_ai/py.typed +0 -0
  87. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/sequence_ai/types.py +0 -0
  88. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/conftest.py +0 -0
  89. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_base_contract_drift.py +0 -0
  90. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_batched.py +0 -0
  91. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_benchmark_batched.py +0 -0
  92. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_build_runtime.py +0 -0
  93. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_camera_views.py +0 -0
  94. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_chat.py +0 -0
  95. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_chat_agents.py +0 -0
  96. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_chunk_repr.py +0 -0
  97. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_cli.py +0 -0
  98. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_cli_errors.py +0 -0
  99. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_code_bundle.py +0 -0
  100. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_custom_io_predict.py +0 -0
  101. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_data_export.py +0 -0
  102. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_declared_observation.py +0 -0
  103. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_deployments_cli.py +0 -0
  104. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_direct_connect.py +0 -0
  105. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_encode_target.py +0 -0
  106. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_error_codes.py +0 -0
  107. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_evals_cli.py +0 -0
  108. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_frame_trim.py +0 -0
  109. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_infer_params.py +0 -0
  110. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_io_contract_authoring.py +0 -0
  111. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_io_contract_client.py +0 -0
  112. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_mock_tier.py +0 -0
  113. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_no_absolute_promise.py +0 -0
  114. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_no_action_conversion.py +0 -0
  115. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_o5_gateway_realtier.py +0 -0
  116. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_o5_observability.py +0 -0
  117. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_observability.py +0 -0
  118. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_observation.py +0 -0
  119. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_open_loop_horizon.py +0 -0
  120. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_ops_cli.py +0 -0
  121. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_orgs_cli.py +0 -0
  122. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_parallel_client.py +0 -0
  123. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_policy_resources.py +0 -0
  124. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_remote_eval.py +0 -0
  125. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_rename_cli.py +0 -0
  126. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_rid_convention.py +0 -0
  127. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_score_groups.py +0 -0
  128. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_sdk.py +0 -0
  129. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_secret_cli.py +0 -0
  130. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_secret_mock.py +0 -0
  131. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_secret_ref.py +0 -0
  132. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_seq_adapter.py +0 -0
  133. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_seq_authoring.py +0 -0
  134. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_seq_benchmark.py +0 -0
  135. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_seq_cli.py +0 -0
  136. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_seq_cli_tree.py +0 -0
  137. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_seq_deploy_remote.py +0 -0
  138. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_seq_image_volume.py +0 -0
  139. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_seq_launch.py +0 -0
  140. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_template_fetch.py +0 -0
  141. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_toy_templates.py +0 -0
  142. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_traffic_cli.py +0 -0
  143. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_trajectories_cli.py +0 -0
  144. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_transport_warming.py +0 -0
  145. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_volume_upload.py +0 -0
  146. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_warmup_accounting.py +0 -0
  147. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_weightless_policy.py +0 -0
  148. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/tests/test_weights_parts.py +0 -0
  149. {sequence_ai-0.32.0 → sequence_ai-0.32.2}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: sequence-ai
3
- Version: 0.32.0
3
+ Version: 0.32.2
4
4
  Summary: Cloud inference for robot policies — a control loop that keeps the connection open and the action buffer full.
5
5
  Project-URL: Homepage, https://generalsequences.com
6
6
  Project-URL: Documentation, https://generalsequences.com/docs/
@@ -492,7 +492,7 @@ seq init toy-adapter toy-reach # toy-reach/toy_adapter.py — i
492
492
 
493
493
  An adapter runs inside its benchmark's container, so it ships with the benchmark. `seq deploy` uploads only
494
494
  the entry file, so name the adapter's module on the benchmark's image — in `toy_sim.py`,
495
- `image=seq.Image.debian_slim().uv_pip_install("numpy").add_local_python_source("toy_adapter")` — or keep the
495
+ `image=seq.Image.debian_slim().uv_pip_install("numpy", "mujoco-warp==3.14.0").add_local_python_source("toy_adapter")` — or keep the
496
496
  class in the benchmark's own file. Then:
497
497
 
498
498
  ```bash
@@ -783,6 +783,25 @@ asked for is out of stock (list fallbacks in `gpu=`), the deployment holds its `
783
783
  past `queue_timeout_s`. `details["reason"]` carries the same as a code (`gpu_limit_reached`, `gpu_busy`,
784
784
  `gpu_low_stock`, `deployment_full`, `queue_timeout`).
785
785
 
786
+ ### A model on more than one machine
787
+
788
+ Write the total: `@seq.policy(gpu="H100:16")`. Past 8 cards the platform runs the model on whole machines of 8 cards —
789
+ 16 is two machines, at most 256 cards — started together, stopped together and billed together (every machine's
790
+ cards, CPU and memory). The account needs a GPU limit that holds the whole group at once; past the 8 an account has
791
+ by default, ask us.
792
+
793
+ - Your `@seq.load` and `@seq.infer` run on every machine, one process each, seeing that machine's 8 cards. Before
794
+ your code is imported the platform sets `RANK`, `WORLD_SIZE`, `MASTER_ADDR`, `MASTER_PORT` and `LOCAL_RANK=0`
795
+ and, when your image has torch, initializes `torch.distributed` (NCCL) across the machines — check
796
+ `torch.distributed.is_initialized()` rather than initializing it again. Code on another framework reads the same
797
+ variables to join its own, on a port other than `MASTER_PORT`.
798
+ - A robot reaches machine 0. Every request — and every episode end — runs on every machine at once, so the
799
+ collectives in your code meet; machine 0's answer goes back to the robot.
800
+ - The group is one copy of the model and holds one robot's control loop: leave `gpus_per_replica` and
801
+ `replicas_per_gpu` unset, list one card type, and keep a policy with `@seq.plan` on one machine.
802
+ - When one machine stops, the whole group stops (`group_member_lost`) and the next connect starts a new one.
803
+ `seq policy status <name>` shows each machine's rank, its state and when it last answered.
804
+
786
805
  ### Weights live on a volume, never in the image
787
806
 
788
807
  `weights=` is copied once, at deploy, into a volume the platform mounts at `/data` — never baked into an image
@@ -1010,6 +1029,7 @@ What the platform fixes; everything else is your code's. Each value is what the
1010
1029
  | The code a deploy uploads | 8 MiB compressed: the entry file (or its package) and what `seq.Image.add_local_*` names. A source tree over 64 MiB is refused before it is sent. Weights never travel with the code — they go in `weights=`. |
1011
1030
  | Robots one worker serves at once | Its slots: one robot's control loop per model copy — `@seq.concurrent(replicas_per_gpu=…)` copies per card (default 1), each over `gpus_per_replica` cards (default: all of the worker's). A request within a worker's slots is never answered `429`. |
1012
1031
  | No slot free | Another worker starts while GPUs are left; connect answers `503` with `retry_after_s` while it does, and the SDK waits for it. With none left — the deployment's `max_gpus`, your account's, the platform's — `on_full="queue"` (the default) puts the robot in line before its control loop starts, for up to `queue_timeout_s` (default 120 s), and `on_full="reject"` refuses it at once. A loop that has started is never interrupted. |
1032
+ | A model across machines | `gpu="TYPE:N"` with N a multiple of 8 past 8, up to 256: N ÷ 8 machines of 8 cards, one copy of the model across all of them, one card type. |
1013
1033
  | GPUs at once | 8 per account, serving and evals together (`seq account` shows them); `max_gpus` caps one deployment. An eval they cannot fit waits in line up to 10 minutes. |
1014
1034
  | A worker going away | Its acts are answered `503 unavailable` (`reason: draining`); the SDK reconnects to another worker and replays the act. |
1015
1035
  | Shutdown | Before a worker is removed, the acts in flight finish and every replica runs `@seq.shutdown` — within 30 s. After that the worker is stopped without further notice. |
@@ -451,7 +451,7 @@ seq init toy-adapter toy-reach # toy-reach/toy_adapter.py — i
451
451
 
452
452
  An adapter runs inside its benchmark's container, so it ships with the benchmark. `seq deploy` uploads only
453
453
  the entry file, so name the adapter's module on the benchmark's image — in `toy_sim.py`,
454
- `image=seq.Image.debian_slim().uv_pip_install("numpy").add_local_python_source("toy_adapter")` — or keep the
454
+ `image=seq.Image.debian_slim().uv_pip_install("numpy", "mujoco-warp==3.14.0").add_local_python_source("toy_adapter")` — or keep the
455
455
  class in the benchmark's own file. Then:
456
456
 
457
457
  ```bash
@@ -742,6 +742,25 @@ asked for is out of stock (list fallbacks in `gpu=`), the deployment holds its `
742
742
  past `queue_timeout_s`. `details["reason"]` carries the same as a code (`gpu_limit_reached`, `gpu_busy`,
743
743
  `gpu_low_stock`, `deployment_full`, `queue_timeout`).
744
744
 
745
+ ### A model on more than one machine
746
+
747
+ Write the total: `@seq.policy(gpu="H100:16")`. Past 8 cards the platform runs the model on whole machines of 8 cards —
748
+ 16 is two machines, at most 256 cards — started together, stopped together and billed together (every machine's
749
+ cards, CPU and memory). The account needs a GPU limit that holds the whole group at once; past the 8 an account has
750
+ by default, ask us.
751
+
752
+ - Your `@seq.load` and `@seq.infer` run on every machine, one process each, seeing that machine's 8 cards. Before
753
+ your code is imported the platform sets `RANK`, `WORLD_SIZE`, `MASTER_ADDR`, `MASTER_PORT` and `LOCAL_RANK=0`
754
+ and, when your image has torch, initializes `torch.distributed` (NCCL) across the machines — check
755
+ `torch.distributed.is_initialized()` rather than initializing it again. Code on another framework reads the same
756
+ variables to join its own, on a port other than `MASTER_PORT`.
757
+ - A robot reaches machine 0. Every request — and every episode end — runs on every machine at once, so the
758
+ collectives in your code meet; machine 0's answer goes back to the robot.
759
+ - The group is one copy of the model and holds one robot's control loop: leave `gpus_per_replica` and
760
+ `replicas_per_gpu` unset, list one card type, and keep a policy with `@seq.plan` on one machine.
761
+ - When one machine stops, the whole group stops (`group_member_lost`) and the next connect starts a new one.
762
+ `seq policy status <name>` shows each machine's rank, its state and when it last answered.
763
+
745
764
  ### Weights live on a volume, never in the image
746
765
 
747
766
  `weights=` is copied once, at deploy, into a volume the platform mounts at `/data` — never baked into an image
@@ -969,6 +988,7 @@ What the platform fixes; everything else is your code's. Each value is what the
969
988
  | The code a deploy uploads | 8 MiB compressed: the entry file (or its package) and what `seq.Image.add_local_*` names. A source tree over 64 MiB is refused before it is sent. Weights never travel with the code — they go in `weights=`. |
970
989
  | Robots one worker serves at once | Its slots: one robot's control loop per model copy — `@seq.concurrent(replicas_per_gpu=…)` copies per card (default 1), each over `gpus_per_replica` cards (default: all of the worker's). A request within a worker's slots is never answered `429`. |
971
990
  | No slot free | Another worker starts while GPUs are left; connect answers `503` with `retry_after_s` while it does, and the SDK waits for it. With none left — the deployment's `max_gpus`, your account's, the platform's — `on_full="queue"` (the default) puts the robot in line before its control loop starts, for up to `queue_timeout_s` (default 120 s), and `on_full="reject"` refuses it at once. A loop that has started is never interrupted. |
991
+ | A model across machines | `gpu="TYPE:N"` with N a multiple of 8 past 8, up to 256: N ÷ 8 machines of 8 cards, one copy of the model across all of them, one card type. |
972
992
  | GPUs at once | 8 per account, serving and evals together (`seq account` shows them); `max_gpus` caps one deployment. An eval they cannot fit waits in line up to 10 minutes. |
973
993
  | A worker going away | Its acts are answered `503 unavailable` (`reason: draining`); the SDK reconnects to another worker and replays the act. |
974
994
  | Shutdown | Before a worker is removed, the acts in flight finish and every replica runs `@seq.shutdown` — within 30 s. After that the worker is stopped without further notice. |
@@ -210,8 +210,8 @@ reads back what it returns.
210
210
 
211
211
  **It ships with the benchmark.** The adapter runs inside the benchmark's container and is named by
212
212
  `module:Class` (`--adapter toy_adapter:ToyReacherAdapter`), so its module must be in the benchmark's upload: keep
213
- the class in the benchmark's own file, or put its file beside the benchmark and
214
- name it on the benchmark's image — `image=seq.Image.debian_slim().uv_pip_install("numpy").add_local_python_source("toy_adapter")`.
213
+ the class in the benchmark's own file, or put its file beside the benchmark and name it on the benchmark's image —
214
+ in `toy_sim.py`, `image=seq.Image.debian_slim().uv_pip_install("numpy", "mujoco-warp==3.14.0").add_local_python_source("toy_adapter")`.
215
215
 
216
216
  **Every transform carries a `lossless` / `lossy(reason)` label, and the platform machine-checks it.**
217
217
  A transform that changes shape or dtype but is tagged `lossless` is rejected (or forced to `lossy`) —
@@ -416,7 +416,7 @@ pip install sequence-ai
416
416
  export SEQUENCES_API_KEY=seq_live_...
417
417
 
418
418
  seq init toy-policy && seq init toy-reach && seq init toy-adapter toy-reach
419
- # in toy-reach/toy_sim.py: image=seq.Image.debian_slim().uv_pip_install("numpy").add_local_python_source("toy_adapter")
419
+ # in toy-reach/toy_sim.py: image=seq.Image.debian_slim().uv_pip_install("numpy", "mujoco-warp==3.14.0").add_local_python_source("toy_adapter")
420
420
  seq deploy toy-policy/toy_policy.py --name toy-reacher
421
421
  seq deploy toy-reach/toy_sim.py
422
422
  seq eval run toy-reacher --benchmark toy-reach --adapter toy_adapter:ToyReacherAdapter --envs 16 --dry-run
@@ -276,7 +276,14 @@ name = "sequence-ai"
276
276
  # has no client.py). The toy eval runs end to end: the toy policy defines its own I/O ({state, target} in, {delta}
277
277
  # out) and its adapter speaks it (policy_io="own") — under the robot-arm contract every episode errored for want of a
278
278
  # camera image.
279
- version = "0.32.0"
279
+ # 0.32.1: docs only — the README (this page on PyPI) and eval.md now give the toy-reach image that ships its adapter
280
+ # as `uv_pip_install("numpy", "mujoco-warp==3.14.0")`, as toy_sim.py has it; the numpy-only line dropped the GPU sim
281
+ # and failed the benchmark's registration check.
282
+ # 0.32.2: a model on more cards than one machine has — `gpu="H100:16"` — runs as a group of 8-card machines the
283
+ # platform starts, connects and stops together; `seq policy status` shows each machine of a group (its rank, state and
284
+ # last heartbeat) and why a group ended (`group_member_lost`). The README says what a policy across machines gets:
285
+ # RANK / WORLD_SIZE / MASTER_ADDR / MASTER_PORT, torch.distributed initialized, every request on every machine.
286
+ version = "0.32.2"
280
287
  # The one line PyPI shows in search results. It used to read "A thin client over a public HTTP
281
288
  # API — everything it does, curl can do." That was true and it was the wrong sentence to spend
282
289
  # the slot on: it described the package by what it does not add, so the summary a reader saw
@@ -36,6 +36,8 @@ DEATH = {
36
36
  "replicas_per_gpu in @seq.concurrent, or a larger card",
37
37
  "host_out_of_memory": "out of the worker's memory — declare more with @seq.policy(memory=...)",
38
38
  "crashed": "its policy process kept crashing — `seq policy logs <name>` shows why",
39
+ "group_member_lost": "one machine of its group stopped, so the whole group stopped; the next connect starts a new "
40
+ "group — `seq policy logs <name>` shows which machine and why",
39
41
  }
40
42
 
41
43
 
@@ -267,6 +269,8 @@ def show_fleet(name: str, f: dict, echo: Echo) -> None:
267
269
  f"{count(w.get('sessions')):>10} {_clock(w.get('started_at'))}")
268
270
  if w.get("reason"):
269
271
  echo(f" ↳ {DEATH.get(w['reason'], w['reason']).replace('<name>', name)}")
272
+ if isinstance(w.get("group"), dict):
273
+ _show_group(w["group"], echo)
270
274
  last = f.get("last_failure")
271
275
  if last and last.get("cause"):
272
276
  # A worker that stopped serving for a cause of its own (the deployment went on serving): when, which version,
@@ -286,6 +290,21 @@ def show_fleet(name: str, f: dict, echo: Echo) -> None:
286
290
  echo("queue: empty")
287
291
 
288
292
 
293
+ def _show_group(group: dict, echo: Echo) -> None:
294
+ """A model across several machines: each machine's rank, its state and its last heartbeat as rank 0 saw them, or
295
+ why the group ended. {gs-plans/parallel/debug.md 13 "成组状态视图"}"""
296
+ if group.get("failure"):
297
+ echo(f" ↳ the group of {count(group.get('size'))} machines ended: {group['failure']}")
298
+ return
299
+ parts = []
300
+ for m in group.get("members") or []:
301
+ beat = m.get("beat_age_s")
302
+ parts.append(f"rank {count(m.get('rank'))} {m.get('state') or '?'}"
303
+ + (f" (beat {float(beat):.0f} s ago)" if isinstance(beat, (int, float)) else ""))
304
+ if parts:
305
+ echo(f" machines: {' · '.join(parts)}")
306
+
307
+
289
308
  # ── seq deploy: what one worker costs per hour ─────────────────────────────────────────────────────────────────
290
309
  def worker_price(resources: Any, prices: dict) -> Optional[dict]:
291
310
  """One worker's price per hour in three parts — its card(s), its CPU and its memory — at the requests it declared
@@ -239,6 +239,23 @@ def test_a_deployment_failed_by_dying_workers_says_what_the_cause_means(platform
239
239
  assert "failed to build" not in captured.err
240
240
 
241
241
 
242
+ def test_a_group_worker_shows_each_machine_and_why_its_group_ended(platform, status_of, capsys):
243
+ """{gs-plans/parallel/debug.md 13 "一组几台、每台的 rank 和心跳、整组失败的原因"}"""
244
+ _, answers = platform
245
+ group = {"handle": "g-1791078606-ab", "state": "running", "gpu": "H100", "cards": 16, "slots": 1, "sessions": 1,
246
+ "started_at": "2099-01-01T00:02:00Z", "reason": None,
247
+ "group": {"size": 2, "members": [{"rank": 0, "state": "serving"},
248
+ {"rank": 1, "state": "ready", "beat_age_s": 1.2}]}}
249
+ ended = {**group, "handle": "g-1791079999-cd", "state": "failed", "reason": "group_member_lost",
250
+ "group": {"size": 2, "failure": "rank 1 closed the channel (ConnectionError)"}}
251
+ answers[("GET", "/v1/deployments/pol/fleet")] = {**_FLEET, "workers": [group, ended], "queue": []}
252
+ assert cli.main(["policy", "status", "pol"]) == 0
253
+ out = capsys.readouterr().out
254
+ assert "H100 × 16" in out and "machines: rank 0 serving · rank 1 ready (beat 1 s ago)" in out
255
+ assert "one machine of its group stopped, so the whole group stopped" in out
256
+ assert "the group of 2 machines ended: rank 1 closed the channel (ConnectionError)" in out
257
+
258
+
242
259
  # ── seq eval run: the layout, the dry run's cards, the queue; seq eval status ──────────────────────────────────
243
260
  class _EvalGateway:
244
261
  """POST /v1/eval and the report / details of a run that waits for GPUs."""
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes