hypershell 2.8.2__tar.gz → 2.9.0a1__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.
- {hypershell-2.8.2 → hypershell-2.9.0a1}/.gitignore +3 -3
- {hypershell-2.8.2 → hypershell-2.9.0a1}/PKG-INFO +1 -1
- hypershell-2.9.0a1/docs/_include/cluster_desc.rst +34 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/cluster_help.rst +42 -11
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/cluster_usage.rst +1 -1
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/config_task_env.rst +8 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/config_task_env_alt.rst +8 -0
- hypershell-2.9.0a1/docs/_include/submit_desc.rst +41 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/submit_help.rst +27 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/submit_usage.rst +2 -2
- hypershell-2.9.0a1/docs/_include/task_search_desc.rst +18 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/task_search_help.rst +19 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/task_update_help.rst +17 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/templates.rst +55 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/templates_alt.rst +43 -0
- hypershell-2.9.0a1/docs/alternatives.rst +864 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/getting_started.rst +35 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/index.rst +1 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/install.rst +28 -0
- hypershell-2.9.0a1/docs/roadmap.rst +53 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/security.rst +5 -4
- {hypershell-2.8.2 → hypershell-2.9.0a1}/pyproject.toml +1 -1
- {hypershell-2.8.2 → hypershell-2.9.0a1}/share/bash_completion.d/hs +17 -9
- {hypershell-2.8.2 → hypershell-2.9.0a1}/share/man/man1/hs.1 +207 -12
- {hypershell-2.8.2 → hypershell-2.9.0a1}/share/man/man1/hsx.1 +207 -12
- {hypershell-2.8.2 → hypershell-2.9.0a1}/share/man/man1/hyper-shell.1 +207 -12
- {hypershell-2.8.2 → hypershell-2.9.0a1}/share/zsh/site-functions/_hs +24 -13
- {hypershell-2.8.2 → hypershell-2.9.0a1}/src/hypershell/client.py +28 -9
- {hypershell-2.8.2 → hypershell-2.9.0a1}/src/hypershell/cluster/__init__.py +130 -14
- {hypershell-2.8.2 → hypershell-2.9.0a1}/src/hypershell/cluster/local.py +7 -1
- {hypershell-2.8.2 → hypershell-2.9.0a1}/src/hypershell/cluster/remote.py +14 -2
- {hypershell-2.8.2 → hypershell-2.9.0a1}/src/hypershell/cluster/ssh.py +7 -1
- {hypershell-2.8.2 → hypershell-2.9.0a1}/src/hypershell/core/pretty_print.py +18 -1
- {hypershell-2.8.2 → hypershell-2.9.0a1}/src/hypershell/core/signal.py +32 -1
- {hypershell-2.8.2 → hypershell-2.9.0a1}/src/hypershell/core/template.py +24 -7
- {hypershell-2.8.2 → hypershell-2.9.0a1}/src/hypershell/data/core.py +23 -2
- {hypershell-2.8.2 → hypershell-2.9.0a1}/src/hypershell/data/model.py +221 -12
- {hypershell-2.8.2 → hypershell-2.9.0a1}/src/hypershell/server.py +37 -8
- {hypershell-2.8.2 → hypershell-2.9.0a1}/src/hypershell/submit.py +476 -44
- {hypershell-2.8.2 → hypershell-2.9.0a1}/src/hypershell/task.py +197 -52
- {hypershell-2.8.2 → hypershell-2.9.0a1}/tests/__init__.py +10 -1
- hypershell-2.9.0a1/tests/test_client.py +42 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/tests/test_cluster.py +18 -0
- hypershell-2.9.0a1/tests/test_factory_fsm.py +293 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/tests/test_groups.py +29 -12
- hypershell-2.9.0a1/tests/test_list.py +235 -0
- hypershell-2.9.0a1/tests/test_meta_status.py +140 -0
- hypershell-2.9.0a1/tests/test_restart.py +158 -0
- hypershell-2.9.0a1/tests/test_signal.py +46 -0
- hypershell-2.9.0a1/tests/test_source.py +224 -0
- hypershell-2.9.0a1/tests/test_submit.py +506 -0
- hypershell-2.9.0a1/tests/test_submit_json.py +365 -0
- hypershell-2.9.0a1/tests/test_template.py +35 -0
- hypershell-2.9.0a1/tests/test_update.py +62 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/uv.lock +4 -4
- hypershell-2.8.2/docs/_include/cluster_desc.rst +0 -17
- hypershell-2.8.2/docs/_include/submit_desc.rst +0 -17
- hypershell-2.8.2/docs/_include/task_search_desc.rst +0 -7
- hypershell-2.8.2/docs/roadmap.rst +0 -121
- hypershell-2.8.2/tests/test_submit.py +0 -237
- {hypershell-2.8.2 → hypershell-2.9.0a1}/CODE_OF_CONDUCT.md +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/LICENSE +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/README.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/Makefile +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/citation.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/client_desc.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/client_help.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/client_usage.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/config_desc.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/config_edit_desc.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/config_edit_help.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/config_edit_usage.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/config_get_desc.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/config_get_help.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/config_get_usage.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/config_help.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/config_intro.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/config_intro_alt.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/config_param_ref.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/config_pythonpath.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/config_set_desc.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/config_set_help.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/config_set_usage.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/config_site_vars.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/config_usage.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/config_which_desc.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/config_which_help.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/config_which_usage.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/database.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/database_alt.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/desc.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/exit_status.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/initdb_desc.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/initdb_help.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/initdb_usage.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/license.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/security_alt.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/server_desc.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/server_help.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/server_usage.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/signals.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/task_groups_alt.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/task_info_desc.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/task_info_help.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/task_info_usage.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/task_run_desc.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/task_run_help.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/task_run_usage.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/task_search_usage.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/task_submit_desc.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/task_submit_help.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/task_submit_usage.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/task_update_desc.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/task_update_usage.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/task_wait_desc.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/task_wait_help.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/task_wait_usage.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_include/tls_cli_options.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_static/custom.css +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_static/logo-dark-mode.png +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/_static/logo-light-mode.png +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/api/client.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/api/cluster.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/api/data.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/api/index.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/api/server.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/api/submit.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/blog/20230329_2_2_0_release.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/blog/20230413_2_3_0_release.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/blog/20230602_2_4_0_release.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/blog/20240518_2_5_0_release.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/blog/20240706_2_5_2_release.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/blog/20241115_2_6_0_release.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/blog/20241115_announce_logo.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/blog/20241231_2_6_1_release.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/blog/20250215_2_6_5_release.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/blog/20250405_2_6_6_release.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/blog/20250504_2_7_0_release.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/blog/20260705_2_8_0_release.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/blog/index.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/cli/client.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/cli/cluster.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/cli/config.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/cli/config_edit.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/cli/config_get.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/cli/config_set.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/cli/config_which.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/cli/index.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/cli/initdb.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/cli/server.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/cli/submit.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/cli/task_info.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/cli/task_run.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/cli/task_search.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/cli/task_submit.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/cli/task_update.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/cli/task_wait.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/conf.py +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/config.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/database.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/logging.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/manual.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/templates.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/tutorial/advanced.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/tutorial/basic.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/tutorial/distributed.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/docs/tutorial/hybrid.rst +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/share/bash_completion.d/hsx +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/src/hypershell/__init__.py +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/src/hypershell/config.py +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/src/hypershell/core/__init__.py +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/src/hypershell/core/config.py +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/src/hypershell/core/exceptions.py +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/src/hypershell/core/fsm.py +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/src/hypershell/core/heartbeat.py +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/src/hypershell/core/logging.py +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/src/hypershell/core/platform.py +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/src/hypershell/core/queue.py +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/src/hypershell/core/remote.py +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/src/hypershell/core/resource.py +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/src/hypershell/core/sys.py +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/src/hypershell/core/tag.py +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/src/hypershell/core/thread.py +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/src/hypershell/core/tls.py +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/src/hypershell/core/types.py +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/src/hypershell/core/uuid.py +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/src/hypershell/data/__init__.py +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/tests/conftest.py +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/tests/test_autoscale.py +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/tests/test_cancel.py +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/tests/test_data/__init__.py +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/tests/test_data/test_core.py +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/tests/test_data/test_model.py +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/tests/test_initdb.py +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/tests/test_logging.py +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/tests/test_main.py +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/tests/test_queue_tls.py +0 -0
- {hypershell-2.8.2 → hypershell-2.9.0a1}/tests/test_server.py +0 -0
|
@@ -139,7 +139,7 @@ dmypy.json
|
|
|
139
139
|
|
|
140
140
|
# Local-only security review notes (not for publication)
|
|
141
141
|
.security/
|
|
142
|
+
.local/
|
|
142
143
|
|
|
143
|
-
#
|
|
144
|
-
|
|
145
|
-
CLAUDE.md
|
|
144
|
+
# Personal Claude Code settings (permission allowlist etc.); not for publication
|
|
145
|
+
.agents/settings.local.json
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hypershell
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.9.0a1
|
|
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
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
Start cluster locally or with remote clients over *ssh* or a custom *launcher*.
|
|
2
|
+
This mode should be the most common entry-point for general usage. It fully encompasses all of the
|
|
3
|
+
different agents in the system in a concise workflow.
|
|
4
|
+
|
|
5
|
+
The input source for tasks is file-like, either a local path, or from *stdin* if no argument is
|
|
6
|
+
given. The command-line tasks are pulled in and either directly published to a distributed queue
|
|
7
|
+
(see ``--no-db``) or committed to a database first before being scheduled later.
|
|
8
|
+
|
|
9
|
+
Alternatively, use ``--from-json`` to read tasks from a JSON file (``FILE[@path]``); each task
|
|
10
|
+
object's keys become named ``{key}`` fields in the ``--template`` (and task tags). In this mode the
|
|
11
|
+
template is expanded when tasks are ingested rather than by the clients. A JSON source participates
|
|
12
|
+
in the same re-submission gating as a plain *FILE* — ``--restart`` (idempotent requeue),
|
|
13
|
+
``--repeat``, and ``--update --restart`` all apply — keyed by the file's absolute path together
|
|
14
|
+
with any ``@path`` selector.
|
|
15
|
+
|
|
16
|
+
For large, long running workflows, it might be a good idea to configure a database and run an
|
|
17
|
+
initial ``submit`` job to populate the database, and then run the cluster with ``--restart`` and no
|
|
18
|
+
input *FILE*. If the cluster is interrupted for whatever reason it can gracefully restart where it
|
|
19
|
+
left off.
|
|
20
|
+
|
|
21
|
+
Alternatively, pass the *FILE* directly with ``--restart``: the submission is detected, only tasks
|
|
22
|
+
that never landed are submitted, and interrupted tasks are re-run — so a requeued
|
|
23
|
+
``hsx <FILE> --restart`` job is safe to run repeatedly. Use ``--repeat`` to deliberately submit a
|
|
24
|
+
known file's tasks again as a new source, or ``--update --restart`` to add only the tasks that are
|
|
25
|
+
new since the file was last seen.
|
|
26
|
+
|
|
27
|
+
De-dup cost scales with the file's own source lineage rather than the whole database, so requeues stay
|
|
28
|
+
fast at scale; for very large workflows, a one-time ``submit`` followed by a bare ``hsx --restart`` (no
|
|
29
|
+
file re-read) is cheaper than re-feeding the *FILE* each run.
|
|
30
|
+
|
|
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.
|
|
33
|
+
|
|
34
|
+
Use ``hsx`` in place of ``hs cluster``.
|
|
@@ -43,6 +43,15 @@ Options
|
|
|
43
43
|
|
|
44
44
|
See section on `templates`.
|
|
45
45
|
|
|
46
|
+
``--from-json`` *SPEC*
|
|
47
|
+
Read tasks from a JSON file (``FILE[@path]``).
|
|
48
|
+
|
|
49
|
+
The optional dotted ``path`` after ``@`` locates the list of task objects inside the
|
|
50
|
+
document (e.g. ``plan.json@chunks``); with no ``@`` the file's top level must be the
|
|
51
|
+
list. Each task object's keys become named ``{key}`` fields in the ``--template`` and
|
|
52
|
+
task tags. In this mode the template is expanded when tasks are ingested (submit-side),
|
|
53
|
+
not by the clients.
|
|
54
|
+
|
|
46
55
|
``-H``, ``--bind`` *ADDR*
|
|
47
56
|
Bind address (default: localhost, or 0.0.0.0 for remote clients).
|
|
48
57
|
|
|
@@ -132,17 +141,39 @@ Options
|
|
|
132
141
|
Conflicts with ``--no-db`` and mutually exclusive to ``--restart``.
|
|
133
142
|
|
|
134
143
|
``--restart``
|
|
135
|
-
Start scheduling from
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
144
|
+
Start scheduling from where a prior run left off.
|
|
145
|
+
|
|
146
|
+
With no *FILE*, ``--restart`` resumes purely from the database: any task previously
|
|
147
|
+
scheduled but not completed is reverted, scheduling continues, and the `cluster` halts when
|
|
148
|
+
nothing is left to do. This is the classic "populate with ``submit``, then requeue" strategy
|
|
149
|
+
for very large workflows — if the `cluster` is interrupted it can gracefully continue where
|
|
150
|
+
it left off.
|
|
151
|
+
|
|
152
|
+
When a *FILE* is given, ``--restart`` becomes file-aware and idempotent. The file is read
|
|
153
|
+
upfront (a content fingerprint and task count), and only tasks whose identity is not already
|
|
154
|
+
present from a prior submission of that same path are submitted; the revert-interrupted flow
|
|
155
|
+
re-runs anything that was mid-flight. Requeuing the same ``hsx <FILE> --restart`` job as many
|
|
156
|
+
times as needed therefore never double-submits work. If the file's content has changed since
|
|
157
|
+
it was last seen, the run is refused with a suggestion to use ``--update --restart``.
|
|
158
|
+
|
|
159
|
+
Conflicts with ``--no-db`` and ``--repeat``, and mutually exclusive to ``--forever``.
|
|
160
|
+
|
|
161
|
+
``--repeat``
|
|
162
|
+
Re-submit a known file's tasks again as a new source.
|
|
163
|
+
|
|
164
|
+
Re-submitting a file that has already been ingested is normally refused. ``--repeat``
|
|
165
|
+
overrides that: the file is recorded as a brand-new source and *all* of its tasks are
|
|
166
|
+
submitted again, even if an identical prior submission exists. Combine with ``-t``/tags to
|
|
167
|
+
represent a new phase or trial of the same work.
|
|
168
|
+
|
|
169
|
+
``--update``
|
|
170
|
+
Submit only the tasks that are new since a file was last seen.
|
|
171
|
+
|
|
172
|
+
Used together with ``--restart`` (``hsx <FILE> --update --restart``): the file is recorded as
|
|
173
|
+
a new source and only tasks whose identity is not already present in the prior same-path
|
|
174
|
+
lineage are submitted — novel tasks run while previously-submitted tasks are skipped. On its
|
|
175
|
+
own (without ``--restart``) it is ambiguous and refused; it also cannot be combined with
|
|
176
|
+
``--repeat``.
|
|
146
177
|
|
|
147
178
|
``--ssh-args`` *ARGS*...
|
|
148
179
|
Command-line arguments for SSH. For example, ``--ssh-args '-i ~/.ssh/my_key'``.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
``hs cluster [-h]`` ``[FILE | --restart | --forever]``
|
|
1
|
+
``hs cluster [-h]`` ``[FILE | --from-json SPEC | --restart | --forever]`` ``[--repeat | --update]``
|
|
2
2
|
``[-N NUM]`` ``[-t CMD]`` ``[-b SIZE]`` ``[-w SEC]`` ``[-Q NUM]``
|
|
3
3
|
``[-H ADDR]`` ``[-p PORT]`` ``[-r NUM [--eager]]`` ``[-f PATH]`` ``[--capture | [-o PATH] [-e PATH]]``
|
|
4
4
|
``[--ssh [HOST... | --ssh-group NAME] [--env] | --mpi | --launcher=ARGS...]``
|
|
@@ -57,6 +57,14 @@ A few common environment variables are defined for every task.
|
|
|
57
57
|
``TASK_ERRPATH``
|
|
58
58
|
Absolute file path where standard error is directed (if defined).
|
|
59
59
|
|
|
60
|
+
``TASK_SLOT``
|
|
61
|
+
Zero-based execution slot of the task's executor (``0 .. N-1`` for a client
|
|
62
|
+
running ``N`` tasks in parallel). Stable for the executor's lifetime; use it to
|
|
63
|
+
pin resources (cores, GPUs) without colliding with sibling tasks. Defaults to ``0``.
|
|
64
|
+
|
|
65
|
+
``TASK_SLOT_COUNT``
|
|
66
|
+
Number of concurrent executors on the client (``N``). Defaults to ``1``.
|
|
67
|
+
|
|
60
68
|
|
|
|
61
69
|
|
|
62
70
|
Any user-defined tags are included as environment variables as well with
|
|
@@ -55,6 +55,14 @@ A few common environment variables are defined for every task.
|
|
|
55
55
|
``TASK_ERRPATH``
|
|
56
56
|
Absolute file path where standard error is directed (if defined).
|
|
57
57
|
|
|
58
|
+
``TASK_SLOT``
|
|
59
|
+
Zero-based execution slot of the task's executor (``0 .. N-1`` for a client
|
|
60
|
+
running ``N`` tasks in parallel). Stable for the executor's lifetime; use it to
|
|
61
|
+
pin resources (cores, GPUs) without colliding with sibling tasks. Defaults to ``0``.
|
|
62
|
+
|
|
63
|
+
``TASK_SLOT_COUNT``
|
|
64
|
+
Number of concurrent executors on the client (``N``). Defaults to ``1``.
|
|
65
|
+
|
|
58
66
|
Further, any environment variable starting with ``HYPERSHELL_EXPORT_`` will be injected
|
|
59
67
|
into the task environment sans prefix; e.g., ``HYPERSHELL_EXPORT_FOO`` would define
|
|
60
68
|
``FOO`` in the task environment. You can also define such variables in the ``export``
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
Submit one or more tasks.
|
|
2
|
+
|
|
3
|
+
Submit one task as positional arguments.
|
|
4
|
+
If a single positional argument refers to a non-executable file path,
|
|
5
|
+
tasks will be read from the file, one per line (use ``-f``/``--task-file`` to be explicit).
|
|
6
|
+
|
|
7
|
+
Tasks are accumulated and published in bundles to the database by default.
|
|
8
|
+
With ``-q``/``--queue``, tasks are submitted directly to a live queue, bypassing the database.
|
|
9
|
+
The ``-b``/``--bundlesize`` and ``-w``/``--bundlewait`` options control the
|
|
10
|
+
size of these bundles and how long to wait before flushing tasks regardless of
|
|
11
|
+
how many have accumulated.
|
|
12
|
+
|
|
13
|
+
Pre-format tasks at submit time with template expansion using ``--template``.
|
|
14
|
+
Any tags specified with ``-t``/``--tag`` are applied to all tasks submitted.
|
|
15
|
+
|
|
16
|
+
Use the special comment syntax, ``# HYPERSHELL: ...``, to include resource limits or tags inline.
|
|
17
|
+
If the comment is alone on the line it will be applied to all tasks that follow.
|
|
18
|
+
|
|
19
|
+
With ``--from-json``, read tasks from a JSON file instead. The value is
|
|
20
|
+
``FILE[@path]`` where the optional dotted ``path`` locates the list of task objects
|
|
21
|
+
within the document (e.g. ``plan.json@chunks``); with no ``@`` the file's top level
|
|
22
|
+
must itself be the list, and a ``FILE`` of ``-`` reads from ``<stdin>``. Each task
|
|
23
|
+
object's keys become named ``{key}`` template fields (and task tags), and an optional
|
|
24
|
+
``args`` key provides the base command (reachable as ``{}``). All ``{key}`` fields are
|
|
25
|
+
validated against every task object up front, so submission is rejected before any task
|
|
26
|
+
is committed if a field is missing.
|
|
27
|
+
|
|
28
|
+
Re-submitting a named task file is guarded to prevent accidental double submission. Each
|
|
29
|
+
named file is recorded as a *source* (its absolute path, a content fingerprint, and the
|
|
30
|
+
task count); submitting the same file again with no flag is refused, and if the path was
|
|
31
|
+
seen but the content changed the refusal suggests ``--update``. Pass ``--repeat`` to
|
|
32
|
+
deliberately submit all tasks again as a new source, or ``--update`` to submit only tasks
|
|
33
|
+
not already present from earlier versions of the same file. JSON task files (``--from-json``)
|
|
34
|
+
are gated the same way, keyed by their absolute path together with any ``@path`` selector.
|
|
35
|
+
Single-command and ``<stdin>`` submissions (including ``--from-json -``) are treated as
|
|
36
|
+
explicit intent and are exempt from these checks.
|
|
37
|
+
|
|
38
|
+
Detection and ``--update`` de-dup are index-backed on the source lineage, so their cost scales with
|
|
39
|
+
that file's own size, not the size of the database: re-submitting a normal file stays fast even against
|
|
40
|
+
a very large database, while ``--update`` on a source of millions of tasks pays to re-read and
|
|
41
|
+
fingerprint the entire file to find what is new.
|
|
@@ -10,6 +10,33 @@ Options
|
|
|
10
10
|
``-f``, ``--task-file`` *FILE*
|
|
11
11
|
Input file containing one task per line.
|
|
12
12
|
|
|
13
|
+
``--from-json`` *SPEC*
|
|
14
|
+
Read tasks from a JSON file (``FILE[@path]``).
|
|
15
|
+
|
|
16
|
+
The optional dotted ``path`` after ``@`` locates the list of task objects inside
|
|
17
|
+
the document (e.g. ``plan.json@chunks``); with no ``@`` the file's top level must
|
|
18
|
+
be the list, and a ``FILE`` of ``-`` reads from ``<stdin>``. Each task object's keys
|
|
19
|
+
become named ``{key}`` template fields and task tags; an optional ``args`` key is the
|
|
20
|
+
base command (reachable as ``{}``). Every ``{key}`` is validated against all task
|
|
21
|
+
objects before anything is submitted.
|
|
22
|
+
|
|
23
|
+
``--repeat``
|
|
24
|
+
Re-submit a known file's tasks again as a brand-new source.
|
|
25
|
+
|
|
26
|
+
By default, submitting a named file whose path and content match a prior submission is
|
|
27
|
+
refused to guard against accidental double submission. ``--repeat`` overrides that: the
|
|
28
|
+
file is ingested as a new source and all of its tasks are submitted again, even if
|
|
29
|
+
identical tasks already exist. May be combined with new ``-t``/``--tag`` values to mark
|
|
30
|
+
a new phase or trial.
|
|
31
|
+
|
|
32
|
+
``--update``
|
|
33
|
+
Submit only the tasks in a known file that are not already present.
|
|
34
|
+
|
|
35
|
+
Creates a new source record and submits only tasks whose identity (a stable hash of the
|
|
36
|
+
pre-template arguments, group, and tags) is absent from the prior same-path submissions;
|
|
37
|
+
tasks already submitted are skipped. Use this after editing a task file to add only the
|
|
38
|
+
new work. Cannot be combined with ``--repeat``.
|
|
39
|
+
|
|
13
40
|
``-q``, ``--queue``
|
|
14
41
|
Submit directly to live queue instead of database.
|
|
15
42
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
``hs`` ``submit`` ``[-h]`` ``[ARGS... | -f FILE]``
|
|
1
|
+
``hs`` ``submit`` ``[-h]`` ``[ARGS... | -f FILE | --from-json SPEC]``
|
|
2
2
|
``[-q [-H ADDR] [-p NUM] [-k KEY] | --initdb]``
|
|
3
3
|
``[-b NUM]`` ``[-w SEC]`` ``[-c NUM]`` ``[-m MEM]`` ``[-W SEC]`` ``[-g NUM]``
|
|
4
|
-
``[--template CMD]`` ``[-t TAG...]``
|
|
4
|
+
``[--repeat | --update]`` ``[--template CMD]`` ``[-t TAG...]``
|
|
5
5
|
``[--no-tls | [--tls-ca PATH] [--tls-cert PATH] [--tls-key PATH]]``
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
Search tasks in the database.
|
|
2
|
+
|
|
3
|
+
A database must be configured.
|
|
4
|
+
Specifying *FIELD* names defines what is included in the output
|
|
5
|
+
(by default all fields are included).
|
|
6
|
+
|
|
7
|
+
As a safeguard against accidentally dumping an entire database, ``hs list`` refuses to return
|
|
8
|
+
more than 1,000 tasks unless the intent is made explicit with ``--all`` (dump everything),
|
|
9
|
+
``--limit`` *N* (bound the result), or ``--count`` (count only) - much as ``hs update`` confirms
|
|
10
|
+
a bulk change before applying it. A bare ``hs list`` with no arguments prints the usage statement.
|
|
11
|
+
|
|
12
|
+
This command maps directly to underlying SQL queries.
|
|
13
|
+
|
|
14
|
+
When printing to a terminal, task records are colorized by `exit_status`: successful tasks
|
|
15
|
+
(0) are green, cancelled tasks (-1, including those terminated by ``SIGHUP``) are shown faint,
|
|
16
|
+
tasks that terminated abnormally (killed by a signal, or that never ran - any other negative
|
|
17
|
+
status) are yellow, and tasks that ran and returned a non-zero code are red. Tasks that have
|
|
18
|
+
not yet run are left uncolored.
|
|
@@ -8,6 +8,14 @@ FIELD
|
|
|
8
8
|
Options
|
|
9
9
|
^^^^^^^
|
|
10
10
|
|
|
11
|
+
``--all``
|
|
12
|
+
Dump all matching tasks, imposing no limit.
|
|
13
|
+
|
|
14
|
+
As a guard against accidentally dumping an entire database, ``hs list`` refuses to return
|
|
15
|
+
more than 1,000 results unless the intent is made explicit. ``--all`` dumps them all,
|
|
16
|
+
``--limit`` *N* bounds the result, and ``--count`` only counts them; the three are mutually
|
|
17
|
+
exclusive (e.g. ``hs list --all`` or ``hs list --all --csv``).
|
|
18
|
+
|
|
11
19
|
``-w``, ``--where`` *COND...*
|
|
12
20
|
List of conditional statements to filter results (e.g., ``-w 'duration >= 600'``).
|
|
13
21
|
|
|
@@ -40,9 +48,20 @@ Options
|
|
|
40
48
|
``-R``, ``--remaining``
|
|
41
49
|
Alias for ``-w 'exit_status == null'``.
|
|
42
50
|
|
|
51
|
+
``-X``, ``--cancelled``
|
|
52
|
+
Alias for ``-w 'exit_status == -1'`` (tasks that were cancelled).
|
|
53
|
+
|
|
43
54
|
``--retries``
|
|
44
55
|
Alias for ``-w 'attempt > 1'`` (tasks that have been retried).
|
|
45
56
|
|
|
57
|
+
``--signal`` *NAME*
|
|
58
|
+
Match tasks whose process was terminated by signal *NAME* (e.g. ``TERM``, ``KILL``, ``HUP``).
|
|
59
|
+
|
|
60
|
+
A task killed by signal *N* is recorded with ``exit_status = -N`` (the convention used by
|
|
61
|
+
Python's subprocess module). The ``SIG`` prefix is optional and the name is case-insensitive.
|
|
62
|
+
A task terminated by ``HUP`` lands on -1 and is therefore treated as cancelled
|
|
63
|
+
(see ``--cancelled``).
|
|
64
|
+
|
|
46
65
|
``-f``, ``--format`` *FORMAT*
|
|
47
66
|
Specify output format (either ``normal``, ``plain``, ``table``, ``csv``, ``json``).
|
|
48
67
|
|
|
@@ -15,6 +15,12 @@ Options
|
|
|
15
15
|
becomes terminal: it will not be scheduled, retried, or reverted on ``--restart``.
|
|
16
16
|
A task cannot be cancelled after it is sent to remote clients.
|
|
17
17
|
|
|
18
|
+
A running task can also be cancelled *in flight* on the client by terminating its
|
|
19
|
+
process with ``SIGHUP`` (e.g. ``kill -HUP``). Because a process killed by signal *N* is
|
|
20
|
+
recorded with ``exit_status = -N``, a ``SIGHUP`` (signal 1) death lands on -1 - the same
|
|
21
|
+
cancelled state - so such a task is likewise not retried. See ``hs list --cancelled`` and
|
|
22
|
+
``hs list --signal HUP``.
|
|
23
|
+
|
|
18
24
|
``--revert``
|
|
19
25
|
Revert specified tasks.
|
|
20
26
|
|
|
@@ -68,9 +74,20 @@ Options
|
|
|
68
74
|
``-R``, ``--remaining``
|
|
69
75
|
Alias for ``-w 'exit_status == null'``.
|
|
70
76
|
|
|
77
|
+
``-X``, ``--cancelled``
|
|
78
|
+
Alias for ``-w 'exit_status == -1'`` (tasks that were cancelled).
|
|
79
|
+
|
|
71
80
|
``--retries``
|
|
72
81
|
Alias for ``-w 'attempt > 1'`` (tasks that have been retried).
|
|
73
82
|
|
|
83
|
+
``--signal`` *NAME*
|
|
84
|
+
Match tasks whose process was terminated by signal *NAME* (e.g. ``TERM``, ``KILL``, ``HUP``).
|
|
85
|
+
|
|
86
|
+
A task killed by signal *N* is recorded with ``exit_status = -N`` (the convention used by
|
|
87
|
+
Python's subprocess module). The ``SIG`` prefix is optional and the name is case-insensitive.
|
|
88
|
+
A task terminated by ``HUP`` lands on -1 and is therefore treated as cancelled
|
|
89
|
+
(see ``--cancelled``).
|
|
90
|
+
|
|
74
91
|
``-f``, ``--no-confirm``
|
|
75
92
|
Do not ask for confirmation.
|
|
76
93
|
|
|
@@ -15,6 +15,61 @@ These are expanded `prior` to scheduling as the actual `args` for the task.
|
|
|
15
15
|
|
|
16
16
|
-------------------
|
|
17
17
|
|
|
18
|
+
Named Fields
|
|
19
|
+
^^^^^^^^^^^^
|
|
20
|
+
|
|
21
|
+
|
|
|
22
|
+
|
|
23
|
+
When tasks are submitted from a JSON file with ``--from-json`` (see the ``submit``
|
|
24
|
+
command), each task object's keys become available as named template fields. A
|
|
25
|
+
``{key}`` pattern expands to that key's value for the given task, and the keys also
|
|
26
|
+
become task tags.
|
|
27
|
+
|
|
28
|
+
For a task object ``{"seqid": "Chr1", "start": 1, "end": 5000000}`` the template
|
|
29
|
+
|
|
30
|
+
``process --region {seqid}:{start}-{end}``
|
|
31
|
+
|
|
32
|
+
expands to
|
|
33
|
+
|
|
34
|
+
``process --region Chr1:1-5000000``.
|
|
35
|
+
|
|
36
|
+
Values are stringified: booleans render as ``true``/``false``, ``null`` as an empty
|
|
37
|
+
string, and nested objects/arrays as compact JSON. A built-in pattern (below) takes
|
|
38
|
+
precedence over a task key of the same name. Named fields are resolved at submit time,
|
|
39
|
+
and every ``{key}`` must be present in each task object or the submission is rejected.
|
|
40
|
+
|
|
41
|
+
-------------------
|
|
42
|
+
|
|
43
|
+
Execution Slot
|
|
44
|
+
^^^^^^^^^^^^^^
|
|
45
|
+
|
|
46
|
+
|
|
|
47
|
+
|
|
48
|
+
Each client runs ``N`` task executors (set with ``-N``/``--num-threads``); every executor owns
|
|
49
|
+
a fixed **slot** for its lifetime, a zero-based index in ``0 .. N-1``. Two patterns expose it so a
|
|
50
|
+
task can claim a non-overlapping share of the node's cores, memory, or GPUs without colliding with
|
|
51
|
+
its siblings.
|
|
52
|
+
|
|
53
|
+
``{slot}``
|
|
54
|
+
The executor's zero-based slot index (``0 .. N-1``).
|
|
55
|
+
|
|
56
|
+
``{slot_count}``
|
|
57
|
+
The number of executors on this client (``N``).
|
|
58
|
+
|
|
59
|
+
``taskset -c {slot} ./sim {}``
|
|
60
|
+
Pin each task to a distinct CPU core.
|
|
61
|
+
|
|
62
|
+
``CUDA_VISIBLE_DEVICES={slot} python train.py {}``
|
|
63
|
+
Assign a distinct GPU per task.
|
|
64
|
+
|
|
65
|
+
These fields are resolved at execution time, when the ``client`` expands the template — the normal
|
|
66
|
+
line-input path, whether database-backed or ``--no-db``. They are *not* available when the template
|
|
67
|
+
is instead expanded at submit time (JSON mode via ``--from-json``, or the ``submit`` command); use
|
|
68
|
+
the equivalent ``TASK_SLOT`` and ``TASK_SLOT_COUNT`` environment variables there, which are always
|
|
69
|
+
defined.
|
|
70
|
+
|
|
71
|
+
-------------------
|
|
72
|
+
|
|
18
73
|
Filepath Operations
|
|
19
74
|
^^^^^^^^^^^^^^^^^^^
|
|
20
75
|
|
|
@@ -13,6 +13,49 @@ argument to all clients.
|
|
|
13
13
|
In some situations it may be useful to expand a template with the ``submit`` command.
|
|
14
14
|
These are expanded `prior` to scheduling as the actual `args` for the task.
|
|
15
15
|
|
|
16
|
+
Named Fields
|
|
17
|
+
^^^^^^^^^^^^
|
|
18
|
+
|
|
19
|
+
When tasks are submitted from a JSON file with ``--from-json`` (see the ``submit``
|
|
20
|
+
command), each task object's keys become available as named template fields. A
|
|
21
|
+
``{key}`` pattern expands to that key's value for the given task, and the keys also
|
|
22
|
+
become task tags.
|
|
23
|
+
|
|
24
|
+
For a task object ``{"seqid": "Chr1", "start": 1, "end": 5000000}`` the template
|
|
25
|
+
``process --region {seqid}:{start}-{end}`` expands to
|
|
26
|
+
``process --region Chr1:1-5000000``.
|
|
27
|
+
|
|
28
|
+
Values are stringified: booleans render as ``true``/``false``, ``null`` as an empty
|
|
29
|
+
string, and nested objects/arrays as compact JSON. A built-in pattern (below) takes
|
|
30
|
+
precedence over a task key of the same name. Named fields are resolved at submit time,
|
|
31
|
+
and every ``{key}`` must be present in each task object or the submission is rejected.
|
|
32
|
+
|
|
33
|
+
Execution Slot
|
|
34
|
+
^^^^^^^^^^^^^^
|
|
35
|
+
|
|
36
|
+
Each client runs ``N`` task executors (set with ``-N``/``--num-threads``); every executor owns
|
|
37
|
+
a fixed **slot** for its lifetime, a zero-based index in ``0 .. N-1``. Two patterns expose it so a
|
|
38
|
+
task can claim a non-overlapping share of the node's cores, memory, or GPUs without colliding with
|
|
39
|
+
its siblings.
|
|
40
|
+
|
|
41
|
+
``{slot}``
|
|
42
|
+
The executor's zero-based slot index (``0 .. N-1``).
|
|
43
|
+
|
|
44
|
+
``{slot_count}``
|
|
45
|
+
The number of executors on this client (``N``).
|
|
46
|
+
|
|
47
|
+
``taskset -c {slot} ./sim {}``
|
|
48
|
+
Pin each task to a distinct CPU core.
|
|
49
|
+
|
|
50
|
+
``CUDA_VISIBLE_DEVICES={slot} python train.py {}``
|
|
51
|
+
Assign a distinct GPU per task.
|
|
52
|
+
|
|
53
|
+
These fields are resolved at execution time, when the ``client`` expands the template — the normal
|
|
54
|
+
line-input path, whether database-backed or ``--no-db``. They are *not* available when the template
|
|
55
|
+
is instead expanded at submit time (JSON mode via ``--from-json``, or the ``submit`` command); use
|
|
56
|
+
the equivalent ``TASK_SLOT`` and ``TASK_SLOT_COUNT`` environment variables there, which are always
|
|
57
|
+
defined.
|
|
58
|
+
|
|
16
59
|
Filepath Operations
|
|
17
60
|
^^^^^^^^^^^^^^^^^^^
|
|
18
61
|
|