simstack 2.0.1__py3-none-any.whl

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 (354) hide show
  1. simstack/__init__.py +0 -0
  2. simstack/_version.py +24 -0
  3. simstack/core/__init__.py +0 -0
  4. simstack/core/artifacts.py +406 -0
  5. simstack/core/asnyc_helper.py +14 -0
  6. simstack/core/config_file.py +60 -0
  7. simstack/core/context.py +283 -0
  8. simstack/core/definitions.py +22 -0
  9. simstack/core/engine.py +115 -0
  10. simstack/core/find_simstack_modules.py +41 -0
  11. simstack/core/hash.py +179 -0
  12. simstack/core/node.py +1137 -0
  13. simstack/core/node_claim.py +31 -0
  14. simstack/core/node_runner.py +362 -0
  15. simstack/core/process_results.py +102 -0
  16. simstack/core/recompute_artifacts.py +117 -0
  17. simstack/core/reset_db.py +12 -0
  18. simstack/core/resource_assignment.py +222 -0
  19. simstack/core/resources.py +90 -0
  20. simstack/core/route_table.py +24 -0
  21. simstack/core/run_docker.py +109 -0
  22. simstack/core/run_node.py +71 -0
  23. simstack/core/runner.py +169 -0
  24. simstack/core/services/__init__.py +11 -0
  25. simstack/core/services/base_service.py +191 -0
  26. simstack/core/services/file_transfer_service.py +117 -0
  27. simstack/core/services/git_restart_service.py +12 -0
  28. simstack/core/services/git_uv_update_service.py +105 -0
  29. simstack/core/services/node_execution_service.py +182 -0
  30. simstack/core/services/resource_branch_monitor_service.py +71 -0
  31. simstack/core/services/runner_cleanup_service.py +149 -0
  32. simstack/core/services/runner_manager.py +163 -0
  33. simstack/core/services/runner_status_service.py +10 -0
  34. simstack/core/services/slurm_status_service.py +67 -0
  35. simstack/core/services/stop_check_service.py +27 -0
  36. simstack/core/services/timeout_restart_service.py +26 -0
  37. simstack/core/simstack_result.py +39 -0
  38. simstack/core/submit_node.py +217 -0
  39. simstack/core/task_id.py +22 -0
  40. simstack/methods/__init__.py +0 -0
  41. simstack/methods/archive_files.py +292 -0
  42. simstack/methods/fire_and_forget_runner.py +113 -0
  43. simstack/methods/generate_test.py +125 -0
  44. simstack/methods/get_file.py +26 -0
  45. simstack/methods/mass_runner.py +154 -0
  46. simstack/methods/multiple_executor.py +307 -0
  47. simstack/methods/switch_git.py +16 -0
  48. simstack/methods/upload_helpers.py +81 -0
  49. simstack/models/__init__.py +74 -0
  50. simstack/models/array_list.py +21 -0
  51. simstack/models/array_storage.py +83 -0
  52. simstack/models/artifact_models.py +127 -0
  53. simstack/models/base_lists.py +51 -0
  54. simstack/models/base_types.py +209 -0
  55. simstack/models/charts_artifact.py +690 -0
  56. simstack/models/dataset.py +451 -0
  57. simstack/models/dataset_metadata.py +390 -0
  58. simstack/models/datasettuple.py +587 -0
  59. simstack/models/file_instance.py +150 -0
  60. simstack/models/file_list.py +45 -0
  61. simstack/models/files.py +424 -0
  62. simstack/models/fire_and_forget_result.py +19 -0
  63. simstack/models/images2d.py +113 -0
  64. simstack/models/log_entry_model.py +37 -0
  65. simstack/models/models.py +52 -0
  66. simstack/models/named_data_reference.py +36 -0
  67. simstack/models/node_registry.py +96 -0
  68. simstack/models/pandas_model.py +239 -0
  69. simstack/models/parameters.py +402 -0
  70. simstack/models/pickle_models.py +300 -0
  71. simstack/models/project.py +13 -0
  72. simstack/models/resource_assignment.py +170 -0
  73. simstack/models/resource_definition.py +125 -0
  74. simstack/models/runner_model.py +39 -0
  75. simstack/models/simple_table.py +79 -0
  76. simstack/models/simstack_model.py +97 -0
  77. simstack/models/slurm_info.py +17 -0
  78. simstack/models/table_artifact.py +87 -0
  79. simstack/models/tag.py +12 -0
  80. simstack/models/unused_test_file.py +5 -0
  81. simstack/simstack_marker.com +1 -0
  82. simstack/static/docs/.buildinfo +4 -0
  83. simstack/static/docs/_images/GUI Concept.webp +0 -0
  84. simstack/static/docs/_modules/index.html +434 -0
  85. simstack/static/docs/_modules/simstack/core/artifacts.html +743 -0
  86. simstack/static/docs/_modules/simstack/core/asnyc_helper.html +330 -0
  87. simstack/static/docs/_modules/simstack/core/config_file.html +379 -0
  88. simstack/static/docs/_modules/simstack/core/definitions.html +341 -0
  89. simstack/static/docs/_modules/simstack/core/engine.html +437 -0
  90. simstack/static/docs/_modules/simstack/core/find_simstack_modules.html +360 -0
  91. simstack/static/docs/_modules/simstack/core/hash.html +528 -0
  92. simstack/static/docs/_modules/simstack/core/node.html +1392 -0
  93. simstack/static/docs/_modules/simstack/core/node_claim.html +347 -0
  94. simstack/static/docs/_modules/simstack/core/node_runner.html +711 -0
  95. simstack/static/docs/_modules/simstack/core/process_results.html +418 -0
  96. simstack/static/docs/_modules/simstack/core/recompute_artifacts.html +433 -0
  97. simstack/static/docs/_modules/simstack/core/reset_db.html +328 -0
  98. simstack/static/docs/_modules/simstack/core/resource_assignment.html +553 -0
  99. simstack/static/docs/_modules/simstack/core/resources.html +424 -0
  100. simstack/static/docs/_modules/simstack/core/route_table.html +349 -0
  101. simstack/static/docs/_modules/simstack/core/run_docker.html +425 -0
  102. simstack/static/docs/_modules/simstack/core/run_node.html +390 -0
  103. simstack/static/docs/_modules/simstack/core/runner.html +491 -0
  104. simstack/static/docs/_modules/simstack/core/services/base_service.html +522 -0
  105. simstack/static/docs/_modules/simstack/core/services/file_transfer_service.html +436 -0
  106. simstack/static/docs/_modules/simstack/core/services/git_restart_service.html +331 -0
  107. simstack/static/docs/_modules/simstack/core/services/git_uv_update_service.html +427 -0
  108. simstack/static/docs/_modules/simstack/core/services/node_execution_service.html +507 -0
  109. simstack/static/docs/_modules/simstack/core/services/resource_branch_monitor_service.html +390 -0
  110. simstack/static/docs/_modules/simstack/core/services/runner_cleanup_service.html +468 -0
  111. simstack/static/docs/_modules/simstack/core/services/runner_manager.html +485 -0
  112. simstack/static/docs/_modules/simstack/core/services/runner_status_service.html +329 -0
  113. simstack/static/docs/_modules/simstack/core/services/slurm_status_service.html +386 -0
  114. simstack/static/docs/_modules/simstack/core/services/stop_check_service.html +346 -0
  115. simstack/static/docs/_modules/simstack/core/services/timeout_restart_service.html +345 -0
  116. simstack/static/docs/_modules/simstack/core/simstack_result.html +355 -0
  117. simstack/static/docs/_modules/simstack/core/submit_node.html +536 -0
  118. simstack/static/docs/_modules/simstack/core/task_id.html +344 -0
  119. simstack/static/docs/_modules/simstack/methods/archive_files.html +598 -0
  120. simstack/static/docs/_modules/simstack/methods/fire_and_forget_runner.html +432 -0
  121. simstack/static/docs/_modules/simstack/methods/generate_test.html +443 -0
  122. simstack/static/docs/_modules/simstack/methods/get_file.html +342 -0
  123. simstack/static/docs/_modules/simstack/methods/mass_runner.html +476 -0
  124. simstack/static/docs/_modules/simstack/methods/multiple_executor.html +674 -0
  125. simstack/static/docs/_modules/simstack/methods/switch_git.html +332 -0
  126. simstack/static/docs/_modules/simstack/methods/upload_helpers.html +403 -0
  127. simstack/static/docs/_modules/simstack/models/array_list.html +337 -0
  128. simstack/static/docs/_modules/simstack/models/array_storage.html +417 -0
  129. simstack/static/docs/_modules/simstack/models/base_lists.html +374 -0
  130. simstack/static/docs/_modules/simstack/models/base_types.html +588 -0
  131. simstack/static/docs/_modules/simstack/models/charts_artifact.html +1035 -0
  132. simstack/static/docs/_modules/simstack/models/dataset.html +866 -0
  133. simstack/static/docs/_modules/simstack/models/dataset_metadata.html +711 -0
  134. simstack/static/docs/_modules/simstack/models/datasettuple.html +1005 -0
  135. simstack/static/docs/_modules/simstack/models/file_instance.html +472 -0
  136. simstack/static/docs/_modules/simstack/models/file_list.html +367 -0
  137. simstack/static/docs/_modules/simstack/models/files.html +773 -0
  138. simstack/static/docs/_modules/simstack/models/fire_and_forget_result.html +335 -0
  139. simstack/static/docs/_modules/simstack/models/images2d.html +447 -0
  140. simstack/static/docs/_modules/simstack/models/log_entry_model.html +356 -0
  141. simstack/static/docs/_modules/simstack/models/models.html +374 -0
  142. simstack/static/docs/_modules/simstack/models/named_data_reference.html +355 -0
  143. simstack/static/docs/_modules/simstack/models/node_registry.html +415 -0
  144. simstack/static/docs/_modules/simstack/models/pandas_model.html +570 -0
  145. simstack/static/docs/_modules/simstack/models/parameters.html +739 -0
  146. simstack/static/docs/_modules/simstack/models/pickle_models.html +631 -0
  147. simstack/static/docs/_modules/simstack/models/project.html +329 -0
  148. simstack/static/docs/_modules/simstack/models/resource_assignment.html +501 -0
  149. simstack/static/docs/_modules/simstack/models/resource_definition.html +477 -0
  150. simstack/static/docs/_modules/simstack/models/runner_model.html +361 -0
  151. simstack/static/docs/_modules/simstack/models/simple_table.html +413 -0
  152. simstack/static/docs/_modules/simstack/models/simstack_model.html +416 -0
  153. simstack/static/docs/_modules/simstack/models/slurm_info.html +333 -0
  154. simstack/static/docs/_modules/simstack/models/table_artifact.html +406 -0
  155. simstack/static/docs/_modules/simstack/models/tag.html +328 -0
  156. simstack/static/docs/_modules/simstack/tables/model_table.html +519 -0
  157. simstack/static/docs/_modules/simstack/tables/node_children.html +538 -0
  158. simstack/static/docs/_modules/simstack/tables/node_table.html +854 -0
  159. simstack/static/docs/_modules/simstack/tables/table_builder.html +642 -0
  160. simstack/static/docs/_modules/simstack/util/async_zip_utils.html +337 -0
  161. simstack/static/docs/_modules/simstack/util/b64mixin.html +339 -0
  162. simstack/static/docs/_modules/simstack/util/cleaned_json_schema.html +336 -0
  163. simstack/static/docs/_modules/simstack/util/config_reader.html +498 -0
  164. simstack/static/docs/_modules/simstack/util/custom_model_dump.html +391 -0
  165. simstack/static/docs/_modules/simstack/util/database_information.html +488 -0
  166. simstack/static/docs/_modules/simstack/util/db.html +1392 -0
  167. simstack/static/docs/_modules/simstack/util/db_logger.html +448 -0
  168. simstack/static/docs/_modules/simstack/util/default_from_dict.html +376 -0
  169. simstack/static/docs/_modules/simstack/util/directory_iterator.html +553 -0
  170. simstack/static/docs/_modules/simstack/util/docstring_parser.html +526 -0
  171. simstack/static/docs/_modules/simstack/util/file_hashing.html +394 -0
  172. simstack/static/docs/_modules/simstack/util/file_transfer_client.html +791 -0
  173. simstack/static/docs/_modules/simstack/util/files.html +733 -0
  174. simstack/static/docs/_modules/simstack/util/find_python_files.html +349 -0
  175. simstack/static/docs/_modules/simstack/util/generate_ui_schema.html +396 -0
  176. simstack/static/docs/_modules/simstack/util/generic_list_mixin.html +487 -0
  177. simstack/static/docs/_modules/simstack/util/get_module_path.html +336 -0
  178. simstack/static/docs/_modules/simstack/util/git_pull.html +381 -0
  179. simstack/static/docs/_modules/simstack/util/git_repository_status.html +411 -0
  180. simstack/static/docs/_modules/simstack/util/import_module.html +377 -0
  181. simstack/static/docs/_modules/simstack/util/importer.html +637 -0
  182. simstack/static/docs/_modules/simstack/util/init_data_source.html +357 -0
  183. simstack/static/docs/_modules/simstack/util/make_graph.html +423 -0
  184. simstack/static/docs/_modules/simstack/util/make_table.html +1171 -0
  185. simstack/static/docs/_modules/simstack/util/mappings.html +378 -0
  186. simstack/static/docs/_modules/simstack/util/minimal_route_finder.html +388 -0
  187. simstack/static/docs/_modules/simstack/util/mock_db.html +472 -0
  188. simstack/static/docs/_modules/simstack/util/module_path_checker.html +354 -0
  189. simstack/static/docs/_modules/simstack/util/object_list_mixin.html +649 -0
  190. simstack/static/docs/_modules/simstack/util/path_manager.html +566 -0
  191. simstack/static/docs/_modules/simstack/util/project_root_finder.html +357 -0
  192. simstack/static/docs/_modules/simstack/util/queue_watcher.html +593 -0
  193. simstack/static/docs/_modules/simstack/util/resource_config.html +532 -0
  194. simstack/static/docs/_modules/simstack/util/route_finder.html +390 -0
  195. simstack/static/docs/_modules/simstack/util/runner_util.html +487 -0
  196. simstack/static/docs/_modules/simstack/util/runner_utils.html +468 -0
  197. simstack/static/docs/_modules/simstack/util/safe_code_executor.html +510 -0
  198. simstack/static/docs/_modules/simstack/util/sample_config.html +414 -0
  199. simstack/static/docs/_modules/simstack/util/sensitive_content_filter.html +364 -0
  200. simstack/static/docs/_modules/simstack/util/setup_logging.html +365 -0
  201. simstack/static/docs/_modules/simstack/util/submit_to_watchdog.html +425 -0
  202. simstack/static/docs/_modules/simstack/util/toml_reader.html +482 -0
  203. simstack/static/docs/_modules/simstack/util/transform_file_name.html +357 -0
  204. simstack/static/docs/_modules/simstack/util/ui_tools.html +541 -0
  205. simstack/static/docs/_sources/architecture.rst.txt +25 -0
  206. simstack/static/docs/_sources/array_lists.rst.txt +60 -0
  207. simstack/static/docs/_sources/ci_pipeline.rst.txt +34 -0
  208. simstack/static/docs/_sources/data.rst.txt +175 -0
  209. simstack/static/docs/_sources/database_migrations.rst.txt +310 -0
  210. simstack/static/docs/_sources/datasets.rst.txt +93 -0
  211. simstack/static/docs/_sources/developer_guide.rst.txt +25 -0
  212. simstack/static/docs/_sources/docker_nodes.rst.txt +149 -0
  213. simstack/static/docs/_sources/files.rst.txt +159 -0
  214. simstack/static/docs/_sources/fire_and_forget_runner.rst.txt +67 -0
  215. simstack/static/docs/_sources/index.rst.txt +25 -0
  216. simstack/static/docs/_sources/installation.rst.txt +213 -0
  217. simstack/static/docs/_sources/lists.rst.txt +111 -0
  218. simstack/static/docs/_sources/mass_runner.rst.txt +91 -0
  219. simstack/static/docs/_sources/misc.rst.txt +106 -0
  220. simstack/static/docs/_sources/overview.rst.txt +91 -0
  221. simstack/static/docs/_sources/recovery.rst.txt +38 -0
  222. simstack/static/docs/_sources/resource_config.rst.txt +141 -0
  223. simstack/static/docs/_sources/simstack/modules/modules.rst.txt +7 -0
  224. simstack/static/docs/_sources/simstack/modules/simstack.core.rst.txt +205 -0
  225. simstack/static/docs/_sources/simstack/modules/simstack.core.services.rst.txt +109 -0
  226. simstack/static/docs/_sources/simstack/modules/simstack.methods.rst.txt +77 -0
  227. simstack/static/docs/_sources/simstack/modules/simstack.models.rst.txt +261 -0
  228. simstack/static/docs/_sources/simstack/modules/simstack.rst.txt +22 -0
  229. simstack/static/docs/_sources/simstack/modules/simstack.tables.rst.txt +45 -0
  230. simstack/static/docs/_sources/simstack/modules/simstack.util.rst.txt +381 -0
  231. simstack/static/docs/_sources/submit.rst.txt +141 -0
  232. simstack/static/docs/_sources/tables.rst.txt +50 -0
  233. simstack/static/docs/_sources/testing_complex_nodes.rst.txt +92 -0
  234. simstack/static/docs/_sources/ui_documentation.rst.txt +272 -0
  235. simstack/static/docs/_sources/workflows.rst.txt +446 -0
  236. simstack/static/docs/_static/base-stemmer.js +476 -0
  237. simstack/static/docs/_static/basic.css +906 -0
  238. simstack/static/docs/_static/cobalt2-theme.css +1 -0
  239. simstack/static/docs/_static/debug.css +69 -0
  240. simstack/static/docs/_static/docs-build-badge.css +51 -0
  241. simstack/static/docs/_static/docs-build-badge.js +51 -0
  242. simstack/static/docs/_static/doctools.js +150 -0
  243. simstack/static/docs/_static/documentation_options.js +13 -0
  244. simstack/static/docs/_static/english-stemmer.js +1066 -0
  245. simstack/static/docs/_static/file.png +0 -0
  246. simstack/static/docs/_static/language_data.js +13 -0
  247. simstack/static/docs/_static/minus.png +0 -0
  248. simstack/static/docs/_static/plus.png +0 -0
  249. simstack/static/docs/_static/pygments.css +250 -0
  250. simstack/static/docs/_static/scripts/furo-extensions.js +0 -0
  251. simstack/static/docs/_static/scripts/furo.js +3 -0
  252. simstack/static/docs/_static/scripts/furo.js.LICENSE.txt +7 -0
  253. simstack/static/docs/_static/scripts/furo.js.map +1 -0
  254. simstack/static/docs/_static/searchtools.js +693 -0
  255. simstack/static/docs/_static/skeleton.css +296 -0
  256. simstack/static/docs/_static/sphinx_highlight.js +159 -0
  257. simstack/static/docs/_static/styles/furo-extensions.css +2 -0
  258. simstack/static/docs/_static/styles/furo-extensions.css.map +1 -0
  259. simstack/static/docs/_static/styles/furo.css +2 -0
  260. simstack/static/docs/_static/styles/furo.css.map +1 -0
  261. simstack/static/docs/architecture.html +340 -0
  262. simstack/static/docs/array_lists.html +678 -0
  263. simstack/static/docs/ci_pipeline.html +385 -0
  264. simstack/static/docs/data.html +545 -0
  265. simstack/static/docs/database_migrations.html +652 -0
  266. simstack/static/docs/datasets.html +1268 -0
  267. simstack/static/docs/developer_guide.html +359 -0
  268. simstack/static/docs/docker_nodes.html +503 -0
  269. simstack/static/docs/files.html +718 -0
  270. simstack/static/docs/fire_and_forget_runner.html +641 -0
  271. simstack/static/docs/genindex.html +6390 -0
  272. simstack/static/docs/index.html +516 -0
  273. simstack/static/docs/installation.html +553 -0
  274. simstack/static/docs/lists.html +478 -0
  275. simstack/static/docs/mass_runner.html +481 -0
  276. simstack/static/docs/misc.html +454 -0
  277. simstack/static/docs/objects.inv +0 -0
  278. simstack/static/docs/overview.html +469 -0
  279. simstack/static/docs/py-modindex.html +1111 -0
  280. simstack/static/docs/recovery.html +371 -0
  281. simstack/static/docs/resource_config.html +590 -0
  282. simstack/static/docs/search.html +327 -0
  283. simstack/static/docs/searchindex.js +1 -0
  284. simstack/static/docs/simstack/modules/modules.html +489 -0
  285. simstack/static/docs/simstack/modules/simstack.core.html +1883 -0
  286. simstack/static/docs/simstack/modules/simstack.core.services.html +698 -0
  287. simstack/static/docs/simstack/modules/simstack.html +3060 -0
  288. simstack/static/docs/simstack/modules/simstack.methods.html +1150 -0
  289. simstack/static/docs/simstack/modules/simstack.models.html +13113 -0
  290. simstack/static/docs/simstack/modules/simstack.tables.html +635 -0
  291. simstack/static/docs/simstack/modules/simstack.util.html +3320 -0
  292. simstack/static/docs/submit.html +487 -0
  293. simstack/static/docs/tables.html +539 -0
  294. simstack/static/docs/testing_complex_nodes.html +458 -0
  295. simstack/static/docs/ui_documentation.html +788 -0
  296. simstack/static/docs/workflows.html +766 -0
  297. simstack/tables/__init__.py +0 -0
  298. simstack/tables/model_table.py +191 -0
  299. simstack/tables/node_children.py +219 -0
  300. simstack/tables/node_table.py +517 -0
  301. simstack/tables/table_builder.py +314 -0
  302. simstack/util/__init__.py +0 -0
  303. simstack/util/async_zip_utils.py +18 -0
  304. simstack/util/b64mixin.py +23 -0
  305. simstack/util/cleaned_json_schema.py +20 -0
  306. simstack/util/config_reader.py +179 -0
  307. simstack/util/custom_model_dump.py +75 -0
  308. simstack/util/database_information.py +160 -0
  309. simstack/util/db.py +1013 -0
  310. simstack/util/db_logger.py +117 -0
  311. simstack/util/default_from_dict.py +57 -0
  312. simstack/util/directory_iterator.py +216 -0
  313. simstack/util/docstring_parser.py +186 -0
  314. simstack/util/file_hashing.py +72 -0
  315. simstack/util/file_transfer_client.py +427 -0
  316. simstack/util/files.py +396 -0
  317. simstack/util/find_python_files.py +33 -0
  318. simstack/util/generate_ui_schema.py +80 -0
  319. simstack/util/generic_list_mixin.py +120 -0
  320. simstack/util/geometry_utils.py +118 -0
  321. simstack/util/get_module_path.py +20 -0
  322. simstack/util/git_pull.py +65 -0
  323. simstack/util/git_repository_status.py +95 -0
  324. simstack/util/import_module.py +63 -0
  325. simstack/util/importer.py +312 -0
  326. simstack/util/init_data_source.py +41 -0
  327. simstack/util/make_graph.py +107 -0
  328. simstack/util/make_table.py +837 -0
  329. simstack/util/mappings.py +41 -0
  330. simstack/util/minimal_route_finder.py +72 -0
  331. simstack/util/mock_db.py +144 -0
  332. simstack/util/module_path_checker.py +38 -0
  333. simstack/util/object_list_mixin.py +282 -0
  334. simstack/util/path_manager.py +223 -0
  335. simstack/util/project_root_finder.py +41 -0
  336. simstack/util/queue_watcher.py +262 -0
  337. simstack/util/resource_config.py +198 -0
  338. simstack/util/route_finder.py +74 -0
  339. simstack/util/runner_util.py +166 -0
  340. simstack/util/runner_utils.py +143 -0
  341. simstack/util/safe_code_executor.py +194 -0
  342. simstack/util/sample_config.py +98 -0
  343. simstack/util/sensitive_content_filter.py +48 -0
  344. simstack/util/setup_logging.py +49 -0
  345. simstack/util/submit_to_watchdog.py +106 -0
  346. simstack/util/toml_reader.py +142 -0
  347. simstack/util/transform_file_name.py +41 -0
  348. simstack/util/ui_tools.py +213 -0
  349. simstack-2.0.1.dist-info/METADATA +454 -0
  350. simstack-2.0.1.dist-info/RECORD +354 -0
  351. simstack-2.0.1.dist-info/WHEEL +5 -0
  352. simstack-2.0.1.dist-info/entry_points.txt +12 -0
  353. simstack-2.0.1.dist-info/licenses/LICENSE +21 -0
  354. simstack-2.0.1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,149 @@
1
+ .. _docker_nodes:
2
+
3
+ Creating Docker Containers for SimStack Nodes
4
+ =============================================
5
+
6
+ This document explains the mechanism for creating Docker containers for SimStack nodes, using the `psi4_node` as a practical example.
7
+
8
+ Mechanism Overview
9
+ ------------------
10
+
11
+ SimStack nodes can be containerized to ensure a consistent execution environment, especially when complex dependencies like quantum chemistry codes (e.g., Psi4) are involved.
12
+
13
+ The general approach involves:
14
+ 1. Creating a `Dockerfile` that sets up the environment and installs necessary software.
15
+ 2. Including SimStack and its core running mechanism in the container.
16
+ 3. Defining an `ENTRYPOINT` that calls the SimStack node runner.
17
+
18
+ Example: Psi4 Node
19
+ ------------------
20
+
21
+ The `psi4_node` is part of the `molecular_qm_psi4` package. It requires `psi4` and `crest` which are best installed via `micromamba` (a fast alternative to conda).
22
+
23
+ Node Implementation
24
+ ^^^^^^^^^^^^^^^^^^^
25
+
26
+ The node is defined in `molecular_qm_psi4/psi4_node.py`. It uses the `@node` decorator and interacts with SimStack's `node_runner`.
27
+
28
+ .. code-block:: python
29
+
30
+ import logging
31
+ try:
32
+ import psi4
33
+ except ImportError:
34
+ psi4 = None
35
+
36
+ from simstack.core.node import node
37
+ from simstack.core.simstack_result import SimstackResult
38
+ from molecular_qm_models import QMInput, QMResult, Molecule, Atom, MoleculeList
39
+
40
+ logger = logging.getLogger(__name__)
41
+
42
+ def qminput_to_psi4_molecule(molecule: Molecule, charge: int, multiplicity: int) -> str:
43
+ """Converts a Simstack Molecule to a Psi4 molecule string."""
44
+ mol_str = f"{charge} {multiplicity}\n"
45
+ for atom in molecule.atoms:
46
+ mol_str += f"{atom.element} {atom.x} {atom.y} {atom.z}\n"
47
+ return mol_str
48
+
49
+ @node
50
+ async def psi4_calculator(qm_input: QMInput, **kwargs) -> SimstackResult:
51
+ """
52
+ Psi4 node implementation using Python bindings.
53
+ """
54
+ node_runner = kwargs.get("node_runner")
55
+
56
+ if psi4 is None:
57
+ return node_runner.fail("Psi4 is not installed in the current environment.")
58
+
59
+ try:
60
+ # Set up Psi4 molecule
61
+ mol_str = qminput_to_psi4_molecule(qm_input.molecule, qm_input.charge, qm_input.multiplicity)
62
+ psi4.geometry(mol_str)
63
+
64
+ # ... (configuration and execution logic) ...
65
+
66
+ # Execute calculation
67
+ if qm_input.optimization:
68
+ energy, wfn = psi4.optimize(method, return_wfn=True)
69
+ # ...
70
+ else:
71
+ energy, wfn = psi4.energy(method, return_wfn=True)
72
+
73
+ qm_result = QMResult()
74
+ qm_result.final_energy = energy
75
+ # ...
76
+
77
+ node_runner.info("Psi4 calculation finished successfully")
78
+ node_runner.psi4_result = qm_result
79
+ return node_runner.succeed()
80
+
81
+ except Exception as e:
82
+ logger.error(f"Psi4 calculation failed: {str(e)}")
83
+ return node_runner.fail(f"Psi4 execution failed: {str(e)}")
84
+ finally:
85
+ if psi4 is not None:
86
+ psi4.core.clean()
87
+
88
+ Dockerfile Configuration
89
+ ^^^^^^^^^^^^^^^^^^^^^^^^
90
+
91
+ The `Dockerfile` for this node is located at `molecular_qm_psi4/Dockerfile`. It uses `micromamba` for environment management and `uv` for fast Python package installation.
92
+
93
+ .. code-block:: dockerfile
94
+
95
+ # Use a base image with micromamba (conda replacement)
96
+ FROM mambaorg/micromamba:latest
97
+
98
+ USER root
99
+
100
+ # Install git and other build essentials
101
+ RUN apt-get update && apt-get install -y --no-install-recommends \
102
+ git \
103
+ ca-certificates \
104
+ curl \
105
+ build-essential \
106
+ && rm -rf /var/lib/apt/lists/*
107
+
108
+ # Fix for _distutils_hack error: explicitly install setuptools
109
+ RUN micromamba install -y -n base -c conda-forge setuptools && \
110
+ micromamba clean --all --yes
111
+
112
+ # Install uv
113
+ RUN curl -LsSf https://astral.sh/uv/install.sh | sh
114
+ ENV PATH="/opt/conda/bin:/root/.local/bin:$PATH"
115
+
116
+ # Set up work directory
117
+ WORKDIR /app
118
+
119
+ # Install Psi4 and crest from conda
120
+ RUN micromamba install -y -n base -c conda-forge psi4 crest python=3.12 && \
121
+ micromamba clean --all --yes
122
+
123
+ # Copy the repositories/directories
124
+ COPY molecular_qm_models /app/molecular_qm_models
125
+ COPY molecular_qm_psi4 /app/molecular_qm_psi4
126
+ COPY molecular_qm_psi4/README.md /app/README.md
127
+ COPY simstack.toml /app/simstack.toml
128
+
129
+ ENV PYTHONPATH="/app:/app/molecular_qm_psi4"
130
+ ENV UV_PYTHON=/opt/conda/bin/python
131
+ ENV UV_PROJECT_ENVIRONMENT=/opt/conda
132
+ ENV PATH="/opt/conda/bin:/root/.local/bin:$PATH"
133
+
134
+ # Install dependencies directly
135
+ RUN uv pip install --system "simstack @ git+https://github.com/simstack/simstack.git@feature-test-generation" "setuptools>=80.9.0"
136
+
137
+ # Entrypoint: call the module directly
138
+ ENTRYPOINT ["python", "-m", "simstack.core.run_node"]
139
+
140
+ Key Components for Containerization
141
+ -----------------------------------
142
+
143
+ 1. **Base Image**: Use a lightweight and appropriate base image (e.g., `micromamba` for scientific software).
144
+ 2. **Environment Setup**: Install all non-Python dependencies (compilers, libraries, etc.).
145
+ 3. **Python Environment**: Install Python and required packages. The use of `uv` is recommended for performance.
146
+ 4. **Code Integration**: Copy your node code and its local dependencies into the container.
147
+ 5. **PYTHONPATH**: Ensure that the `PYTHONPATH` is set correctly so that SimStack can find your node and models.
148
+ 6. **SimStack Installation**: Install the `simstack` package itself.
149
+ 7. **Entrypoint**: The `ENTRYPOINT ["python", "-m", "simstack.core.run_node"]` is crucial as it tells SimStack how to execute the node within the container.
@@ -0,0 +1,159 @@
1
+ File Management
2
+ ===============
3
+
4
+ SimStack II provides a robust way to handle files within workflows. The core model for file management is ``FileStack``, which manages the storage and retrieval of individual files across different computational resources. For collections of files, ``FileList`` and ``FileListModel`` are provided.
5
+
6
+ FileStack
7
+ ---------
8
+
9
+ A ``FileStack`` represents a single file that can be stored in the database (in-memory) or tracked on various computational resources.
10
+
11
+ **Key Features:**
12
+
13
+ * **Storage Flexibility:** Files can be stored directly in MongoDB (compressed) or kept on disk at various locations.
14
+ * **Automatic Transfer:** When a node requires a ``FileStack`` that is not locally available, SimStack automatically handles the transfer.
15
+ * **Hashing:** Supports content-based hashing for verification and caching.
16
+
17
+ **Usage:**
18
+
19
+ To create a ``FileStack`` from a local file:
20
+
21
+ .. code-block:: python
22
+
23
+ from simstack.models.files import FileStack
24
+
25
+ # Create a FileStack and store its content in the database
26
+ file_stack = FileStack.from_local_file("path/to/my_file.txt", in_memory=True)
27
+
28
+ To create a ``FileStack`` from a string:
29
+
30
+ .. code-block:: python
31
+
32
+ file_stack = FileStack.from_string("Hello SimStack!", "hello.txt")
33
+
34
+ To retrieve the file in a node:
35
+
36
+ .. code-block:: python
37
+
38
+ @node
39
+ def process_file(input_file: FileStack, **kwargs):
40
+ # This ensures the file is available locally
41
+ local_path = input_file.get()
42
+
43
+ with open(local_path, "r") as f:
44
+ content = f.read()
45
+ ...
46
+
47
+ FileList and FileListModel
48
+ --------------------------
49
+
50
+ When dealing with multiple files, you can use ``FileList`` or ``FileListModel``. Both models now inherit from ``ObjectListMixin``, providing a consistent and powerful interface for managing collections of files.
51
+
52
+ Key features of both:
53
+ * **Dict/List-like API**: Supports standard operations like ``append()``, ``extend()``, ``insert()``, ``remove()``, ``pop()``, and slicing.
54
+ * **Regex Search**: Use ``find(pattern)`` or ``find_all(pattern)`` to search for files by their names using regular expressions.
55
+ * **Database Integration**: Handles saving and loading of ``FileStack`` references automatically.
56
+
57
+ FileList (Embedded)
58
+ ~~~~~~~~~~~~~~~~~~~
59
+
60
+ ``FileList`` is an ``EmbeddedModel``. It is suitable for smaller collections of files where you want to keep them directly within the parent model.
61
+
62
+ .. code-block:: python
63
+
64
+ from simstack.models.file_list import FileList
65
+ from simstack.models.files import FileStack
66
+
67
+ file_list = FileList()
68
+ file_list.append(FileStack.from_local_file("file1.txt"))
69
+ file_list.append(FileStack.from_local_file("file2.txt"))
70
+
71
+ # Search for a file
72
+ config_file = file_list.find(r".*\.conf")
73
+
74
+ FileListModel (Referenced)
75
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
76
+
77
+ ``FileListModel`` is a top-level ``Model``. This is preferred for large collections or when ``FileStack`` objects need to be shared across multiple models.
78
+
79
+ .. code-block:: python
80
+
81
+ from simstack.models.file_list import FileListModel
82
+
83
+ file_list_model = FileListModel()
84
+ # Note: saving the parent model will automatically save new FileStack objects
85
+ file_list_model.append(FileStack.from_local_file("large_file.dat"))
86
+
87
+ Methods and Mixins
88
+ ~~~~~~~~~~~~~~~~~~
89
+
90
+ Both ``FileList`` and ``FileListModel`` provide a rich set of methods for managing the collection. For more details on the underlying list behaviors provided by ``ObjectListMixin``, see :doc:`lists`.
91
+
92
+ API Reference
93
+ -------------
94
+
95
+ .. autoclass:: simstack.models.file_list.FileList
96
+ :members:
97
+ :undoc-members:
98
+ :show-inheritance:
99
+
100
+ .. autoclass:: simstack.models.file_list.FileListModel
101
+ :members:
102
+ :undoc-members:
103
+ :show-inheritance:
104
+
105
+ External and Internal Files and Resources
106
+ -----------------------------------------
107
+
108
+ Workflows need access to external resources, such as files, databases, and URLs.
109
+ External resources are only input and otherwise not managed. Internal resources, mostly
110
+ files, are managed by the workflow by certain specfications.
111
+
112
+ External resources differ from internal resources in that we cannot decide based
113
+ on the data describing the resource, whether its "value" or content has changed
114
+ since the last call.
115
+
116
+
117
+ Input Data
118
+ ----------
119
+
120
+ Files can (mostly) be hashed. For all other use cases an intermediate storage (electron) can be implemented that
121
+ stores the "query" and the "result" of the query (assuming that the query and the result can be hashed).
122
+ This service electron returns the result with a flag whether the result has changed.
123
+
124
+
125
+ .. code-block:: python
126
+
127
+ def complex_compute(data, reuse=True):
128
+ # complex computation based on data
129
+ return result
130
+
131
+ def compute_electron(url):
132
+ result, changed = get_external(url)
133
+ if changed:
134
+ result = complex_compute(url)
135
+ electron.set(hash, result)
136
+ return result
137
+
138
+ def get_external(query):
139
+ hash = hash(query)
140
+ result, changed = get(hash)
141
+ if changed:
142
+ result = query_data(query)
143
+ electron.set(hash, result)
144
+ return result
145
+
146
+
147
+ Output Data
148
+ -----------
149
+
150
+ Only Output Data is generated in SimStack II. Because "human readable" data is core concept of the new version all
151
+ digestible output should be parsed to JSON. The question is how to handle large-scale data, which is costly to
152
+ generate and which may have un-anticipated uses later on. An example would be MD trajectories.
153
+
154
+ This data should be handled as part of the research data management plan, which we plan to implement as an integral
155
+ part of the WF environment anyway. Every WANO will upload all inputs and outputs to the RDM storage anyway.
156
+ The JSON output should thus contain records of all files that have been uploaded.
157
+
158
+ The issue arising with large data is whether it makes sense to pass only the remote info
159
+ When a WANO is re-executed
@@ -0,0 +1,67 @@
1
+ FireAndForgetRunner
2
+ ====================
3
+
4
+ .. autoclass:: simstack.methods.fire_and_forget_runner.FireAndForgetRunner
5
+ :members:
6
+ :undoc-members:
7
+ :show-inheritance:
8
+
9
+ The ``FireAndForgetRunner`` is a specialized ``NodeRunner`` utility designed to execute multiple independent node tasks in parallel, similar to ``MassRunner``. However, unlike ``MassRunner`` which aggregates all results into a single ``DataSet``, the ``FireAndForgetRunner`` persists each individual result immediately to the database as a ``FireAndForgetResult`` record.
10
+
11
+ Key Features
12
+ ------------
13
+
14
+ * **Parallel Execution**: Leverages ``asyncio`` to run multiple nodes concurrently.
15
+ * **Concurrency Control**: Supports an optional ``max_concurrency`` parameter using an internal semaphore.
16
+ * **Immediate Persistence**: Saves a ``FireAndForgetResult`` to the database as soon as each individual node call finishes, without waiting for other tasks.
17
+ * **Result Mapping**: Automatically captures and stores input arguments and return values (supporting ``Model``, ``SimstackResult``, and lists of ``Model``) into a dictionary.
18
+ * **Call Path Tracking**: Records the full call path for each task, facilitating traceability.
19
+
20
+ Usage
21
+ -----
22
+
23
+ The ``FireAndForgetRunner`` is typically used within an ``async with`` block inside a parent node.
24
+
25
+ .. code-block:: python
26
+
27
+ from simstack.methods.fire_and_forget_runner import FireAndForgetRunner
28
+ from simstack.models import IntData
29
+
30
+ @node
31
+ async def my_parallel_manager(count: IntData, **kwargs):
32
+ # Initialize FireAndForgetRunner with the target node
33
+ async with FireAndForgetRunner(target_node, max_concurrency=5, **kwargs) as runner:
34
+ for i in range(count.value):
35
+ # Create tasks for individual inputs
36
+ runner.create_tasks(IntData(value=i))
37
+
38
+ # After the block, all tasks are finished and persisted individually
39
+ return True
40
+
41
+ Each call to a node via ``FireAndForgetRunner`` creates a ``FireAndForgetResult`` entry in the database.
42
+
43
+ FireAndForgetResult Model
44
+ -------------------------
45
+
46
+ Each result is stored using the ``FireAndForgetResult`` model:
47
+
48
+ .. autoclass:: simstack.models.fire_and_forget_result.FireAndForgetResult
49
+ :members:
50
+ :undoc-members:
51
+ :show-inheritance:
52
+
53
+ Fields:
54
+ ^^^^^^^
55
+
56
+ * **call_path**: A string representing the concatenated path of the runner and the node (e.g., ``/my_parallel_manager/target_node``).
57
+ * **models**: A dictionary containing all input arguments (prefixed with ``arg_``) and output results (prefixed with ``result_``).
58
+ * **success**: A boolean flag indicating if the node call was successful.
59
+ * **next_step**: A boolean flag indicating if this result triggers a next step.
60
+
61
+ Comparison with MassRunner
62
+ --------------------------
63
+
64
+ While both runners facilitate parallel execution, they serve different persistence needs:
65
+
66
+ * **MassRunner**: Best for batch jobs where you want a single consolidated ``DataSet`` at the end. It supports result recovery and caching based on argument hashes.
67
+ * **FireAndForgetRunner**: Best for scenarios where you want immediate visibility of results as they arrive, or when the number of tasks is extremely large and you want to avoid holding all results in memory/aggregated model before saving. It does not currently support the same recovery/caching mechanisms as ``MassRunner``.
@@ -0,0 +1,25 @@
1
+ .. SimStack II documentation master file, created by
2
+ sphinx-quickstart on Fri Feb 7 10:13:05 2025.
3
+ You can adapt this file completely to your liking, but it should at least
4
+ contain the root `toctree` directive.
5
+
6
+ SimStack II Documentation
7
+ =========================
8
+ .. toctree::
9
+ :maxdepth: 3
10
+ :caption: Contents:
11
+
12
+ overview
13
+ workflows
14
+ ui_documentation
15
+
16
+ developer_guide
17
+
18
+ installation
19
+ simstack/modules/modules
20
+
21
+ Indices and tables
22
+ ==================
23
+ * :ref:`genindex`
24
+ * :ref:`modindex`
25
+ * :ref:`search`
@@ -0,0 +1,213 @@
1
+ Simstack II Setup
2
+ =================
3
+
4
+ UI Setup
5
+ --------
6
+
7
+ 1. Register at ``simstack.int.kit.edu`` (inside the KIT network). This will create an **inactive** user.
8
+ 2. Email the maintainer so your account can be activated and you can receive:
9
+
10
+ * a database name
11
+ * a database password
12
+
13
+ (This is not automated yet.)
14
+ 3. Go to your profile and upload your resources configuration.
15
+
16
+ Example resources configuration
17
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18
+
19
+ .. code-block:: json
20
+
21
+ [
22
+ {
23
+ "id": "<object-id>",
24
+ "resource_str": "local-home",
25
+ "hostname": "localhost",
26
+ "workdir": "$HOME/simstack",
27
+ "python_paths": [],
28
+ "environment_start": "",
29
+ "ssh_key": "$HOME/.ssh/id_rsa",
30
+ "routes": [
31
+ "int-nano"
32
+ ],
33
+ "queue": "default"
34
+ },
35
+ {
36
+ "id": "<object-id>",
37
+ "resource_str": "int-nano",
38
+ "hostname": "int-nano.int.kit.edu",
39
+ "workdir": "$HOME/simstack",
40
+ "python_paths": [],
41
+ "environment_start": "",
42
+ "ssh_key": "$HOME/.ssh/id_rsa",
43
+ "routes": [],
44
+ "queue": "default"
45
+ },
46
+ {
47
+ "id": "<object-id>",
48
+ "resource_str": "justus",
49
+ "hostname": "justus2.uni-ulm.de",
50
+ "workdir": "$HOME/simstack",
51
+ "python_paths": [],
52
+ "environment_start": "",
53
+ "ssh_key": "$HOME/.ssh/id_rsa",
54
+ "routes": [
55
+ "int-nano",
56
+ "local-home"
57
+ ],
58
+ "queue": "slurm-queue"
59
+ }
60
+ ]
61
+
62
+
63
+ Installation of Runners
64
+ -----------------------
65
+
66
+ Prerequisites
67
+ ~~~~~~~~~~~~~
68
+
69
+ * Install ``uv``:
70
+ https://docs.astral.sh/uv/getting-started/installation/
71
+ * Create directories:
72
+
73
+ * ``$HOME/simstack``
74
+ * ``$HOME/projects``
75
+
76
+ Clone the repository
77
+ ~~~~~~~~~~~~~~~~~~~~
78
+
79
+ In ``$HOME/projects`` clone the repository:
80
+
81
+ * SSH (if your SSH key is added to GitLab):
82
+
83
+ .. code-block:: bash
84
+
85
+ git clone git@gitlab.kit.edu:kit/ag_wenzel/simstack-model.git
86
+
87
+ * HTTPS (if you have a token):
88
+
89
+ .. code-block:: bash
90
+
91
+ git clone https://gitlab.kit.edu/kit/ag_wenzel/simstack-model.git
92
+
93
+ Then:
94
+
95
+ .. code-block:: bash
96
+
97
+ cd simstack-model
98
+
99
+
100
+ Host-specific environment notes
101
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
102
+
103
+ On ``int-nano`` you may need to override the C/C++ toolchain because the default compiler is too old.
104
+ Add the following to your ``~/.bashrc``:
105
+
106
+ .. code-block:: bash
107
+
108
+ export PATH=/path/to/gcc-12.3/bin:$PATH
109
+ export LD_LIBRARY_PATH=/path/to/gcc-12.3/lib64:$LD_LIBRARY_PATH
110
+ export CC=/path/to/gcc-12.3/bin/gcc
111
+ export CXX=/path/to/gcc-12.3/bin/g++
112
+
113
+ Set the paths to the location where gcc-12.3 is installed (e.g. ``/shared/user/ww`` or ``/home/ws/<user>``).
114
+ It is unclear what you need on other systems.
115
+
116
+ On ``justus`` you may need:
117
+
118
+ .. code-block:: bash
119
+
120
+ export LD_LIBRARY_PATH=$HOME/local/lib:$MKLROOT/lib/intel64:$LD_LIBRARY_PATH
121
+
122
+
123
+ Sync dependencies
124
+ ~~~~~~~~~~~~~~~~~
125
+
126
+ .. code-block:: bash
127
+
128
+ source ~/.bashrc
129
+ uv sync --locked
130
+
131
+ Note: This will install all required dependencies, including ``mongomock`` and ``mongomock-motor``, which are used for in-memory database support during testing.
132
+
133
+
134
+ .. _configuration-file:
135
+
136
+ Create ``simstack.toml``
137
+ ~~~~~~~~~~~~~~~~~~~~~~~~
138
+
139
+ Create a ``simstack.toml`` file (placeholders shown below):
140
+
141
+ .. code-block:: toml
142
+
143
+ [parameters]
144
+ [parameters.general]
145
+ use_db = true
146
+ workdir_self = "<PATH_TO_SIMSTACK_DATA_DIR>"
147
+ # these are parameters for one user for all hosts
148
+
149
+ [parameters.db]
150
+ database = "<NAME>_data"
151
+ test_database = "<NAME>_test"
152
+ connection_string = "mongodb://<USER>:<PASSWORD>@<HOST>:27017/"
153
+ mongodump_path = "<PATH_TO_MONGODUMP_EXE>"
154
+
155
+ Where:
156
+
157
+ * ``<PATH_TO_SIMSTACK_DATA_DIR>`` is the path to the data directory created above (e.g. ``$HOME/simstack``)
158
+ * ``<NAME>`` is your database name (often your first name in lower case)
159
+ * ``<PASSWORD>`` is the database password
160
+ * ``<PATH_TO_MONGODUMP_EXE>`` is the path to the ``mongodump`` executable (required for database backups)
161
+
162
+
163
+ Initialize the system
164
+ ~~~~~~~~~~~~~~~~~~~~~
165
+
166
+ This will happen automatically when the default runner starts.
167
+
168
+ .. code-block:: bash
169
+
170
+ uv run create_model_table --dir examples --dir applications
171
+ uv run create_node_table --dir examples --dir applications
172
+
173
+ Note: this may crash if your database is very old.
174
+
175
+
176
+
177
+
178
+ Configure Git identity (required)
179
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
180
+
181
+ Because the runner performs Git operations, ensure you have:
182
+
183
+ .. code-block:: bash
184
+
185
+ git config --global user.email "<YOUR_EMAIL_ADDRESS>"
186
+ git config --global user.name "<YOUR_NAME>"
187
+
188
+
189
+ Start the runner
190
+ ~~~~~~~~~~~~~~~~
191
+
192
+ From ``$HOME/projects/simstack-model``:
193
+
194
+ .. code-block:: bash
195
+
196
+ nohup uv run simstack_runner --resource <RESOURCE_NAME> &
197
+
198
+ Where ``<RESOURCE_NAME>`` is one of the resources you defined in the UI.
199
+
200
+
201
+
202
+ Ignore after this line
203
+ ----------------------
204
+
205
+ Notes / scratch commands:
206
+
207
+ .. code-block:: bash
208
+
209
+ git submodule add -b new-init https://git@github.com/simstack/simstack.git simstack
210
+
211
+ .. code-block:: bash
212
+
213
+ uv lock --upgrade-package <package-name>