hypershell 2.9.0a6__tar.gz → 2.9.0a8__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 (263) hide show
  1. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/PKG-INFO +2 -2
  2. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/client_help.rst +12 -2
  3. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/cluster_desc.rst +3 -1
  4. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/cluster_help.rst +55 -7
  5. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/config_param_ref.rst +139 -9
  6. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/config_task_env.rst +3 -0
  7. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/database.rst +15 -0
  8. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/relay_desc.rst +8 -1
  9. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/relay_help.rst +6 -3
  10. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/server_desc.rst +5 -0
  11. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/server_help.rst +41 -3
  12. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/server_usage.rst +1 -0
  13. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/submit_help.rst +11 -4
  14. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/templates.rst +10 -0
  15. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/api/client.rst +8 -0
  16. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/api/cluster.rst +7 -0
  17. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/api/data.rst +7 -0
  18. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/api/server.rst +4 -0
  19. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/api/submit.rst +6 -0
  20. hypershell-2.9.0a8/docs/cli/client.rst +25 -0
  21. hypershell-2.9.0a8/docs/cli/cluster.rst +33 -0
  22. hypershell-2.9.0a8/docs/cli/initdb.rst +23 -0
  23. hypershell-2.9.0a8/docs/cli/relay.rst +122 -0
  24. hypershell-2.9.0a8/docs/cli/server.rst +90 -0
  25. hypershell-2.9.0a8/docs/cli/submit.rst +26 -0
  26. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/cli/task_info.rst +3 -0
  27. hypershell-2.9.0a8/docs/cli/task_search.rst +26 -0
  28. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/cli/task_submit.rst +5 -0
  29. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/cli/task_update.rst +3 -0
  30. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/cli/task_wait.rst +3 -0
  31. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/conf.py +12 -3
  32. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/config.rst +4 -0
  33. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/getting_started.rst +7 -0
  34. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/index.rst +20 -0
  35. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/install.rst +9 -0
  36. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/logging.rst +11 -5
  37. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/manual.rst +3 -2
  38. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/security.rst +21 -6
  39. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/pyproject.toml +2 -2
  40. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/share/bash_completion.d/hs +11 -1
  41. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/share/man/man1/hs.1 +229 -38
  42. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/share/man/man1/hsx.1 +229 -38
  43. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/share/man/man1/hyper-shell.1 +229 -38
  44. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/share/zsh/site-functions/_hs +10 -5
  45. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/src/hypershell/client.py +10 -10
  46. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/src/hypershell/cluster/__init__.py +10 -10
  47. hypershell-2.9.0a8/src/hypershell/cluster/demand.py +185 -0
  48. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/src/hypershell/cluster/launch.py +130 -3
  49. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/src/hypershell/cluster/local.py +2 -2
  50. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/src/hypershell/cluster/remote.py +183 -105
  51. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/src/hypershell/cluster/ssh.py +2 -2
  52. hypershell-2.9.0a8/src/hypershell/cluster/topology.py +643 -0
  53. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/src/hypershell/config.py +6 -1
  54. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/src/hypershell/core/config.py +84 -1
  55. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/src/hypershell/core/dispatch.py +57 -0
  56. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/src/hypershell/core/heartbeat.py +62 -8
  57. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/src/hypershell/core/queue.py +1 -1
  58. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/src/hypershell/core/thread.py +19 -2
  59. hypershell-2.9.0a8/src/hypershell/core/topology.py +408 -0
  60. hypershell-2.9.0a8/src/hypershell/core/types.py +147 -0
  61. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/src/hypershell/data/model.py +171 -42
  62. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/src/hypershell/relay/__init__.py +291 -24
  63. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/src/hypershell/relay/site.py +259 -11
  64. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/src/hypershell/relay/store.py +44 -1
  65. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/src/hypershell/relay/upstream.py +157 -42
  66. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/src/hypershell/server.py +139 -28
  67. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/src/hypershell/submit.py +10 -8
  68. hypershell-2.9.0a8/tests/test_auth_variants.py +408 -0
  69. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_autoscale.py +15 -4
  70. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_cluster.py +21 -0
  71. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_cluster_launch.py +101 -4
  72. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_contended_write.py +70 -0
  73. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_dispatch.py +75 -0
  74. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_dispatch_version.py +14 -2
  75. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_relay_fsm.py +41 -1
  76. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_relay_launch.py +92 -3
  77. hypershell-2.9.0a8/tests/test_relay_retire.py +545 -0
  78. hypershell-2.9.0a8/tests/test_relay_topology.py +1020 -0
  79. hypershell-2.9.0a8/tests/test_retire_judge.py +250 -0
  80. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_server.py +29 -0
  81. hypershell-2.9.0a8/tests/test_signal_wake.py +353 -0
  82. hypershell-2.9.0a8/tests/test_size_duration.py +364 -0
  83. hypershell-2.9.0a8/tests/test_topology_judge.py +340 -0
  84. hypershell-2.9.0a8/tests/test_topology_plan.py +962 -0
  85. hypershell-2.9.0a8/tests/test_topology_server.py +621 -0
  86. hypershell-2.9.0a8/tests/test_zone_autoscale.py +775 -0
  87. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_zone_model.py +106 -3
  88. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_zone_postgres.py +27 -2
  89. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/uv.lock +5 -5
  90. hypershell-2.9.0a6/docs/cli/client.rst +0 -18
  91. hypershell-2.9.0a6/docs/cli/cluster.rst +0 -18
  92. hypershell-2.9.0a6/docs/cli/initdb.rst +0 -18
  93. hypershell-2.9.0a6/docs/cli/relay.rst +0 -40
  94. hypershell-2.9.0a6/docs/cli/server.rst +0 -18
  95. hypershell-2.9.0a6/docs/cli/submit.rst +0 -18
  96. hypershell-2.9.0a6/docs/cli/task_search.rst +0 -18
  97. hypershell-2.9.0a6/src/hypershell/core/types.py +0 -118
  98. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/.gitignore +0 -0
  99. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/CODE_OF_CONDUCT.md +0 -0
  100. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/LICENSE +0 -0
  101. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/README.rst +0 -0
  102. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/Makefile +0 -0
  103. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/citation.rst +0 -0
  104. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/client_desc.rst +0 -0
  105. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/client_usage.rst +0 -0
  106. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/cluster_usage.rst +0 -0
  107. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/config_desc.rst +0 -0
  108. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/config_edit_desc.rst +0 -0
  109. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/config_edit_help.rst +0 -0
  110. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/config_edit_usage.rst +0 -0
  111. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/config_get_desc.rst +0 -0
  112. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/config_get_help.rst +0 -0
  113. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/config_get_usage.rst +0 -0
  114. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/config_help.rst +0 -0
  115. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/config_intro.rst +0 -0
  116. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/config_intro_alt.rst +0 -0
  117. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/config_pythonpath.rst +0 -0
  118. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/config_set_desc.rst +0 -0
  119. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/config_set_help.rst +0 -0
  120. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/config_set_usage.rst +0 -0
  121. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/config_site_vars.rst +0 -0
  122. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/config_task_env_alt.rst +0 -0
  123. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/config_usage.rst +0 -0
  124. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/config_which_desc.rst +0 -0
  125. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/config_which_help.rst +0 -0
  126. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/config_which_usage.rst +0 -0
  127. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/database_alt.rst +0 -0
  128. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/desc.rst +0 -0
  129. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/exit_status.rst +0 -0
  130. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/initdb_desc.rst +0 -0
  131. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/initdb_help.rst +0 -0
  132. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/initdb_usage.rst +0 -0
  133. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/license.rst +0 -0
  134. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/relay_usage.rst +0 -0
  135. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/security_alt.rst +0 -0
  136. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/signals.rst +0 -0
  137. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/submit_desc.rst +0 -0
  138. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/submit_usage.rst +0 -0
  139. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/task_groups_alt.rst +0 -0
  140. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/task_info_desc.rst +0 -0
  141. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/task_info_help.rst +0 -0
  142. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/task_info_usage.rst +0 -0
  143. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/task_run_desc.rst +0 -0
  144. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/task_run_help.rst +0 -0
  145. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/task_run_usage.rst +0 -0
  146. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/task_search_desc.rst +0 -0
  147. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/task_search_help.rst +0 -0
  148. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/task_search_usage.rst +0 -0
  149. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/task_submit_desc.rst +0 -0
  150. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/task_submit_help.rst +0 -0
  151. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/task_submit_usage.rst +0 -0
  152. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/task_update_desc.rst +0 -0
  153. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/task_update_help.rst +0 -0
  154. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/task_update_usage.rst +0 -0
  155. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/task_wait_desc.rst +0 -0
  156. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/task_wait_help.rst +0 -0
  157. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/task_wait_usage.rst +0 -0
  158. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/templates_alt.rst +0 -0
  159. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_include/tls_cli_options.rst +0 -0
  160. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_static/custom.css +0 -0
  161. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_static/logo-dark-mode.png +0 -0
  162. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/_static/logo-light-mode.png +0 -0
  163. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/alternatives.rst +0 -0
  164. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/api/index.rst +0 -0
  165. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/cli/config.rst +0 -0
  166. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/cli/config_edit.rst +0 -0
  167. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/cli/config_get.rst +0 -0
  168. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/cli/config_set.rst +0 -0
  169. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/cli/config_which.rst +0 -0
  170. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/cli/index.rst +0 -0
  171. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/cli/task_run.rst +0 -0
  172. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/database.rst +0 -0
  173. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/docs/templates.rst +0 -0
  174. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/share/bash_completion.d/hsx +0 -0
  175. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/src/hypershell/__init__.py +0 -0
  176. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/src/hypershell/core/__init__.py +0 -0
  177. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/src/hypershell/core/exceptions.py +0 -0
  178. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/src/hypershell/core/fsm.py +0 -0
  179. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/src/hypershell/core/logging.py +0 -0
  180. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/src/hypershell/core/platform.py +0 -0
  181. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/src/hypershell/core/pretty_print.py +0 -0
  182. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/src/hypershell/core/reconnect.py +0 -0
  183. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/src/hypershell/core/remote.py +0 -0
  184. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/src/hypershell/core/resource.py +0 -0
  185. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/src/hypershell/core/signal.py +0 -0
  186. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/src/hypershell/core/sys.py +0 -0
  187. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/src/hypershell/core/tag.py +0 -0
  188. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/src/hypershell/core/template.py +0 -0
  189. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/src/hypershell/core/tls.py +0 -0
  190. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/src/hypershell/core/uuid.py +0 -0
  191. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/src/hypershell/data/__init__.py +0 -0
  192. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/src/hypershell/data/core.py +0 -0
  193. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/src/hypershell/data/timescale.py +0 -0
  194. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/src/hypershell/data/upgrade.py +0 -0
  195. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/src/hypershell/task.py +0 -0
  196. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/__init__.py +0 -0
  197. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/bench/bench_queue.py +0 -0
  198. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/cluster/build_archive.sh +0 -0
  199. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/cluster/compare.py +0 -0
  200. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/cluster/drive.sh +0 -0
  201. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/cluster/smoke.sh +0 -0
  202. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/conftest.py +0 -0
  203. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/fixtures/README.md +0 -0
  204. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/fixtures/hypershell-2.8.3.db +0 -0
  205. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/fixtures/make-2.8.3-db.sh +0 -0
  206. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/fixtures/make-legacy-postgres.sh +0 -0
  207. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_cancel.py +0 -0
  208. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_card_info.py +0 -0
  209. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_card_integration.py +0 -0
  210. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_card_render.py +0 -0
  211. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_client.py +0 -0
  212. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_client_request.py +0 -0
  213. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_cluster_compare.py +0 -0
  214. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_completions.py +0 -0
  215. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_contended_recovery.py +0 -0
  216. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_data/__init__.py +0 -0
  217. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_data/test_core.py +0 -0
  218. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_data/test_model.py +0 -0
  219. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_data/test_upgrade.py +0 -0
  220. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_dispatch_staged.py +0 -0
  221. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_dispatch_workload.py +0 -0
  222. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_factory_fsm.py +0 -0
  223. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_group_order.py +0 -0
  224. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_groups.py +0 -0
  225. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_initdb.py +0 -0
  226. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_list.py +0 -0
  227. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_logging.py +0 -0
  228. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_main.py +0 -0
  229. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_meta_status.py +0 -0
  230. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_queue.py +0 -0
  231. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_queue_address_family.py +0 -0
  232. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_queue_gc.py +0 -0
  233. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_queue_limits.py +0 -0
  234. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_queue_start.py +0 -0
  235. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_queue_tls.py +0 -0
  236. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_queue_workload.py +0 -0
  237. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_relay_connector.py +0 -0
  238. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_relay_db.py +0 -0
  239. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_relay_judge.py +0 -0
  240. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_relay_link.py +0 -0
  241. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_relay_outage.py +0 -0
  242. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_relay_return.py +0 -0
  243. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_relay_roster.py +0 -0
  244. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_relay_workload.py +0 -0
  245. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_restart.py +0 -0
  246. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_retry_gate.py +0 -0
  247. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_server_fsm.py +0 -0
  248. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_signal.py +0 -0
  249. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_source.py +0 -0
  250. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_status_label.py +0 -0
  251. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_submit.py +0 -0
  252. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_submit_json.py +0 -0
  253. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_template.py +0 -0
  254. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_timescale.py +0 -0
  255. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_update.py +0 -0
  256. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_upgrade_cli.py +0 -0
  257. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_upgrade_postgres.py +0 -0
  258. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_writeback.py +0 -0
  259. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_writeback_postgres.py +0 -0
  260. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_writeback_statement.py +0 -0
  261. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_zone_dispatch.py +0 -0
  262. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_zone_display.py +0 -0
  263. {hypershell-2.9.0a6 → hypershell-2.9.0a8}/tests/test_zone_workload.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: hypershell
3
- Version: 2.9.0a6
3
+ Version: 2.9.0a8
4
4
  Summary: A cross-platform, high-throughput computing utility for processing shell commands over a distributed, asynchronous queue.
5
5
  Project-URL: Homepage, https://hypershell.org
6
6
  Project-URL: Documentation, https://hypershell.readthedocs.io
@@ -21,7 +21,7 @@ Classifier: Programming Language :: Python :: 3.13
21
21
  Classifier: Programming Language :: Python :: 3.14
22
22
  Classifier: Topic :: Utilities
23
23
  Requires-Python: >=3.11
24
- Requires-Dist: cmdkit[toml]>=2.7.7
24
+ Requires-Dist: cmdkit[toml]>=2.8.0
25
25
  Requires-Dist: cryptography>=3.4
26
26
  Requires-Dist: paramiko>=3.4.0
27
27
  Requires-Dist: psutil>=7.0.0
@@ -105,6 +105,10 @@ Options
105
105
  The timeout counts from when the client starts, after any ``--delay-start``, so the delay
106
106
  does not count toward it.
107
107
 
108
+ Specify a number of seconds, units ``d``, ``h``, ``m`` and ``s`` in that order, whole or
109
+ fractional (e.g., ``90m``, ``1h30m``, ``1.5h``, ``1d12h``), or a Slurm time ``MM:SS``,
110
+ ``HH:MM:SS``, ``D-HH``, ``D-HH:MM`` or ``D-HH:MM:SS`` (e.g., ``1:30:00``).
111
+
108
112
 
109
113
  ``-W``, ``--task-timeout`` *SEC*
110
114
  Task-level walltime limit (default: none).
@@ -112,6 +116,10 @@ Options
112
116
  Executors will send a progression of SIGINT, SIGTERM, and SIGKILL.
113
117
  If the process still persists the executor itself will shutdown.
114
118
 
119
+ Specify a number of seconds, units ``d``, ``h``, ``m`` and ``s`` in that order, whole or
120
+ fractional (e.g., ``90m``, ``1h30m``, ``1.5h``, ``1d12h``), or a Slurm time ``MM:SS``,
121
+ ``HH:MM:SS``, ``D-HH``, ``D-HH:MM`` or ``D-HH:MM:SS`` (e.g., ``1:30:00``).
122
+
115
123
  ``-C``, ``--client-cores`` *NUM*
116
124
  Limit available cores for client (default: all cores).
117
125
 
@@ -125,8 +133,10 @@ Options
125
133
  Limit available memory for client (default: all memory).
126
134
 
127
135
  Sets an upper bound on the amount of memory that the client can use.
128
- Specify memory size with units (e.g., '16GB', '4096MB'). This allows running
129
- multiple clients on the same node by partitioning resources.
136
+ Specify memory size in bytes or with a unit ``K``, ``M``, ``G`` or ``T``, alone or followed
137
+ by ``B`` or ``iB``, in any case (e.g., '16G', '4096MB'). Each unit is a power of 1024, so
138
+ ``16G``, ``16GB`` and ``16GiB`` are the same size. This allows running multiple clients on
139
+ the same node by partitioning resources.
130
140
 
131
141
  ``--monitor``
132
142
  Enable resource monitoring for tasks.
@@ -29,6 +29,8 @@ fast at scale; for very large workflows, a one-time ``submit`` followed by a bar
29
29
  file re-read) is cheaper than re-feeding the *FILE* each run.
30
30
 
31
31
  Use ``--autoscaling`` with either *fixed* or *dynamic* to run a persistent, elastically scalable
32
- cluster using an external ``--launcher`` to bring up clients as needed.
32
+ cluster using an external ``--launcher`` to bring up clients as needed. Clients are scaled per zone:
33
+ each zone with tasks in the active group gets its own clients, and the launcher is told which zone
34
+ each one is for.
33
35
 
34
36
  Use ``hsx`` in place of ``hs cluster``.
@@ -22,6 +22,11 @@ Modes
22
22
  case you would specify ``--launcher=srun``; however, the *ARGS* are not merely the executable
23
23
  but the full listing, e.g., ``--launcher='srun --mpi=pmi2'``.
24
24
 
25
+ With ``--autoscaling``, each launch names the zone of the client it starts: ``{zone}`` in
26
+ *ARGS* is replaced by the zone's name (``default`` for the default zone), and the launched
27
+ process has the name in its ``HYPERSHELL_ZONE`` environment variable. The client's own
28
+ ``--template`` is never changed. See ``--autoscaling`` for an example.
29
+
25
30
  Options
26
31
  ^^^^^^^
27
32
 
@@ -117,12 +122,17 @@ Options
117
122
  bundles directly to the queue.
118
123
 
119
124
  ``--zone`` *NAME*
120
- Zone of the submitted tasks and of every client the cluster launches (default: none).
125
+ Zone of the submitted tasks and of every client the cluster launches; the own zone with
126
+ ``--autoscaling`` (default: none).
121
127
 
122
128
  The tasks read from *FILE* (or ``--from-json``) are placed in this zone, and each client is
123
129
  launched with the same ``--zone``, so it runs them. Zones are recorded in the database, so
124
130
  ``--zone`` cannot be used with ``--no-db``.
125
131
 
132
+ With ``--autoscaling``, this is the cluster's own zone: the one that ``--init-size`` and
133
+ ``--min-size`` apply to. Any other zone with tasks in the active *task group* gets clients
134
+ of its own, each launched with ``--zone`` set to that zone.
135
+
126
136
  ``--initdb``
127
137
  Auto-initialize database.
128
138
 
@@ -252,12 +262,22 @@ Options
252
262
 
253
263
  This feature allows for gracefully scaling down a cluster when task throughput subsides.
254
264
 
265
+ Specify a number of seconds, units ``d``, ``h``, ``m`` and ``s`` in that order, whole or
266
+ fractional (e.g., ``90m``, ``1h30m``, ``1.5h``, ``1d12h``), or a Slurm time ``MM:SS``,
267
+ ``HH:MM:SS``, ``D-HH``, ``D-HH:MM`` or ``D-HH:MM:SS`` (e.g., ``1:30:00``).
268
+
255
269
  ``-W``, ``--task-timeout`` *SEC*
256
270
  Task-level walltime limit (default: none).
257
271
 
258
272
  Executors will send a progression of SIGINT, SIGTERM, and SIGKILL.
259
273
  If the process still persists the executor itself will shutdown.
260
274
 
275
+ Specify a number of seconds, units ``d``, ``h``, ``m`` and ``s`` in that order, whole or
276
+ fractional (e.g., ``90m``, ``1h30m``, ``1.5h``, ``1d12h``), or a Slurm time ``MM:SS``,
277
+ ``HH:MM:SS``, ``D-HH``, ``D-HH:MM`` or ``D-HH:MM:SS`` (e.g., ``1:30:00``).
278
+ Individual tasks can override this with inline comments, which take the same forms (e.g.,
279
+ ``#HYPERSHELL: timeout:1:30:00``).
280
+
261
281
  ``-c``, ``--cores`` *NUM*
262
282
  Number of CPU cores required per task (default: none).
263
283
 
@@ -267,9 +287,12 @@ Options
267
287
  ``-m``, ``--memory`` *MEM*
268
288
  Amount of memory required per task (default: none).
269
289
 
270
- Specify memory size with units (e.g., '4GB', '512MB'). Tasks will only be
271
- executed when the required memory is available. Used with resource-aware
272
- scheduling and backfill.
290
+ Specify memory size in bytes or with a unit ``K``, ``M``, ``G`` or ``T``, alone or followed
291
+ by ``B`` or ``iB``, in any case (e.g., '4GB', '512M'). Each unit is a power of 1024, so
292
+ ``16G``, ``16GB`` and ``16GiB`` are the same size. Individual tasks can override this with
293
+ inline comments, which take the same forms (e.g., ``#HYPERSHELL: memory:8G``). Tasks will
294
+ only be executed when the required memory is available. Used with resource-aware scheduling
295
+ and backfill.
273
296
 
274
297
  ``-C``, ``--client-cores`` *NUM*
275
298
  Limit available cores per client (default: all cores).
@@ -284,8 +307,10 @@ Options
284
307
  Limit available memory per client (default: all memory).
285
308
 
286
309
  Sets an upper bound on the amount of memory that each client can use.
287
- Specify memory size with units (e.g., '16GB', '4096MB'). This allows running
288
- multiple clients on the same node by partitioning resources.
310
+ Specify memory size in bytes or with a unit ``K``, ``M``, ``G`` or ``T``, alone or followed
311
+ by ``B`` or ``iB``, in any case (e.g., '16G', '4096MB'). Each unit is a power of 1024, so
312
+ ``16G``, ``16GB`` and ``16GiB`` are the same size. This allows running multiple clients on
313
+ the same node by partitioning resources.
289
314
 
290
315
  ``--monitor``
291
316
  Enable resource monitoring for tasks.
@@ -309,7 +334,7 @@ Options
309
334
  See also ``--task-timeout``.
310
335
 
311
336
  ``-A``, ``--autoscaling`` [*MODE*]
312
- Enable autoscaling (default: disabled). Used with ``--launcher``.
337
+ Enable autoscaling per zone (default: disabled). Used with ``--launcher``.
313
338
 
314
339
  Specifying this option on its own triggers the use of the autoscaler, with the default
315
340
  *policy* or the configured policy. The *policy* can be specified directly here
@@ -327,6 +352,29 @@ Options
327
352
  ``--max-size`` depending on the observed *task pressure* given the specified scaling
328
353
  ``--factor``.
329
354
 
355
+ Clients are scaled per zone. Each zone with tasks in the active *task group* has a fleet of
356
+ its own, sized by the same policy and the same values of ``--factor`` and ``--max-size``,
357
+ with its own task pressure. ``--init-size`` and ``--min-size`` apply only to the cluster's
358
+ own zone (``--zone``, else the default zone); every other zone gets clients only while it
359
+ has work in the active group, so a zone whose tasks wait in a later group gets none yet.
360
+ Each ``--period``, at most one client is added per zone, so several zones can each add one
361
+ at once. Clients of a zone whose work is done leave by ``--timeout`` as usual.
362
+
363
+ Each launch names its zone to the launcher, as ``{zone}`` in the ``--launcher`` arguments
364
+ and as ``HYPERSHELL_ZONE`` in its environment, so one launcher can send the clients of each
365
+ zone to the resource that serves it. When partitions are named after zones, the launcher
366
+ alone can do it (``--launcher='srun -p {zone} -n1'``). Otherwise a small script given as
367
+ ``--launcher='sh launch.sh'`` can choose, for example::
368
+
369
+ #!/bin/sh
370
+ # Start one client on the partition that serves its zone.
371
+ case "$HYPERSHELL_ZONE" in
372
+ gpu) partition=gpu ;;
373
+ himem) partition=himem ;;
374
+ *) partition=cpu ;;
375
+ esac
376
+ exec srun -p "$partition" -n1 "$@"
377
+
330
378
  See also ``--factor``, ``--period``, ``--init-size``, ``--min-size``, and ``--max-size``.
331
379
 
332
380
  ``-F``, ``--factor`` *VALUE*
@@ -68,9 +68,10 @@
68
68
 
69
69
  ``.rotate``
70
70
  Rotation policy (default: ``never``). Either a size threshold such as ``512MB``
71
- (units ``KB``/``MB``/``GB``/``TB``, powers of 1024; a bare number is bytes) or a
72
- cron expression such as ``@daily``, ``@midnight``, or ``0 1 * * 0`` (requires the
73
- ``croniter`` package). Sending ``SIGHUP`` rotates on demand.
71
+ or ``2G`` (units ``K``/``M``/``G``/``T``, alone or followed by ``B`` or ``iB``,
72
+ powers of 1024; a bare number is bytes) or a cron expression such as ``@daily``,
73
+ ``@midnight``, or ``0 1 * * 0`` (requires the ``croniter`` package). A cron
74
+ expression may begin with a digit. Sending ``SIGHUP`` rotates on demand.
74
75
 
75
76
  ``.compress``
76
77
  Compression for rotated files (default: none). One of ``gzip``, ``bzip``,
@@ -99,6 +100,11 @@
99
100
  (requires the ``uuid7`` extra; see the TimescaleDB section of :ref:`database <database>`).
100
101
  Support for other providers may be considered in the future.
101
102
 
103
+ .. only:: html
104
+
105
+ .. versionchanged:: 2.9.0
106
+ :pr:`71`: the ``timescale`` provider.
107
+
102
108
  ``.file``
103
109
  Only applicable for SQLite provider.
104
110
  SQLite does not understand any other connection detail.
@@ -149,6 +155,11 @@
149
155
  (``"4 weeks"``). For example ``timescale = { chunk_interval = "1 day" }``.
150
156
  See the TimescaleDB section of :ref:`database <database>`.
151
157
 
158
+ .. only:: html
159
+
160
+ .. versionadded:: 2.9.0
161
+ :pr:`71`
162
+
152
163
  ``*``
153
164
  Any additional arguments are forwarded to the provider, e.g., ``encoding = 'utf-8'``.
154
165
 
@@ -209,6 +220,11 @@
209
220
 
210
221
  See also ``-b``/``--bundlesize`` command-line option.
211
222
 
223
+ .. only:: html
224
+
225
+ .. versionchanged:: 2.9.0
226
+ :pr:`78`: the size for a client that advertises none.
227
+
212
228
  ``.bundlemax``
213
229
  Most tasks the server hands a client in one reply (default: `1000`).
214
230
 
@@ -216,6 +232,11 @@
216
232
  than this many tasks, whatever a client asks for. The effective cap is never smaller than
217
233
  the server's own ``.bundlesize``. There is no command-line option.
218
234
 
235
+ .. only:: html
236
+
237
+ .. versionadded:: 2.9.0
238
+ :pr:`78`
239
+
219
240
  ``.attempts``
220
241
  Attempts for auto-retry on failed tasks (default: `1`).
221
242
 
@@ -346,6 +367,8 @@
346
367
  Timeout in seconds for client. Automatically shutdown if no tasks received (default: never).
347
368
 
348
369
  This feature allows for gracefully scaling down a cluster when task throughput subsides.
370
+ A string takes the same forms as ``-T``/``--timeout``: units ``d``, ``h``, ``m`` and
371
+ ``s`` (e.g., ``"1h30m"``, ``"1.5h"``) or a Slurm time (e.g., ``"1:30:00"``, ``"1-12"``).
349
372
 
350
373
  ``.cores``
351
374
  Client-level limit on CPU cores available for running tasks (default: all available).
@@ -359,7 +382,8 @@
359
382
  Client-level limit on memory (in bytes) available for running tasks (default: all available).
360
383
 
361
384
  A value of ``0`` means unconstrained. Set a lower value to partition a node's memory
362
- between multiple clients.
385
+ between multiple clients. A string may carry a unit ``K``, ``M``, ``G`` or ``T``, alone
386
+ or followed by ``B`` or ``iB``, each a power of 1024 (e.g., ``"16G"``).
363
387
 
364
388
  See also ``-M``/``--client-memory`` command-line option.
365
389
 
@@ -388,6 +412,11 @@
388
412
 
389
413
  See also ``-b``/``--bundlesize`` command-line option.
390
414
 
415
+ .. only:: html
416
+
417
+ .. versionchanged:: 2.9.0
418
+ :pr:`78`: a client advertises it as the size it requests.
419
+
391
420
  ``.bundlewait``
392
421
  Seconds to wait before flushing tasks (default: `5`).
393
422
 
@@ -414,16 +443,21 @@
414
443
  ``.memory``
415
444
  Default memory (in bytes) required per task (default: unconstrained).
416
445
 
417
- A value of ``0`` means unconstrained. Used with resource-aware scheduling and backfill;
418
- individual tasks may override this inline (e.g., ``# HYPERSHELL: memory:8GB``).
446
+ A value of ``0`` means unconstrained. A string may carry a unit ``K``, ``M``, ``G`` or
447
+ ``T``, alone or followed by ``B`` or ``iB``, each a power of 1024 (e.g., ``"16G"``). Used
448
+ with resource-aware scheduling and backfill; individual tasks may override this inline in
449
+ the same forms (e.g., ``# HYPERSHELL: memory:8G``).
419
450
 
420
451
  See also ``-m``/``--memory`` command-line option.
421
452
 
422
453
  ``.timeout``
423
- Task-level walltime limit (default: none).
454
+ Task-level walltime limit in seconds (default: none).
424
455
 
425
456
  Executors will send a progression of SIGINT, SIGTERM, and SIGKILL.
426
457
  If the process still persists the executor itself will shutdown.
458
+ A string takes the same forms as ``-W``: units ``d``, ``h``, ``m`` and ``s`` (e.g.,
459
+ ``"1h30m"``, ``"1.5h"``) or a Slurm time (e.g., ``"1:30:00"``, ``"1-12"``); individual
460
+ tasks may override this inline in the same forms (e.g., ``# HYPERSHELL: timeout:1h30m``).
427
461
 
428
462
  ``.signalwait``
429
463
  Wait period in seconds between signal escalation on task cancellation (default: 10).
@@ -464,6 +498,12 @@
464
498
 
465
499
  See also ``.factor``, ``.period``, ``.size.init``, ``.size.min``, and ``.size.max``.
466
500
 
501
+ A server autoscaling with relay sites (``hs server --autoscaling``) applies the policy to
502
+ each zone's demand alone: under `fixed`, a zone with work gets one client when none runs,
503
+ and its size otherwise comes from the relays' ``min`` and ``init``; under `dynamic`, a zone
504
+ grows by one client per check while its pressure is high, up to the sum of its live sites'
505
+ ``max``.
506
+
467
507
  ``.factor``
468
508
  Scaling factor (default: 1).
469
509
 
@@ -496,6 +536,49 @@
496
536
  an MPI or SLURM command (e.g., ``srun``) to bring up each client through your resource
497
537
  manager. Counterpart to the cluster ``--launcher`` option used with ``--autoscaling``.
498
538
 
539
+ Each launch names the zone of its client: ``{zone}`` in the launcher is replaced by the
540
+ zone's name (``default`` for the default zone), and the launched process has the name
541
+ in its ``HYPERSHELL_ZONE`` environment variable.
542
+
543
+ .. only:: html
544
+
545
+ .. versionchanged:: 2.9.0
546
+ :pr:`99`: ``{zone}`` and ``HYPERSHELL_ZONE``.
547
+
548
+ A server autoscaling with relay sites launches nothing and ignores this setting: each
549
+ relay launches its own site clients with its own launcher.
550
+
551
+ ``.distribution``
552
+ How a zone's clients are split over the relay sites that serve it (default: `spread`).
553
+
554
+ Only a server autoscaling with relay sites (``hs server --autoscaling``) reads it. With
555
+ `spread`, each new client of a zone goes to the live site serving it that runs the
556
+ fewest, as peers. With `fill`, each new client goes to the first site in preference
557
+ order that has room below its ``max``, so a site is saturated before the next one gets
558
+ any: use it to prefer the cheaper site. Every site stays within the ``min``/``max`` its
559
+ relay advertises for the zone.
560
+
561
+ Its environment form is ``HYPERSHELL_AUTOSCALE_DISTRIBUTION``.
562
+
563
+ .. only:: html
564
+
565
+ .. versionadded:: 2.9.0
566
+ :pr:`100`
567
+
568
+ ``.sites``
569
+ Preferred site order for the `fill` distribution (default: none).
570
+
571
+ A list of site names, or one comma-separated string (the environment form,
572
+ ``HYPERSHELL_AUTOSCALE_SITES=east,west``). Under `fill`, the listed live sites come first in
573
+ the listed order, and live sites not listed follow in the order they first registered.
574
+ Any relay connected with the server's key takes part whether or not it is listed, and
575
+ `spread` ignores the list.
576
+
577
+ .. only:: html
578
+
579
+ .. versionadded:: 2.9.0
580
+ :pr:`100`
581
+
499
582
  ``[size]``
500
583
  ``.init``
501
584
  Initial size of cluster (default: 1).
@@ -517,9 +600,17 @@
517
600
  For a *dynamic* autoscaling policy, this sets an upper limit on the number of launched
518
601
  clients. When this number is reached, scaling stops regardless of task pressure.
519
602
 
603
+ A server autoscaling with relay sites ignores ``[size]``: each relay advertises the
604
+ ``min``, ``max`` and ``init`` of each zone it serves, and the server plans within those.
605
+
520
606
  ``[relay]``
521
607
  Section for the `relay` workflow, which connects a site to an upstream *server*.
522
608
 
609
+ .. only:: html
610
+
611
+ .. versionadded:: 2.9.0
612
+ :pr:`82`
613
+
523
614
  ``.database``
524
615
  Path to the relay database (default: <lib>/relay/<host>.db).
525
616
 
@@ -563,8 +654,9 @@
563
654
  Zone or zones the relay serves (default: none, the default zone).
564
655
 
565
656
  One zone name, a list of names, or one table per zone, ``[relay.zone.NAME]``, which may
566
- give that zone's own ``launcher``, ``launcher_args`` and ``size`` (each in place of the
567
- relay's, for that zone's *clients* only); an empty table serves the zone with the relay's.
657
+ give that zone's own ``launcher``, ``launcher_args``, ``size``, ``min``, ``max`` and
658
+ ``init`` (each in place of the relay's, for that zone's *clients* only); an empty table
659
+ serves the zone with the relay's.
568
660
  Upstream the relay is one *client* per zone, each with its own identity; at the site it
569
661
  keeps one fleet of *clients* per zone, all served by the relay-local *server*. The first
570
662
  zone's identity lists the site's *clients* upstream.
@@ -575,6 +667,7 @@
575
667
 
576
668
  [relay.zone.gpu]
577
669
  size = 2
670
+ max = 4
578
671
  launcher = "srun"
579
672
  launcher_args = "--gres=gpu:1"
580
673
 
@@ -588,8 +681,45 @@
588
681
  ``.size``
589
682
  Number of *clients* the relay keeps launched at its site (default: `1`, at least `1`).
590
683
 
684
+ Against an upstream *server* autoscaling with relay sites it is the default ``.max``.
591
685
  See also ``-N``, ``--size`` command-line option.
592
686
 
687
+ ``.min``
688
+ Fewest *clients* of each zone an upstream topology assigns this site (default: `0`).
689
+
690
+ .. only:: html
691
+
692
+ .. versionadded:: 2.9.0
693
+ :pr:`100`
694
+
695
+ Held even while the zone's tasks wait in a later *task group*. A zone's own
696
+ ``[relay.zone.NAME]`` table may set its own. Without a topology, a zone's fleet keeps at
697
+ least this many *clients* launched (at least `1`, by default the size). Each zone
698
+ advertises its bounds upstream; see :ref:`Topology <cli_relay_topology>`.
699
+
700
+ ``.max``
701
+ Most *clients* of each zone an upstream topology assigns this site (default: the size).
702
+
703
+ .. only:: html
704
+
705
+ .. versionadded:: 2.9.0
706
+ :pr:`100`
707
+
708
+ Lowering it never ends a running *client*: the zone launches no more, and its *clients*
709
+ exit when idle. A zone's own ``[relay.zone.NAME]`` table may set its own.
710
+
711
+ ``.init``
712
+ *Clients* of each zone an upstream topology assigns this site when the relay starts
713
+ (default: ``.min``).
714
+
715
+ .. only:: html
716
+
717
+ .. versionadded:: 2.9.0
718
+ :pr:`100`
719
+
720
+ Without a topology, the *clients* each zone's fleet starts with (by default the size).
721
+ Bounds must satisfy ``min <= init <= max``, with ``max`` at least `1`.
722
+
593
723
  ``.launcher``
594
724
  Command prefix used to launch each *client* at the site (default: none).
595
725
 
@@ -65,6 +65,9 @@ A few common environment variables are defined for every task.
65
65
  ``TASK_SLOT_COUNT``
66
66
  Number of concurrent executors on the client (``N``). Defaults to ``1``.
67
67
 
68
+ .. versionadded:: 2.9.0
69
+ ``TASK_SLOT`` and ``TASK_SLOT_COUNT`` (:pr:`52`).
70
+
68
71
  |
69
72
 
70
73
  Any user-defined tags are included as environment variables as well with
@@ -97,11 +97,16 @@ Individual pragmas can also be set from the command line:
97
97
 
98
98
  -------------------
99
99
 
100
+ .. _database_initialization:
101
+
100
102
  Initialization
101
103
  --------------
102
104
 
103
105
  |
104
106
 
107
+ .. versionchanged:: 2.9.0
108
+ :pr:`69`: a database from an earlier release is upgraded in place on first use.
109
+
105
110
  SQLite is automatically initialized upon opening the connection but
106
111
  Postgres must be explicitly initialized via ``hs initdb`` or at launch with
107
112
  the ``--initdb`` command-line option.
@@ -129,11 +134,16 @@ See also the :ref:`command-line interface <cli_initdb>` for ``hs initdb``.
129
134
 
130
135
  -------------------
131
136
 
137
+ .. _database_relay:
138
+
132
139
  Relay Database
133
140
  --------------
134
141
 
135
142
  |
136
143
 
144
+ .. versionadded:: 2.9.0
145
+ :pr:`82`
146
+
137
147
  A relay (``hs relay``) keeps its own database, apart from the one configured here. It is always a
138
148
  private SQLite file, whatever ``[database]`` names (PostgreSQL included), and the configured database
139
149
  is never opened by a relay process. It holds the tasks the relay has received and not yet finished,
@@ -158,11 +168,16 @@ relay database (``<file>.site.toml``, readable by its owner only), removed when
158
168
 
159
169
  -------------------
160
170
 
171
+ .. _database_timescale:
172
+
161
173
  TimescaleDB
162
174
  -----------
163
175
 
164
176
  |
165
177
 
178
+ .. versionadded:: 2.9.0
179
+ :pr:`71`
180
+
166
181
  `TimescaleDB <https://github.com/timescale/timescaledb>`_ is a PostgreSQL extension for
167
182
  time-series data. It splits a large table into *chunks* by time (a *hypertable*) and can convert
168
183
  older chunks into a compressed, column-oriented *columnstore*. A long-lived *HyperShell* database
@@ -42,7 +42,14 @@ one ``[relay.zone.NAME]`` table per zone). Upstream it is then one *client* per
42
42
  own identity, all over the same connection: it takes the zones in turn, and asks for each only as
43
43
  much as that zone's own *clients* at the site have room for. At the site it keeps one fleet of
44
44
  *clients* per zone, launched alike but each serving its own zone, with that zone's own launcher,
45
- launcher arguments and size if its table gives them; the one relay-local *server* serves them all.
45
+ launcher arguments, size and client bounds if its table gives them; the one relay-local *server*
46
+ serves them all. Every launch names its zone to the launcher: ``{zone}`` in the launcher or its
47
+ arguments is replaced by the zone's name (``default`` for the default zone), and the launched process
48
+ has it in ``HYPERSHELL_ZONE``. Each zone advertises its client bounds upstream; against an upstream
49
+ *server* autoscaling with relay sites, each fleet follows the topology it publishes (see
50
+ :ref:`Topology <cli_relay_topology>`). A relay that a newer relay at its site supersedes asks for no
51
+ more work, launches no *client*, hands back the tasks no *client* has started, lets its *clients*
52
+ finish, and exits.
46
53
  The first zone's identity lists every *client* at the site upstream. Each identity sends its own
47
54
  heartbeat, so if the relay fails, the upstream *server* evicts each one and puts back what each
48
55
  held, in every zone.
@@ -29,14 +29,17 @@ Options
29
29
  Number of *clients* the relay keeps launched at its site (default: 1).
30
30
 
31
31
  A *client* that exits is launched again. The size must be at least 1: with no *client* at the
32
- site the relay would never ask upstream for work. See also ``relay.size``.
32
+ site the relay would never ask upstream for work. Against an upstream *server* autoscaling with
33
+ relay sites, the size is instead the default ``max`` each zone advertises (see ``relay.max``),
34
+ and *clients* are launched as the published topology asks. See also ``relay.size``.
33
35
 
34
36
  ``--launcher`` *CMD*
35
37
  Command prefix used to launch each *client* at the site (default: none).
36
38
 
37
39
  With none, *clients* run directly on the relay's host. Otherwise each is launched as
38
- ``CMD [ARGS...] hyper-shell client ...`` (e.g., ``srun``). The *clients* connect back to the
39
- relay by its host name. The launcher must pass the environment through: each *client*
40
+ ``CMD [ARGS...] hyper-shell client ...`` (e.g., ``srun``). A ``{zone}`` in the launcher or
41
+ its arguments is replaced by the zone the *client* serves, and the launched process has it in
42
+ ``HYPERSHELL_ZONE``. The *clients* connect back to the relay by its host name. The launcher must pass the environment through: each *client*
40
43
  receives the site key there (``HYPERSHELL_SERVER_AUTH``), never on its command line.
41
44
  See also ``relay.launcher``.
42
45
 
@@ -12,3 +12,8 @@ for tasks and re-submit them if their previous number of attempts is less.
12
12
  Tasks are bundled for each client at the size it asks for, or at the server's ``-b``/``--bundlesize``
13
13
  when it asks for none. By default the bundle size is one, meaning that at small scales there is
14
14
  greater concurrency.
15
+
16
+ With ``--autoscaling``, the server schedules forever and launches nothing. Relays connected with its
17
+ key advertise the zones they serve and each zone's ``min``, ``max`` and ``init`` clients, and the server
18
+ publishes how many clients each relay should run in each zone, for the relay to launch with its own
19
+ launcher (see :ref:`autoscaling with relay sites <cli_server_sites>`).
@@ -86,8 +86,10 @@ Options
86
86
 
87
87
  When an input *FILE* is provided, a `submit` thread is launched to read and submit tasks.
88
88
  This option sets the default memory requirement for all submitted tasks.
89
- Specify memory size with units (e.g., '4GB', '512MB'). Individual tasks can override this
90
- with inline comments (e.g., ``#HYPERSHELL: memory:8GB``).
89
+ Specify memory size in bytes or with a unit ``K``, ``M``, ``G`` or ``T``, alone or followed
90
+ by ``B`` or ``iB``, in any case (e.g., '4GB', '512M'). Each unit is a power of 1024, so
91
+ ``16G``, ``16GB`` and ``16GiB`` are the same size. Individual tasks can override this with
92
+ inline comments, which take the same forms (e.g., ``#HYPERSHELL: memory:8G``).
91
93
 
92
94
  See also ``--task-cores`` and ``--task-timeout``.
93
95
 
@@ -96,7 +98,12 @@ Options
96
98
 
97
99
  When an input *FILE* is provided, a `submit` thread is launched to read and submit tasks.
98
100
  This option sets the default timeout for all submitted tasks. Individual
99
- tasks can override this with inline comments (e.g., ``#HYPERSHELL: timeout:3600``).
101
+ tasks can override this with inline comments, which take the same forms (e.g.,
102
+ ``#HYPERSHELL: timeout:3600`` or ``#HYPERSHELL: timeout:1:30:00``).
103
+
104
+ Specify a number of seconds, units ``d``, ``h``, ``m`` and ``s`` in that order, whole or
105
+ fractional (e.g., ``90m``, ``1h30m``, ``1.5h``, ``1d12h``), or a Slurm time ``MM:SS``,
106
+ ``HH:MM:SS``, ``D-HH``, ``D-HH:MM`` or ``D-HH:MM:SS`` (e.g., ``1:30:00``).
100
107
 
101
108
  See also ``--task-cores`` and ``--task-memory``.
102
109
 
@@ -144,6 +151,37 @@ Options
144
151
 
145
152
  Conflicts with ``--no-db`` and mutually exclusive to ``--forever``.
146
153
 
154
+ ``-A``, ``--autoscaling`` [*MODE*]
155
+ Publish client targets for relay sites (default: disabled).
156
+
157
+ The server schedules forever (as with ``--forever``) and launches nothing itself. Each relay
158
+ connected with the server's key advertises the zones it serves and, for each, its ``min``,
159
+ ``max`` and ``init`` clients. Each ``--period`` the server computes each zone's demand from
160
+ its tasks in the active *task group*, splits it over the live sites that serve the zone by
161
+ ``autoscale.distribution`` (*spread* or *fill*), and publishes the result, which each relay
162
+ fetches and launches with its own launcher.
163
+
164
+ The *policy* can be specified directly here as either *fixed* or *dynamic* (e.g.,
165
+ ``--autoscaling=dynamic``); the default is the configured ``autoscale.policy``. Under *fixed*,
166
+ a zone with work gets one client when none runs, and otherwise keeps the floor its relays
167
+ advertise. Under *dynamic*, a zone grows by one client per check while its task pressure is
168
+ high, up to the sum of its sites' ``max``. Clients leave only by their idle timeout.
169
+
170
+ Conflicts with `FILE`, ``--restart``, ``--no-db`` and ``--no-confirm``.
171
+
172
+ See also ``--factor`` and ``--period``.
173
+
174
+ ``-F``, ``--factor`` *VALUE*
175
+ Scaling factor (default: 1).
176
+
177
+ The dimensionless multiple of the average task duration that ``--autoscaling=dynamic`` compares
178
+ each zone's estimated time to completion against (its *task pressure*), as for the `cluster`.
179
+
180
+ ``-P``, ``--period`` *SEC*
181
+ Scaling period in seconds (default: 60).
182
+
183
+ The server waits this long between checks and publishes a new topology only when it changes.
184
+
147
185
  ``--print``
148
186
  Print failed task args to <stdout>.
149
187
 
@@ -2,3 +2,4 @@
2
2
  ``[-b NUM]`` ``[-w SEC]`` ``[-r NUM [--eager]]`` ``[-c NUM]`` ``[-m MEM]`` ``[-W SEC]``
3
3
  ``[-H ADDR]`` ``[-p PORT]`` ``[-k KEY]`` ``[-Q NUM]`` ``[--no-db [--no-confirm] | --initdb]`` ``[--print | -f PATH]``
4
4
  ``[--no-tls | [--tls-ca PATH] [--tls-cert PATH] [--tls-key PATH]]``
5
+ ``[--autoscaling [MODE] [-F VALUE] [-P SEC]]``
@@ -101,15 +101,22 @@ Options
101
101
  ``-m``, ``--memory`` *MEM*
102
102
  Amount of memory required per task (default: none).
103
103
 
104
- Sets the default memory requirement for all submitted tasks. Specify memory size with
105
- units (e.g., '4GB', '512MB'). Individual tasks can override this with inline comments
106
- (e.g., ``#HYPERSHELL: memory:8GB``).
104
+ Sets the default memory requirement for all submitted tasks. Specify memory size in bytes
105
+ or with a unit ``K``, ``M``, ``G`` or ``T``, alone or followed by ``B`` or ``iB``, in any
106
+ case (e.g., '4GB', '512M'). Each unit is a power of 1024, so ``16G``, ``16GB`` and ``16GiB``
107
+ are the same size. Individual tasks can override this with inline comments, which take the
108
+ same forms (e.g., ``#HYPERSHELL: memory:8G``).
107
109
 
108
110
  ``-W``, ``--timeout`` *SEC*
109
111
  Task-level walltime limit in seconds (default: none).
110
112
 
111
113
  Sets the default timeout for all submitted tasks. Individual tasks can override this
112
- with inline comments (e.g., ``#HYPERSHELL: timeout:3600``).
114
+ with inline comments, which take the same forms (e.g., ``#HYPERSHELL: timeout:3600`` or
115
+ ``#HYPERSHELL: timeout:1:30:00``).
116
+
117
+ Specify a number of seconds, units ``d``, ``h``, ``m`` and ``s`` in that order, whole or
118
+ fractional (e.g., ``90m``, ``1h30m``, ``1.5h``, ``1d12h``), or a Slurm time ``MM:SS``,
119
+ ``HH:MM:SS``, ``D-HH``, ``D-HH:MM`` or ``D-HH:MM:SS`` (e.g., ``1:30:00``).
113
120
 
114
121
  ``-g``, ``--group`` *NUM*
115
122
  Task group for dependency management (default: 0).