dpdispatcher 0.5.11__tar.gz → 0.6.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of dpdispatcher might be problematic. Click here for more details.

Files changed (262) hide show
  1. dpdispatcher-0.6.1/.github/dependabot.yml +6 -0
  2. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/.github/workflows/ci-docker.yml +7 -7
  3. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/.github/workflows/machines.yml +1 -1
  4. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/.github/workflows/publish_conda.yml +1 -1
  5. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/.github/workflows/pyright.yml +2 -2
  6. dpdispatcher-0.6.1/.github/workflows/release.yml +24 -0
  7. dpdispatcher-0.6.1/.github/workflows/test-bohrium.yml +44 -0
  8. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/.github/workflows/test.yml +7 -3
  9. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/.pre-commit-config.yaml +3 -6
  10. dpdispatcher-0.6.1/.readthedocs.yaml +24 -0
  11. dpdispatcher-0.6.1/Dockerfile +14 -0
  12. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/PKG-INFO +24 -2
  13. dpdispatcher-0.6.1/doc/cli.rst +9 -0
  14. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/doc/conf.py +1 -0
  15. dpdispatcher-0.6.1/doc/examples/template.md +16 -0
  16. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/doc/index.rst +5 -1
  17. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/doc/machine.rst +1 -1
  18. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/doc/resources.rst +1 -1
  19. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/doc/task.rst +1 -1
  20. dpdispatcher-0.6.1/dpdispatcher/__init__.py +21 -0
  21. dpdispatcher-0.6.1/dpdispatcher/__main__.py +8 -0
  22. dpdispatcher-0.6.1/dpdispatcher/_version.py +16 -0
  23. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/dpdispatcher/base_context.py +1 -1
  24. dpdispatcher-0.6.1/dpdispatcher/contexts/__init__.py +11 -0
  25. {dpdispatcher-0.5.11/dpdispatcher → dpdispatcher-0.6.1/dpdispatcher/contexts}/dp_cloud_server_context.py +7 -3
  26. {dpdispatcher-0.5.11/dpdispatcher → dpdispatcher-0.6.1/dpdispatcher/contexts}/hdfs_context.py +2 -2
  27. {dpdispatcher-0.5.11/dpdispatcher → dpdispatcher-0.6.1/dpdispatcher/contexts}/local_context.py +51 -14
  28. {dpdispatcher-0.5.11/dpdispatcher → dpdispatcher-0.6.1/dpdispatcher/contexts}/openapi_context.py +3 -2
  29. {dpdispatcher-0.5.11/dpdispatcher → dpdispatcher-0.6.1/dpdispatcher/contexts}/ssh_context.py +113 -34
  30. dpdispatcher-0.6.1/dpdispatcher/dlog.py +31 -0
  31. dpdispatcher-0.6.1/dpdispatcher/dpdisp.py +121 -0
  32. dpdispatcher-0.6.1/dpdispatcher/entrypoints/__init__.py +1 -0
  33. dpdispatcher-0.6.1/dpdispatcher/entrypoints/gui.py +31 -0
  34. dpdispatcher-0.6.1/dpdispatcher/entrypoints/submission.py +83 -0
  35. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/dpdispatcher/machine.py +18 -4
  36. dpdispatcher-0.6.1/dpdispatcher/machines/__init__.py +11 -0
  37. {dpdispatcher-0.5.11/dpdispatcher → dpdispatcher-0.6.1/dpdispatcher/machines}/distributed_shell.py +20 -4
  38. {dpdispatcher-0.5.11/dpdispatcher → dpdispatcher-0.6.1/dpdispatcher/machines}/dp_cloud_server.py +21 -5
  39. {dpdispatcher-0.5.11/dpdispatcher → dpdispatcher-0.6.1/dpdispatcher/machines}/fugaku.py +18 -5
  40. {dpdispatcher-0.5.11/dpdispatcher → dpdispatcher-0.6.1/dpdispatcher/machines}/lsf.py +20 -4
  41. {dpdispatcher-0.5.11/dpdispatcher → dpdispatcher-0.6.1/dpdispatcher/machines}/openapi.py +23 -4
  42. {dpdispatcher-0.5.11/dpdispatcher → dpdispatcher-0.6.1/dpdispatcher/machines}/pbs.py +30 -4
  43. {dpdispatcher-0.5.11/dpdispatcher → dpdispatcher-0.6.1/dpdispatcher/machines}/shell.py +17 -3
  44. {dpdispatcher-0.5.11/dpdispatcher → dpdispatcher-0.6.1/dpdispatcher/machines}/slurm.py +37 -6
  45. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/dpdispatcher/submission.py +83 -39
  46. dpdispatcher-0.6.1/dpdispatcher/utils/__init__.py +1 -0
  47. {dpdispatcher-0.5.11/dpdispatcher → dpdispatcher-0.6.1/dpdispatcher/utils}/dpcloudserver/client.py +1 -1
  48. {dpdispatcher-0.5.11/dpdispatcher → dpdispatcher-0.6.1/dpdispatcher/utils}/hdfs_cli.py +1 -1
  49. dpdispatcher-0.6.1/dpdispatcher/utils/record.py +79 -0
  50. {dpdispatcher-0.5.11/dpdispatcher → dpdispatcher-0.6.1/dpdispatcher/utils}/utils.py +14 -2
  51. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/dpdispatcher.egg-info/PKG-INFO +24 -2
  52. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/dpdispatcher.egg-info/SOURCES.txt +42 -44
  53. dpdispatcher-0.6.1/dpdispatcher.egg-info/entry_points.txt +7 -0
  54. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/dpdispatcher.egg-info/requires.txt +7 -1
  55. dpdispatcher-0.6.1/examples/resources/template.slurm +7 -0
  56. dpdispatcher-0.6.1/examples/resources/tiger.json +12 -0
  57. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/pyproject.toml +22 -5
  58. dpdispatcher-0.6.1/tests/context.py +34 -0
  59. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/sample_class.py +13 -3
  60. dpdispatcher-0.6.1/tests/test_cli.py +12 -0
  61. dpdispatcher-0.6.1/tests/test_examples.py +41 -0
  62. dpdispatcher-0.6.1/tests/test_gui.py +11 -0
  63. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_local_context.py +9 -1
  64. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_lsf_script_generation.py +70 -0
  65. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_run_submission.py +45 -0
  66. dpdispatcher-0.6.1/tests/test_run_submission_bohrium.py +72 -0
  67. dpdispatcher-0.6.1/tests/test_slurm_script_generation.py +150 -0
  68. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_ssh_context.py +6 -2
  69. dpdispatcher-0.5.11/.github/workflows/release.yml +0 -7
  70. dpdispatcher-0.5.11/Dockerfile +0 -5
  71. dpdispatcher-0.5.11/dpdispatcher/__init__.py +0 -103
  72. dpdispatcher-0.5.11/dpdispatcher/_version.py +0 -4
  73. dpdispatcher-0.5.11/dpdispatcher/dpcloudserver/temp_test.py +0 -90
  74. dpdispatcher-0.5.11/dpdispatcher/dpdisp.py +0 -9
  75. dpdispatcher-0.5.11/dpdispatcher.egg-info/entry_points.txt +0 -2
  76. dpdispatcher-0.5.11/tests/context.py +0 -47
  77. dpdispatcher-0.5.11/tests/lsf/context.py +0 -22
  78. dpdispatcher-0.5.11/tests/lsf/test_dispatcher.py +0 -48
  79. dpdispatcher-0.5.11/tests/lsf/test_lsf_local.py +0 -243
  80. dpdispatcher-0.5.11/tests/old/test_dispatcher_utils.py +0 -41
  81. dpdispatcher-0.5.11/tests/old/test_lazy_local_context.py +0 -202
  82. dpdispatcher-0.5.11/tests/old/test_local_context.py +0 -390
  83. dpdispatcher-0.5.11/tests/old/test_local_session.py +0 -14
  84. dpdispatcher-0.5.11/tests/old/test_ssh_context.py +0 -272
  85. dpdispatcher-0.5.11/tests/pbs/context.py +0 -22
  86. dpdispatcher-0.5.11/tests/pbs/test_dispatcher.py +0 -48
  87. dpdispatcher-0.5.11/tests/pbs/test_pbs_local.py +0 -99
  88. dpdispatcher-0.5.11/tests/shell/context.py +0 -22
  89. dpdispatcher-0.5.11/tests/shell/test_dispatcher.py +0 -46
  90. dpdispatcher-0.5.11/tests/shell/test_shell_local.py +0 -278
  91. dpdispatcher-0.5.11/tests/shell/test_shell_ssh.py +0 -169
  92. dpdispatcher-0.5.11/tests/slurm/context.py +0 -22
  93. dpdispatcher-0.5.11/tests/slurm/test_dispatcher.py +0 -54
  94. dpdispatcher-0.5.11/tests/slurm/test_dispatcher_lazy_local.py +0 -54
  95. dpdispatcher-0.5.11/tests/slurm/test_slurm_lazy_local.py +0 -251
  96. dpdispatcher-0.5.11/tests/slurm/test_slurm_local.py +0 -249
  97. dpdispatcher-0.5.11/tests/slurm/test_slurm_ssh.py +0 -257
  98. dpdispatcher-0.5.11/tests/test_slurm_script_generation.py +0 -81
  99. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/.github/workflows/mirror_gitee.yml +0 -0
  100. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/.gitignore +0 -0
  101. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/CONTRIBUTING.md +0 -0
  102. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/LICENSE +0 -0
  103. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/README.md +0 -0
  104. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/ci/LICENSE +0 -0
  105. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/ci/README.md +0 -0
  106. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/ci/pbs/docker-compose.yml +0 -0
  107. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/ci/pbs/start-pbs.sh +0 -0
  108. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/ci/pbs.sh +0 -0
  109. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/ci/slurm/docker-compose.yml +0 -0
  110. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/ci/slurm/register_cluster.sh +0 -0
  111. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/ci/slurm/start-slurm.sh +0 -0
  112. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/ci/slurm.sh +0 -0
  113. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/ci/ssh/docker-compose.yml +0 -0
  114. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/ci/ssh/start-ssh.sh +0 -0
  115. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/ci/ssh.sh +0 -0
  116. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/ci/ssh_rsync.sh +0 -0
  117. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/codecov.yml +0 -0
  118. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/conda/conda_build_config.yaml +0 -0
  119. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/conda/meta.yaml +0 -0
  120. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/doc/.gitignore +0 -0
  121. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/doc/Makefile +0 -0
  122. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/doc/batch.md +0 -0
  123. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/doc/context.md +0 -0
  124. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/doc/credits.rst +0 -0
  125. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/doc/dpdispatcher_on_yarn.md +0 -0
  126. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/doc/examples/expanse.md +0 -0
  127. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/doc/examples/g16.md +0 -0
  128. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/doc/examples/shell.md +0 -0
  129. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/doc/getting-started.md +0 -0
  130. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/doc/install.md +0 -0
  131. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/doc/make.bat +0 -0
  132. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/doc/requirements.txt +0 -0
  133. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/dpdispatcher/arginfo.py +0 -0
  134. {dpdispatcher-0.5.11/dpdispatcher → dpdispatcher-0.6.1/dpdispatcher/contexts}/lazy_local_context.py +0 -0
  135. {dpdispatcher-0.5.11/dpdispatcher → dpdispatcher-0.6.1/dpdispatcher/utils}/dpcloudserver/__init__.py +0 -0
  136. {dpdispatcher-0.5.11/dpdispatcher → dpdispatcher-0.6.1/dpdispatcher/utils}/dpcloudserver/config.py +0 -0
  137. {dpdispatcher-0.5.11/dpdispatcher → dpdispatcher-0.6.1/dpdispatcher/utils}/dpcloudserver/retcode.py +0 -0
  138. {dpdispatcher-0.5.11/dpdispatcher → dpdispatcher-0.6.1/dpdispatcher/utils}/dpcloudserver/zip_file.py +0 -0
  139. /dpdispatcher-0.5.11/dpdispatcher/JobStatus.py → /dpdispatcher-0.6.1/dpdispatcher/utils/job_status.py +0 -0
  140. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/dpdispatcher.egg-info/dependency_links.txt +0 -0
  141. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/dpdispatcher.egg-info/top_level.txt +0 -0
  142. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/examples/machine/expanse.json +0 -0
  143. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/examples/machine/lazy_local.json +0 -0
  144. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/examples/machine/mandu.json +0 -0
  145. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/examples/resources/expanse_cpu.json +0 -0
  146. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/examples/resources/mandu.json +0 -0
  147. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/examples/task/deepmd-kit.json +0 -0
  148. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/examples/task/g16.json +0 -0
  149. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/scripts/script_gen_dargs_docs.py +0 -0
  150. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/scripts/script_gen_dargs_json.py +0 -0
  151. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/setup.cfg +0 -0
  152. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/.gitignore +0 -0
  153. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/__init__.py +0 -0
  154. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/batch.json +0 -0
  155. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/debug_test_class_submission_init.py +0 -0
  156. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/devel_test_ali_ehpc.py +0 -0
  157. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/devel_test_dp_cloud_server.py +0 -0
  158. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/devel_test_lazy_ali_ehpc.py +0 -0
  159. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/devel_test_lsf.py +0 -0
  160. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/devel_test_shell.py +0 -0
  161. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/devel_test_slurm.py +0 -0
  162. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/devel_test_ssh_ali_ehpc.py +0 -0
  163. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/graph.pb +0 -0
  164. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/jsons/job.json +0 -0
  165. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/jsons/machine.json +0 -0
  166. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/jsons/machine_ali_ehpc.json +0 -0
  167. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/jsons/machine_center.json +0 -0
  168. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/jsons/machine_diffenert.json +0 -0
  169. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/jsons/machine_dp_cloud_server.json +0 -0
  170. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/jsons/machine_fugaku.json +0 -0
  171. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/jsons/machine_if_cuda_multi_devices.json +0 -0
  172. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/jsons/machine_lazy_local_lsf.json +0 -0
  173. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/jsons/machine_lazy_local_slurm.json +0 -0
  174. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/jsons/machine_lazylocal_shell.json +0 -0
  175. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/jsons/machine_local_fugaku.json +0 -0
  176. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/jsons/machine_local_shell.json +0 -0
  177. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/jsons/machine_lsf.json +0 -0
  178. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/jsons/machine_openapi.json +0 -0
  179. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/jsons/machine_slurm.json +0 -0
  180. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/jsons/machine_yarn.json +0 -0
  181. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/jsons/resources.json +0 -0
  182. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/jsons/submission.json +0 -0
  183. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/jsons/task.json +0 -0
  184. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/script_gen_json.py +0 -0
  185. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/slurm_test.env +0 -0
  186. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_argcheck.py +0 -0
  187. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_class_job.py +0 -0
  188. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_class_machine.py +0 -0
  189. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_class_machine_dispatch.py +0 -0
  190. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_class_resources.py +0 -0
  191. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_class_submission.py +0 -0
  192. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_class_submission_init.py +0 -0
  193. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_class_task.py +0 -0
  194. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_context_dir/0_md/bct-1/conf.lmp +0 -0
  195. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_context_dir/0_md/bct-1/input.lammps +0 -0
  196. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_context_dir/0_md/bct-1/some_dir/some_file +0 -0
  197. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_context_dir/0_md/bct-2/conf.lmp +0 -0
  198. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_context_dir/0_md/bct-2/input.lammps +0 -0
  199. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_context_dir/0_md/bct-3/conf.lmp +0 -0
  200. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_context_dir/0_md/bct-3/input.lammps +0 -0
  201. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_context_dir/0_md/bct-4/conf.lmp +0 -0
  202. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_context_dir/0_md/bct-4/input.lammps +0 -0
  203. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_context_dir/0_md/dir with space/file with space +0 -0
  204. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_context_dir/0_md/graph.pb +0 -0
  205. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_context_dir/0_md/some_dir/some_file +0 -0
  206. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_group_size.py +0 -0
  207. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_hdfs_context.py +0 -0
  208. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_hdfs_dir/0_md/bct-1/conf.lmp +0 -0
  209. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_hdfs_dir/0_md/bct-1/input.lammps +0 -0
  210. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_hdfs_dir/0_md/bct-2/conf.lmp +0 -0
  211. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_hdfs_dir/0_md/bct-2/input.lammps +0 -0
  212. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_hdfs_dir/0_md/bct-3/conf.lmp +0 -0
  213. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_hdfs_dir/0_md/bct-3/input.lammps +0 -0
  214. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_hdfs_dir/0_md/bct-4/conf.lmp +0 -0
  215. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_hdfs_dir/0_md/bct-4/input.lammps +0 -0
  216. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_hdfs_dir/0_md/graph.pb +0 -0
  217. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_if_cuda_multi_devices/test_dir/test.txt +0 -0
  218. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_import_classes.py +0 -0
  219. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_lazy_local_context.py +0 -0
  220. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_lsf_dir/0_md/bct-1/conf.lmp +0 -0
  221. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_lsf_dir/0_md/bct-1/input.lammps +0 -0
  222. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_lsf_dir/0_md/bct-2/conf.lmp +0 -0
  223. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_lsf_dir/0_md/bct-2/input.lammps +0 -0
  224. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_lsf_dir/0_md/bct-3/conf.lmp +0 -0
  225. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_lsf_dir/0_md/bct-3/input.lammps +0 -0
  226. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_lsf_dir/0_md/bct-4/conf.lmp +0 -0
  227. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_lsf_dir/0_md/bct-4/input.lammps +0 -0
  228. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_lsf_dir/0_md/graph.pb +0 -0
  229. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_lsf_dir/0_md/submission.json +0 -0
  230. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_pbs_dir/0_md/bct-1/conf.lmp +0 -0
  231. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_pbs_dir/0_md/bct-1/input.lammps +0 -0
  232. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_pbs_dir/0_md/bct-2/conf.lmp +0 -0
  233. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_pbs_dir/0_md/bct-2/input.lammps +0 -0
  234. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_pbs_dir/0_md/bct-3/conf.lmp +0 -0
  235. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_pbs_dir/0_md/bct-3/input.lammps +0 -0
  236. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_pbs_dir/0_md/bct-4/conf.lmp +0 -0
  237. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_pbs_dir/0_md/bct-4/input.lammps +0 -0
  238. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_pbs_dir/0_md/graph.pb +0 -0
  239. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_retry.py +0 -0
  240. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_run_submission_ratio_unfinished.py +0 -0
  241. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_shell_cuda_multi_devices.py +0 -0
  242. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_shell_trival.py +0 -0
  243. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_shell_trival_dir/fail_dir/mock_fail_task.txt +0 -0
  244. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_shell_trival_dir/parent_dir/dir with space/example.txt +0 -0
  245. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_shell_trival_dir/parent_dir/dir1/example.txt +0 -0
  246. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_shell_trival_dir/parent_dir/dir2/example.txt +0 -0
  247. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_shell_trival_dir/parent_dir/dir3/example.txt +0 -0
  248. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_shell_trival_dir/parent_dir/dir4/example.txt +0 -0
  249. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_shell_trival_dir/parent_dir/graph.pb +0 -0
  250. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_shell_trival_dir/recover_dir/mock_recover_task.txt +0 -0
  251. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_slurm_dir/0_md/bct-1/conf.lmp +0 -0
  252. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_slurm_dir/0_md/bct-1/input.lammps +0 -0
  253. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_slurm_dir/0_md/bct-2/conf.lmp +0 -0
  254. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_slurm_dir/0_md/bct-2/input.lammps +0 -0
  255. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_slurm_dir/0_md/bct-3/conf.lmp +0 -0
  256. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_slurm_dir/0_md/bct-3/input.lammps +0 -0
  257. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_slurm_dir/0_md/bct-4/conf.lmp +0 -0
  258. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_slurm_dir/0_md/bct-4/input.lammps +0 -0
  259. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_slurm_dir/0_md/d3c842c5b9476e48f7145b370cd330372b9293e1.json +0 -0
  260. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_slurm_dir/0_md/graph.pb +0 -0
  261. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_slurm_dir/0_md/submission.json +0 -0
  262. {dpdispatcher-0.5.11 → dpdispatcher-0.6.1}/tests/test_work_path/.gitkeep +0 -0
@@ -0,0 +1,6 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "github-actions"
4
+ directory: "/"
5
+ schedule:
6
+ interval: "weekly"
@@ -2,8 +2,8 @@ name: Build docker image and push to Docker Hub
2
2
 
3
3
  on:
4
4
  push:
5
- branches:
6
- - master
5
+ tags:
6
+ - 'v*'
7
7
 
8
8
  jobs:
9
9
  build-n-push:
@@ -12,21 +12,21 @@ jobs:
12
12
  runs-on: ubuntu-latest
13
13
  steps:
14
14
  - name: Check out the repo
15
- uses: actions/checkout@v3
15
+ uses: actions/checkout@v4
16
16
 
17
17
  - name: Log in to Docker Hub
18
- uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
18
+ uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d
19
19
  with:
20
20
  username: ${{ secrets.DOCKER_USERNAME }}
21
21
  password: ${{ secrets.DOCKER_PASSWORD }}
22
22
 
23
23
  - name: Set up QEMU
24
- uses: docker/setup-qemu-action@v2
24
+ uses: docker/setup-qemu-action@v3
25
25
 
26
26
  - name: Set up Docker Buildx
27
27
  id: buildx
28
- uses: docker/setup-buildx-action@v2
28
+ uses: docker/setup-buildx-action@v3
29
29
 
30
30
  - name: Build and push
31
31
  run: |
32
- docker buildx build --platform linux/arm64,linux/amd64 -t dptechnology/dpdispatcher:latest --push .
32
+ docker buildx build --platform linux/arm64,linux/amd64 -t dptechnology/dpdispatcher:${{ github.ref_name }} -t dptechnology/dpdispatcher:latest --push .
@@ -15,5 +15,5 @@ jobs:
15
15
  - ssh
16
16
  - ssh_rsync
17
17
  steps:
18
- - uses: actions/checkout@v2
18
+ - uses: actions/checkout@v4
19
19
  - run: ./ci/${{ matrix.machine }}.sh
@@ -9,7 +9,7 @@ jobs:
9
9
  publish:
10
10
  runs-on: ubuntu-latest
11
11
  steps:
12
- - uses: actions/checkout@v2
12
+ - uses: actions/checkout@v4
13
13
  - name: publish-to-conda
14
14
  uses: felix5572/conda-publish-action@v1.9
15
15
  with:
@@ -7,11 +7,11 @@ jobs:
7
7
  name: pyright
8
8
  runs-on: ubuntu-latest
9
9
  steps:
10
- - uses: actions/checkout@v3
10
+ - uses: actions/checkout@v4
11
11
  - uses: actions/setup-python@v4
12
12
  with:
13
13
  python-version: '3.11'
14
- - run: pip install -e .[cloudserver]
14
+ - run: pip install -e .[cloudserver,gui]
15
15
  - uses: jakebailey/pyright-action@v1
16
16
  with:
17
17
  version: 1.1.308
@@ -0,0 +1,24 @@
1
+ on: [push, pull_request]
2
+ name: Release to pypi
3
+ jobs:
4
+ release-to-pypi:
5
+ name: Release to pypi
6
+ runs-on: ubuntu-latest
7
+ permissions:
8
+ # IMPORTANT: this permission is mandatory for trusted publishing
9
+ id-token: write
10
+ steps:
11
+ - uses: actions/checkout@v4
12
+ - name: Setup python
13
+ uses: actions/setup-python@v4
14
+ with:
15
+ python-version: 3.x
16
+ architecture: x64
17
+ - name: Install dependencies
18
+ run: python -m pip install build
19
+ - run: python -m build
20
+ - name: Publish a Python distribution to PyPI
21
+ if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
22
+ uses: pypa/gh-action-pypi-publish@release/v1
23
+ with:
24
+ verbose: true
@@ -0,0 +1,44 @@
1
+ name: Test Bohrium
2
+
3
+ on:
4
+ push:
5
+ pull_request_target:
6
+ types:
7
+ - "labeled"
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+ environment: bohrium
13
+ if: github.repository_owner == 'deepmodeling' && (github.event.label.name == 'Test Bohrium' || github.event_name == 'push')
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+ with:
17
+ ref: "${{ github.event.pull_request.merge_commit_sha }}"
18
+ - name: Set up Python 3.12
19
+ uses: actions/setup-python@v4
20
+ with:
21
+ python-version: '3.12'
22
+ cache: 'pip'
23
+ - run: pip install .[bohrium] coverage
24
+ - name: Test
25
+ run: coverage run --source=./dpdispatcher -m unittest -v tests/test_run_submission_bohrium.py && coverage report
26
+ env:
27
+ DPDISPATCHER_TEST: bohrium
28
+ BOHRIUM_EMAIL: ${{ secrets.BOHRIUM_EMAIL }}
29
+ BOHRIUM_PASSWORD: ${{ secrets.BOHRIUM_PASSWORD }}
30
+ BOHRIUM_PROJECT_ID: ${{ secrets.BOHRIUM_PROJECT_ID }}
31
+ BOHRIUM_ACCESS_KEY: ${{ secrets.BOHRIUM_ACCESS_KEY }}
32
+ - uses: codecov/codecov-action@v3
33
+ remove_label:
34
+ permissions:
35
+ contents: read
36
+ pull-requests: write
37
+ # so one can re-trigger the workflow without manually removing the label
38
+ runs-on: ubuntu-latest
39
+ if: github.repository_owner == 'deepmodeling' && github.event.label.name == 'Test Bohrium'
40
+ steps:
41
+ - uses: actions-ecosystem/action-remove-labels@v1
42
+ with:
43
+ labels: Test Bohrium
44
+ number: ${{ github.event.pull_request.number }}
@@ -11,23 +11,27 @@ jobs:
11
11
  matrix:
12
12
  python-version:
13
13
  - 3.7
14
- - 3.8
15
14
  - 3.9
16
15
  - '3.10'
17
16
  - '3.11'
17
+ - '3.12'
18
18
  platform:
19
19
  - ubuntu-latest
20
20
  - macos-latest
21
21
  - windows-latest
22
22
  steps:
23
- - uses: actions/checkout@v3
23
+ - uses: actions/checkout@v4
24
24
  - name: Set up Python ${{ matrix.python-version }}
25
25
  uses: actions/setup-python@v4
26
26
  with:
27
27
  python-version: ${{ matrix.python-version }}
28
28
  - run: pip install .[test] coverage
29
29
  - name: Test
30
- run: coverage run --source=./dpdispatcher -m unittest -v && coverage report
30
+ run: |
31
+ coverage run -p --source=./dpdispatcher -m unittest -v
32
+ coverage run -p --source=./dpdispatcher -m dpdispatcher -h
33
+ coverage combine
34
+ coverage report
31
35
  - uses: codecov/codecov-action@v3
32
36
  pass:
33
37
  needs: [test]
@@ -2,7 +2,7 @@
2
2
  # See https://pre-commit.com/hooks.html for more hooks
3
3
  repos:
4
4
  - repo: https://github.com/pre-commit/pre-commit-hooks
5
- rev: v4.4.0
5
+ rev: v4.5.0
6
6
  hooks:
7
7
  - id: trailing-whitespace
8
8
  exclude: "^tests/"
@@ -16,16 +16,13 @@ repos:
16
16
  - id: check-symlinks
17
17
  - id: check-toml
18
18
  # Python
19
- - repo: https://github.com/psf/black
20
- rev: 23.7.0
21
- hooks:
22
- - id: black-jupyter
23
19
  - repo: https://github.com/astral-sh/ruff-pre-commit
24
20
  # Ruff version.
25
- rev: v0.0.285
21
+ rev: v0.1.5
26
22
  hooks:
27
23
  - id: ruff
28
24
  args: ["--fix"]
25
+ - id: ruff-format
29
26
  # numpydoc
30
27
  - repo: https://github.com/Carreau/velin
31
28
  rev: 0.0.12
@@ -0,0 +1,24 @@
1
+ # .readthedocs.yaml
2
+ # Read the Docs configuration file
3
+ # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4
+
5
+ # Required
6
+ version: 2
7
+
8
+ # Set the version of Python and other tools you might need
9
+ build:
10
+ os: ubuntu-22.04
11
+ tools:
12
+ python: "3.10"
13
+
14
+ # Build documentation in the docs/ directory with Sphinx
15
+ sphinx:
16
+ configuration: doc/conf.py
17
+
18
+ # If using Sphinx, optionally build your docs in additional formats such as PDF
19
+ formats: all
20
+
21
+ # Optionally declare the Python requirements required to build your docs
22
+ python:
23
+ install:
24
+ - requirements: doc/requirements.txt
@@ -0,0 +1,14 @@
1
+ FROM python:3.12 AS compile-image
2
+
3
+ RUN python -m venv /opt/venv
4
+ # Make sure we use the virtualenv
5
+ ENV PATH="/opt/venv/bin:$PATH"
6
+
7
+ WORKDIR /data/dpdispatcher
8
+ COPY ./ ./
9
+ RUN pip install .[bohrium]
10
+
11
+ FROM python:3.12 AS build-image
12
+ COPY --from=compile-image /opt/venv /opt/venv
13
+ ENV PATH="/opt/venv/bin:$PATH"
14
+ CMD ["/bin/bash"]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dpdispatcher
3
- Version: 0.5.11
3
+ Version: 0.6.1
4
4
  Summary: Generate HPC scheduler systems jobs input scripts, submit these scripts to HPC systems, and poke until they finish
5
5
  Author: DeepModeling
6
6
  License: GNU LESSER GENERAL PUBLIC LICENSE
@@ -184,11 +184,33 @@ Classifier: Operating System :: Microsoft :: Windows
184
184
  Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)
185
185
  Requires-Python: >=3.7
186
186
  Description-Content-Type: text/markdown
187
+ License-File: LICENSE
188
+ Requires-Dist: paramiko
189
+ Requires-Dist: dargs>=0.4.1
190
+ Requires-Dist: requests
191
+ Requires-Dist: tqdm>=4.9.0
192
+ Requires-Dist: typing_extensions; python_version < "3.7"
193
+ Requires-Dist: pyyaml
187
194
  Provides-Extra: docs
195
+ Requires-Dist: sphinx; extra == "docs"
196
+ Requires-Dist: myst-parser; extra == "docs"
197
+ Requires-Dist: sphinx_rtd_theme>=1.0.0rc1; extra == "docs"
198
+ Requires-Dist: numpydoc; extra == "docs"
199
+ Requires-Dist: deepmodeling_sphinx>=0.1.1; extra == "docs"
200
+ Requires-Dist: dargs>=0.3.1; extra == "docs"
201
+ Requires-Dist: sphinx-argparse; extra == "docs"
188
202
  Provides-Extra: cloudserver
203
+ Requires-Dist: oss2; extra == "cloudserver"
204
+ Requires-Dist: tqdm; extra == "cloudserver"
205
+ Requires-Dist: bohrium-sdk; extra == "cloudserver"
189
206
  Provides-Extra: bohrium
207
+ Requires-Dist: oss2; extra == "bohrium"
208
+ Requires-Dist: tqdm; extra == "bohrium"
209
+ Requires-Dist: bohrium-sdk; extra == "bohrium"
210
+ Provides-Extra: gui
211
+ Requires-Dist: dpgui; extra == "gui"
190
212
  Provides-Extra: test
191
- License-File: LICENSE
213
+ Requires-Dist: dpgui; extra == "test"
192
214
 
193
215
  # DPDispatcher
194
216
 
@@ -0,0 +1,9 @@
1
+ .. _cli:
2
+
3
+ Command line interface
4
+ ======================
5
+
6
+ .. argparse::
7
+ :module: dpdispatcher.dpdisp
8
+ :func: main_parser
9
+ :prog: dpdisp
@@ -38,6 +38,7 @@ extensions = [
38
38
  "sphinx.ext.intersphinx",
39
39
  "numpydoc",
40
40
  "sphinx.ext.autosummary",
41
+ "sphinxarg.ext",
41
42
  ]
42
43
 
43
44
  # Add any paths that contain templates here, relative to this directory.
@@ -0,0 +1,16 @@
1
+ # Customizing the submission script header
2
+
3
+ When submitting jobs to some clusters, such as the [Tiger Cluster](https://researchcomputing.princeton.edu/systems/tiger) at Princeton University, the Slurm header is quite different from the standard one. In this case, DPDispatcher allows users to customize the templates by setting {dargs:argument}`strategy/customized_script_header_template_file <resources/strategy/customized_script_header_template_file>` to a template file:
4
+
5
+ ```{literalinclude} ../../examples/resources/tiger.json
6
+ :language: json
7
+ :linenos:
8
+ ```
9
+
10
+ `template.slurm` is the template file, where {meth}`str.format` is used to format the template with [Resources Parameters](resources):
11
+
12
+ ```{literalinclude} ../../examples/resources/template.slurm
13
+ :linenos:
14
+ ```
15
+
16
+ See [Python Format String Syntax](https://docs.python.org/3/library/string.html#formatstrings) for how to insert parameters inside the template.
@@ -22,13 +22,17 @@ DPDispatcher will monitor (poke) until these jobs finish and download the result
22
22
  machine
23
23
  resources
24
24
  task
25
+ cli
25
26
  api/api
26
27
 
27
28
  .. toctree::
28
29
  :caption: Examples
29
30
  :glob:
30
31
 
31
- examples/*
32
+ examples/expanse
33
+ examples/g16
34
+ examples/shell
35
+ examples/template
32
36
 
33
37
  .. toctree::
34
38
  :caption: Project details
@@ -1,7 +1,7 @@
1
1
  Machine parameters
2
2
  ======================================
3
3
  .. note::
4
- One can load, modify, and export the input file by using our effective web-based tool `DP-GUI <https://deepmodeling.com/dpgui/input/dpdispatcher-machine>`_. All parameters below can be set in DP-GUI. By clicking "SAVE JSON", one can download the input file.
4
+ One can load, modify, and export the input file by using our effective web-based tool `DP-GUI <https://deepmodeling.com/dpgui/input/dpdispatcher-machine>`_ online or hosted using the :ref:`command line interface <cli>` :code:`dpdisp gui`. All parameters below can be set in DP-GUI. By clicking "SAVE JSON", one can download the input file.
5
5
 
6
6
  .. dargs::
7
7
  :module: dpdispatcher.arginfo
@@ -1,7 +1,7 @@
1
1
  Resources parameters
2
2
  ======================================
3
3
  .. note::
4
- One can load, modify, and export the input file by using our effective web-based tool `DP-GUI <https://deepmodeling.com/dpgui/input/dpdispatcher-resources>`_. All parameters below can be set in DP-GUI. By clicking "SAVE JSON", one can download the input file for.
4
+ One can load, modify, and export the input file by using our effective web-based tool `DP-GUI <https://deepmodeling.com/dpgui/input/dpdispatcher-resources>`_ online or hosted using the :ref:`command line interface <cli>` :code:`dpdisp gui`. All parameters below can be set in DP-GUI. By clicking "SAVE JSON", one can download the input file for.
5
5
 
6
6
  .. dargs::
7
7
  :module: dpdispatcher.arginfo
@@ -1,7 +1,7 @@
1
1
  Task parameters
2
2
  ======================================
3
3
  .. note::
4
- One can load, modify, and export the input file by using our effective web-based tool `DP-GUI <https://deepmodeling.com/dpgui/input/dpdispatcher-task>`_. All parameters below can be set in DP-GUI. By clicking "SAVE JSON", one can download the input file.
4
+ One can load, modify, and export the input file by using our effective web-based tool `DP-GUI <https://deepmodeling.com/dpgui/input/dpdispatcher-task>`_ online or hosted using the :ref:`command line interface <cli>` :code:`dpdisp gui`. All parameters below can be set in DP-GUI. By clicking "SAVE JSON", one can download the input file.
5
5
 
6
6
  .. dargs::
7
7
  :module: dpdispatcher.arginfo
@@ -0,0 +1,21 @@
1
+ __author__ = "DeepModeling Team"
2
+ __copyright__ = "Copyright 2019-2023, DeepModeling"
3
+ __status__ = "Production"
4
+ try:
5
+ from ._version import version as __version__
6
+ except ImportError:
7
+ __version__ = "unknown"
8
+
9
+ import dpdispatcher.contexts # noqa: F401
10
+ import dpdispatcher.machines # noqa: F401
11
+ from dpdispatcher.machine import Machine
12
+ from dpdispatcher.submission import Job, Resources, Submission, Task
13
+
14
+ __all__ = [
15
+ "__version__",
16
+ "Machine",
17
+ "Submission",
18
+ "Task",
19
+ "Job",
20
+ "Resources",
21
+ ]
@@ -0,0 +1,8 @@
1
+ """Package dp entry point."""
2
+
3
+ from dpdispatcher.dpdisp import (
4
+ main,
5
+ )
6
+
7
+ if __name__ == "__main__":
8
+ main()
@@ -0,0 +1,16 @@
1
+ # file generated by setuptools_scm
2
+ # don't change, don't track in version control
3
+ TYPE_CHECKING = False
4
+ if TYPE_CHECKING:
5
+ from typing import Tuple, Union
6
+ VERSION_TUPLE = Tuple[Union[int, str], ...]
7
+ else:
8
+ VERSION_TUPLE = object
9
+
10
+ version: str
11
+ __version__: str
12
+ __version_tuple__: VERSION_TUPLE
13
+ version_tuple: VERSION_TUPLE
14
+
15
+ __version__ = version = '0.6.1'
16
+ __version_tuple__ = version_tuple = (0, 6, 1)
@@ -3,7 +3,7 @@ from typing import List, Tuple
3
3
 
4
4
  from dargs import Argument
5
5
 
6
- from dpdispatcher import dlog
6
+ from dpdispatcher.dlog import dlog
7
7
 
8
8
 
9
9
  class BaseContext(metaclass=ABCMeta):
@@ -0,0 +1,11 @@
1
+ """Contexts."""
2
+ import importlib
3
+ from pathlib import Path
4
+
5
+ PACKAGE_BASE = "dpdispatcher.contexts"
6
+ NOT_LOADABLE = ("__init__.py",)
7
+
8
+ for module_file in Path(__file__).parent.glob("*.py"):
9
+ if module_file.name not in NOT_LOADABLE:
10
+ module_name = f".{module_file.stem}"
11
+ importlib.import_module(module_name, PACKAGE_BASE)
@@ -8,13 +8,16 @@ from typing import List
8
8
  import tqdm
9
9
  from dargs.dargs import Argument
10
10
 
11
- from dpdispatcher import dlog
12
11
  from dpdispatcher.base_context import BaseContext
13
- from dpdispatcher.dpcloudserver.config import ALI_STS_BUCKET_NAME, ALI_STS_ENDPOINT
12
+ from dpdispatcher.dlog import dlog
14
13
 
15
14
  # from dpdispatcher.submission import Machine
16
15
  # from . import dlog
17
- from .dpcloudserver import Client, zip_file
16
+ from dpdispatcher.utils.dpcloudserver import Client, zip_file
17
+ from dpdispatcher.utils.dpcloudserver.config import (
18
+ ALI_STS_BUCKET_NAME,
19
+ ALI_STS_ENDPOINT,
20
+ )
18
21
 
19
22
  # from zip_file import zip_files
20
23
 
@@ -113,6 +116,7 @@ class BohriumContext(BaseContext):
113
116
 
114
117
  upload_file_list = [
115
118
  job.script_file_name,
119
+ f"{job.script_file_name}.run",
116
120
  ]
117
121
  upload_file_list.extend(common_files)
118
122
 
@@ -3,9 +3,9 @@ import shutil
3
3
  import tarfile
4
4
  from glob import glob
5
5
 
6
- from dpdispatcher import dlog
7
6
  from dpdispatcher.base_context import BaseContext
8
- from dpdispatcher.hdfs_cli import HDFS
7
+ from dpdispatcher.dlog import dlog
8
+ from dpdispatcher.utils.hdfs_cli import HDFS
9
9
 
10
10
 
11
11
  class HDFSContext(BaseContext):
@@ -1,12 +1,11 @@
1
- import hashlib
2
1
  import os
3
2
  import shutil
4
3
  import subprocess as sp
5
4
  from glob import glob
6
5
  from subprocess import TimeoutExpired
7
6
 
8
- from dpdispatcher import dlog
9
7
  from dpdispatcher.base_context import BaseContext
8
+ from dpdispatcher.dlog import dlog
10
9
 
11
10
 
12
11
  class SPRetObj:
@@ -30,14 +29,6 @@ def _check_file_path(fname):
30
29
  os.makedirs(dirname, exist_ok=True)
31
30
 
32
31
 
33
- def _identical_files(fname0, fname1):
34
- with open(fname0) as fp:
35
- code0 = hashlib.sha1(fp.read().encode("utf-8")).hexdigest()
36
- with open(fname1) as fp:
37
- code1 = hashlib.sha1(fp.read().encode("utf-8")).hexdigest()
38
- return code0 == code1
39
-
40
-
41
32
  class LocalContext(BaseContext):
42
33
  """Run jobs in the local server and remote directory.
43
34
 
@@ -152,9 +143,34 @@ class LocalContext(BaseContext):
152
143
  for ii in submission.belonging_tasks:
153
144
  local_job = os.path.join(self.local_root, ii.task_work_path)
154
145
  remote_job = os.path.join(self.remote_root, ii.task_work_path)
155
- flist = ii.backward_files
146
+ flist = []
147
+ for kk in ii.backward_files:
148
+ abs_flist_r = glob(os.path.join(remote_job, kk))
149
+ abs_flist_l = glob(os.path.join(local_job, kk))
150
+ if not abs_flist_r and not abs_flist_l:
151
+ if check_exists:
152
+ if mark_failure:
153
+ tag_file_path = os.path.join(
154
+ self.local_root,
155
+ ii.task_work_path,
156
+ "tag_failure_download_%s" % kk,
157
+ )
158
+ with open(tag_file_path, "w") as fp:
159
+ pass
160
+ else:
161
+ pass
162
+ else:
163
+ raise RuntimeError(
164
+ "cannot find download file " + os.path.join(remote_job, kk)
165
+ )
166
+ rel_flist = [
167
+ os.path.relpath(ii, start=remote_job) for ii in abs_flist_r
168
+ ]
169
+ flist.extend(rel_flist)
156
170
  if back_error:
157
- flist += glob(os.path.join(remote_job, "error*"))
171
+ abs_flist = glob(os.path.join(remote_job, "error*"))
172
+ rel_flist = [os.path.relpath(ii, start=remote_job) for ii in abs_flist]
173
+ flist.extend(rel_flist)
158
174
  for jj in flist:
159
175
  rfile = os.path.join(remote_job, jj)
160
176
  lfile = os.path.join(local_job, jj)
@@ -198,9 +214,30 @@ class LocalContext(BaseContext):
198
214
  pass
199
215
  local_job = self.local_root
200
216
  remote_job = self.remote_root
201
- flist = submission.backward_common_files
217
+ flist = []
218
+ for kk in submission.backward_common_files:
219
+ abs_flist_r = glob(os.path.join(remote_job, kk))
220
+ abs_flist_l = glob(os.path.join(local_job, kk))
221
+ if not abs_flist_r and not abs_flist_l:
222
+ if check_exists:
223
+ if mark_failure:
224
+ tag_file_path = os.path.join(
225
+ self.local_root, "tag_failure_download_%s" % kk
226
+ )
227
+ with open(tag_file_path, "w") as fp:
228
+ pass
229
+ else:
230
+ pass
231
+ else:
232
+ raise RuntimeError(
233
+ "cannot find download file " + os.path.join(remote_job, kk)
234
+ )
235
+ rel_flist = [os.path.relpath(ii, start=remote_job) for ii in abs_flist_r]
236
+ flist.extend(rel_flist)
202
237
  if back_error:
203
- flist += glob(os.path.join(remote_job, "error*"))
238
+ abs_flist = glob(os.path.join(remote_job, "error*"))
239
+ rel_flist = [os.path.relpath(ii, start=remote_job) for ii in abs_flist]
240
+ flist.extend(rel_flist)
204
241
  for jj in flist:
205
242
  rfile = os.path.join(remote_job, jj)
206
243
  lfile = os.path.join(local_job, jj)
@@ -14,9 +14,9 @@ except ModuleNotFoundError:
14
14
  else:
15
15
  found_bohriumsdk = True
16
16
 
17
- from dpdispatcher import dlog
18
17
  from dpdispatcher.base_context import BaseContext
19
- from dpdispatcher.JobStatus import JobStatus
18
+ from dpdispatcher.dlog import dlog
19
+ from dpdispatcher.utils.job_status import JobStatus
20
20
 
21
21
  DP_CLOUD_SERVER_HOME_DIR = os.path.join(
22
22
  os.path.expanduser("~"), ".dpdispatcher/", "dp_cloud_server/"
@@ -88,6 +88,7 @@ class OpenAPIContext(BaseContext):
88
88
 
89
89
  upload_file_list = [
90
90
  job.script_file_name,
91
+ f"{job.script_file_name}.run",
91
92
  ]
92
93
 
93
94
  upload_file_list.extend(common_files)