dpdispatcher 0.6.0__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.
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/.github/workflows/test.yml +5 -1
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/.pre-commit-config.yaml +2 -5
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/PKG-INFO +3 -2
- dpdispatcher-0.6.1/doc/examples/template.md +16 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/doc/index.rst +4 -1
- dpdispatcher-0.6.1/dpdispatcher/__init__.py +21 -0
- dpdispatcher-0.6.1/dpdispatcher/__main__.py +8 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/dpdispatcher/_version.py +2 -2
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/dpdispatcher/base_context.py +1 -1
- dpdispatcher-0.6.1/dpdispatcher/contexts/__init__.py +11 -0
- {dpdispatcher-0.6.0/dpdispatcher → dpdispatcher-0.6.1/dpdispatcher/contexts}/dp_cloud_server_context.py +6 -3
- {dpdispatcher-0.6.0/dpdispatcher → dpdispatcher-0.6.1/dpdispatcher/contexts}/hdfs_context.py +2 -2
- {dpdispatcher-0.6.0/dpdispatcher → dpdispatcher-0.6.1/dpdispatcher/contexts}/local_context.py +1 -10
- {dpdispatcher-0.6.0/dpdispatcher → dpdispatcher-0.6.1/dpdispatcher/contexts}/openapi_context.py +2 -2
- {dpdispatcher-0.6.0/dpdispatcher → dpdispatcher-0.6.1/dpdispatcher/contexts}/ssh_context.py +32 -11
- dpdispatcher-0.6.1/dpdispatcher/dlog.py +31 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/dpdispatcher/dpdisp.py +41 -2
- dpdispatcher-0.6.1/dpdispatcher/entrypoints/__init__.py +1 -0
- dpdispatcher-0.6.1/dpdispatcher/entrypoints/submission.py +83 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/dpdispatcher/machine.py +9 -1
- dpdispatcher-0.6.1/dpdispatcher/machines/__init__.py +11 -0
- {dpdispatcher-0.6.0/dpdispatcher → dpdispatcher-0.6.1/dpdispatcher/machines}/distributed_shell.py +3 -3
- {dpdispatcher-0.6.0/dpdispatcher → dpdispatcher-0.6.1/dpdispatcher/machines}/dp_cloud_server.py +5 -5
- {dpdispatcher-0.6.0/dpdispatcher → dpdispatcher-0.6.1/dpdispatcher/machines}/fugaku.py +3 -3
- {dpdispatcher-0.6.0/dpdispatcher → dpdispatcher-0.6.1/dpdispatcher/machines}/lsf.py +7 -3
- {dpdispatcher-0.6.0/dpdispatcher → dpdispatcher-0.6.1/dpdispatcher/machines}/openapi.py +6 -4
- {dpdispatcher-0.6.0/dpdispatcher → dpdispatcher-0.6.1/dpdispatcher/machines}/pbs.py +3 -3
- {dpdispatcher-0.6.0/dpdispatcher → dpdispatcher-0.6.1/dpdispatcher/machines}/shell.py +3 -3
- {dpdispatcher-0.6.0/dpdispatcher → dpdispatcher-0.6.1/dpdispatcher/machines}/slurm.py +19 -5
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/dpdispatcher/submission.py +55 -33
- dpdispatcher-0.6.1/dpdispatcher/utils/__init__.py +1 -0
- {dpdispatcher-0.6.0/dpdispatcher → dpdispatcher-0.6.1/dpdispatcher/utils}/dpcloudserver/client.py +1 -1
- {dpdispatcher-0.6.0/dpdispatcher → dpdispatcher-0.6.1/dpdispatcher/utils}/hdfs_cli.py +1 -1
- dpdispatcher-0.6.1/dpdispatcher/utils/record.py +79 -0
- {dpdispatcher-0.6.0/dpdispatcher → dpdispatcher-0.6.1/dpdispatcher/utils}/utils.py +1 -1
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/dpdispatcher.egg-info/PKG-INFO +3 -2
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/dpdispatcher.egg-info/SOURCES.txt +33 -45
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/dpdispatcher.egg-info/requires.txt +2 -1
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/pyproject.toml +5 -2
- dpdispatcher-0.6.1/tests/context.py +34 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_cli.py +4 -1
- dpdispatcher-0.6.1/tests/test_examples.py +41 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_local_context.py +9 -1
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_run_submission.py +10 -0
- dpdispatcher-0.6.0/dpdispatcher/__init__.py +0 -103
- dpdispatcher-0.6.0/dpdispatcher/dpcloudserver/temp_test.py +0 -90
- dpdispatcher-0.6.0/tests/context.py +0 -47
- dpdispatcher-0.6.0/tests/lsf/context.py +0 -22
- dpdispatcher-0.6.0/tests/lsf/test_dispatcher.py +0 -48
- dpdispatcher-0.6.0/tests/lsf/test_lsf_local.py +0 -243
- dpdispatcher-0.6.0/tests/old/test_dispatcher_utils.py +0 -41
- dpdispatcher-0.6.0/tests/old/test_lazy_local_context.py +0 -202
- dpdispatcher-0.6.0/tests/old/test_local_context.py +0 -390
- dpdispatcher-0.6.0/tests/old/test_local_session.py +0 -14
- dpdispatcher-0.6.0/tests/old/test_ssh_context.py +0 -272
- dpdispatcher-0.6.0/tests/pbs/context.py +0 -22
- dpdispatcher-0.6.0/tests/pbs/test_dispatcher.py +0 -48
- dpdispatcher-0.6.0/tests/pbs/test_pbs_local.py +0 -99
- dpdispatcher-0.6.0/tests/shell/context.py +0 -22
- dpdispatcher-0.6.0/tests/shell/test_dispatcher.py +0 -46
- dpdispatcher-0.6.0/tests/shell/test_shell_local.py +0 -278
- dpdispatcher-0.6.0/tests/shell/test_shell_ssh.py +0 -169
- dpdispatcher-0.6.0/tests/slurm/context.py +0 -22
- dpdispatcher-0.6.0/tests/slurm/test_dispatcher.py +0 -54
- dpdispatcher-0.6.0/tests/slurm/test_dispatcher_lazy_local.py +0 -54
- dpdispatcher-0.6.0/tests/slurm/test_slurm_lazy_local.py +0 -251
- dpdispatcher-0.6.0/tests/slurm/test_slurm_local.py +0 -249
- dpdispatcher-0.6.0/tests/slurm/test_slurm_ssh.py +0 -257
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/.github/dependabot.yml +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/.github/workflows/ci-docker.yml +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/.github/workflows/machines.yml +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/.github/workflows/mirror_gitee.yml +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/.github/workflows/publish_conda.yml +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/.github/workflows/pyright.yml +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/.github/workflows/release.yml +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/.github/workflows/test-bohrium.yml +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/.gitignore +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/.readthedocs.yaml +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/CONTRIBUTING.md +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/Dockerfile +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/LICENSE +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/README.md +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/ci/LICENSE +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/ci/README.md +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/ci/pbs/docker-compose.yml +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/ci/pbs/start-pbs.sh +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/ci/pbs.sh +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/ci/slurm/docker-compose.yml +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/ci/slurm/register_cluster.sh +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/ci/slurm/start-slurm.sh +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/ci/slurm.sh +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/ci/ssh/docker-compose.yml +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/ci/ssh/start-ssh.sh +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/ci/ssh.sh +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/ci/ssh_rsync.sh +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/codecov.yml +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/conda/conda_build_config.yaml +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/conda/meta.yaml +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/doc/.gitignore +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/doc/Makefile +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/doc/batch.md +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/doc/cli.rst +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/doc/conf.py +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/doc/context.md +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/doc/credits.rst +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/doc/dpdispatcher_on_yarn.md +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/doc/examples/expanse.md +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/doc/examples/g16.md +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/doc/examples/shell.md +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/doc/getting-started.md +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/doc/install.md +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/doc/machine.rst +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/doc/make.bat +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/doc/requirements.txt +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/doc/resources.rst +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/doc/task.rst +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/dpdispatcher/arginfo.py +0 -0
- {dpdispatcher-0.6.0/dpdispatcher → dpdispatcher-0.6.1/dpdispatcher/contexts}/lazy_local_context.py +0 -0
- {dpdispatcher-0.6.0/dpdispatcher → dpdispatcher-0.6.1/dpdispatcher/entrypoints}/gui.py +0 -0
- {dpdispatcher-0.6.0/dpdispatcher → dpdispatcher-0.6.1/dpdispatcher/utils}/dpcloudserver/__init__.py +0 -0
- {dpdispatcher-0.6.0/dpdispatcher → dpdispatcher-0.6.1/dpdispatcher/utils}/dpcloudserver/config.py +0 -0
- {dpdispatcher-0.6.0/dpdispatcher → dpdispatcher-0.6.1/dpdispatcher/utils}/dpcloudserver/retcode.py +0 -0
- {dpdispatcher-0.6.0/dpdispatcher → dpdispatcher-0.6.1/dpdispatcher/utils}/dpcloudserver/zip_file.py +0 -0
- /dpdispatcher-0.6.0/dpdispatcher/JobStatus.py → /dpdispatcher-0.6.1/dpdispatcher/utils/job_status.py +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/dpdispatcher.egg-info/dependency_links.txt +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/dpdispatcher.egg-info/entry_points.txt +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/dpdispatcher.egg-info/top_level.txt +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/examples/machine/expanse.json +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/examples/machine/lazy_local.json +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/examples/machine/mandu.json +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/examples/resources/expanse_cpu.json +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/examples/resources/mandu.json +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/examples/resources/template.slurm +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/examples/resources/tiger.json +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/examples/task/deepmd-kit.json +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/examples/task/g16.json +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/scripts/script_gen_dargs_docs.py +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/scripts/script_gen_dargs_json.py +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/setup.cfg +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/.gitignore +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/__init__.py +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/batch.json +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/debug_test_class_submission_init.py +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/devel_test_ali_ehpc.py +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/devel_test_dp_cloud_server.py +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/devel_test_lazy_ali_ehpc.py +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/devel_test_lsf.py +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/devel_test_shell.py +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/devel_test_slurm.py +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/devel_test_ssh_ali_ehpc.py +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/graph.pb +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/jsons/job.json +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/jsons/machine.json +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/jsons/machine_ali_ehpc.json +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/jsons/machine_center.json +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/jsons/machine_diffenert.json +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/jsons/machine_dp_cloud_server.json +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/jsons/machine_fugaku.json +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/jsons/machine_if_cuda_multi_devices.json +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/jsons/machine_lazy_local_lsf.json +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/jsons/machine_lazy_local_slurm.json +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/jsons/machine_lazylocal_shell.json +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/jsons/machine_local_fugaku.json +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/jsons/machine_local_shell.json +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/jsons/machine_lsf.json +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/jsons/machine_openapi.json +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/jsons/machine_slurm.json +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/jsons/machine_yarn.json +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/jsons/resources.json +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/jsons/submission.json +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/jsons/task.json +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/sample_class.py +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/script_gen_json.py +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/slurm_test.env +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_argcheck.py +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_class_job.py +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_class_machine.py +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_class_machine_dispatch.py +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_class_resources.py +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_class_submission.py +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_class_submission_init.py +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_class_task.py +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_context_dir/0_md/bct-1/conf.lmp +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_context_dir/0_md/bct-1/input.lammps +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_context_dir/0_md/bct-1/some_dir/some_file +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_context_dir/0_md/bct-2/conf.lmp +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_context_dir/0_md/bct-2/input.lammps +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_context_dir/0_md/bct-3/conf.lmp +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_context_dir/0_md/bct-3/input.lammps +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_context_dir/0_md/bct-4/conf.lmp +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_context_dir/0_md/bct-4/input.lammps +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_context_dir/0_md/dir with space/file with space +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_context_dir/0_md/graph.pb +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_context_dir/0_md/some_dir/some_file +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_group_size.py +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_gui.py +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_hdfs_context.py +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_hdfs_dir/0_md/bct-1/conf.lmp +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_hdfs_dir/0_md/bct-1/input.lammps +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_hdfs_dir/0_md/bct-2/conf.lmp +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_hdfs_dir/0_md/bct-2/input.lammps +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_hdfs_dir/0_md/bct-3/conf.lmp +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_hdfs_dir/0_md/bct-3/input.lammps +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_hdfs_dir/0_md/bct-4/conf.lmp +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_hdfs_dir/0_md/bct-4/input.lammps +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_hdfs_dir/0_md/graph.pb +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_if_cuda_multi_devices/test_dir/test.txt +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_import_classes.py +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_lazy_local_context.py +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_lsf_dir/0_md/bct-1/conf.lmp +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_lsf_dir/0_md/bct-1/input.lammps +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_lsf_dir/0_md/bct-2/conf.lmp +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_lsf_dir/0_md/bct-2/input.lammps +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_lsf_dir/0_md/bct-3/conf.lmp +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_lsf_dir/0_md/bct-3/input.lammps +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_lsf_dir/0_md/bct-4/conf.lmp +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_lsf_dir/0_md/bct-4/input.lammps +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_lsf_dir/0_md/graph.pb +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_lsf_dir/0_md/submission.json +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_lsf_script_generation.py +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_pbs_dir/0_md/bct-1/conf.lmp +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_pbs_dir/0_md/bct-1/input.lammps +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_pbs_dir/0_md/bct-2/conf.lmp +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_pbs_dir/0_md/bct-2/input.lammps +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_pbs_dir/0_md/bct-3/conf.lmp +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_pbs_dir/0_md/bct-3/input.lammps +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_pbs_dir/0_md/bct-4/conf.lmp +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_pbs_dir/0_md/bct-4/input.lammps +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_pbs_dir/0_md/graph.pb +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_retry.py +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_run_submission_bohrium.py +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_run_submission_ratio_unfinished.py +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_shell_cuda_multi_devices.py +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_shell_trival.py +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_shell_trival_dir/fail_dir/mock_fail_task.txt +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_shell_trival_dir/parent_dir/dir with space/example.txt +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_shell_trival_dir/parent_dir/dir1/example.txt +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_shell_trival_dir/parent_dir/dir2/example.txt +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_shell_trival_dir/parent_dir/dir3/example.txt +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_shell_trival_dir/parent_dir/dir4/example.txt +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_shell_trival_dir/parent_dir/graph.pb +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_shell_trival_dir/recover_dir/mock_recover_task.txt +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_slurm_dir/0_md/bct-1/conf.lmp +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_slurm_dir/0_md/bct-1/input.lammps +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_slurm_dir/0_md/bct-2/conf.lmp +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_slurm_dir/0_md/bct-2/input.lammps +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_slurm_dir/0_md/bct-3/conf.lmp +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_slurm_dir/0_md/bct-3/input.lammps +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_slurm_dir/0_md/bct-4/conf.lmp +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_slurm_dir/0_md/bct-4/input.lammps +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_slurm_dir/0_md/d3c842c5b9476e48f7145b370cd330372b9293e1.json +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_slurm_dir/0_md/graph.pb +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_slurm_dir/0_md/submission.json +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_slurm_script_generation.py +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_ssh_context.py +0 -0
- {dpdispatcher-0.6.0 → dpdispatcher-0.6.1}/tests/test_work_path/.gitkeep +0 -0
|
@@ -27,7 +27,11 @@ jobs:
|
|
|
27
27
|
python-version: ${{ matrix.python-version }}
|
|
28
28
|
- run: pip install .[test] coverage
|
|
29
29
|
- name: Test
|
|
30
|
-
run:
|
|
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]
|
|
@@ -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.9.1
|
|
21
|
-
hooks:
|
|
22
|
-
- id: black-jupyter
|
|
23
19
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
24
20
|
# Ruff version.
|
|
25
|
-
rev: v0.
|
|
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
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: dpdispatcher
|
|
3
|
-
Version: 0.6.
|
|
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
|
|
@@ -186,10 +186,11 @@ Requires-Python: >=3.7
|
|
|
186
186
|
Description-Content-Type: text/markdown
|
|
187
187
|
License-File: LICENSE
|
|
188
188
|
Requires-Dist: paramiko
|
|
189
|
-
Requires-Dist: dargs>=0.
|
|
189
|
+
Requires-Dist: dargs>=0.4.1
|
|
190
190
|
Requires-Dist: requests
|
|
191
191
|
Requires-Dist: tqdm>=4.9.0
|
|
192
192
|
Requires-Dist: typing_extensions; python_version < "3.7"
|
|
193
|
+
Requires-Dist: pyyaml
|
|
193
194
|
Provides-Extra: docs
|
|
194
195
|
Requires-Dist: sphinx; extra == "docs"
|
|
195
196
|
Requires-Dist: myst-parser; extra == "docs"
|
|
@@ -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.
|
|
@@ -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,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.
|
|
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
|
|
{dpdispatcher-0.6.0/dpdispatcher → dpdispatcher-0.6.1/dpdispatcher/contexts}/hdfs_context.py
RENAMED
|
@@ -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.
|
|
7
|
+
from dpdispatcher.dlog import dlog
|
|
8
|
+
from dpdispatcher.utils.hdfs_cli import HDFS
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
class HDFSContext(BaseContext):
|
{dpdispatcher-0.6.0/dpdispatcher → dpdispatcher-0.6.1/dpdispatcher/contexts}/local_context.py
RENAMED
|
@@ -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
|
|
{dpdispatcher-0.6.0/dpdispatcher → dpdispatcher-0.6.1/dpdispatcher/contexts}/openapi_context.py
RENAMED
|
@@ -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.
|
|
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/"
|
|
@@ -18,11 +18,17 @@ import paramiko
|
|
|
18
18
|
import paramiko.ssh_exception
|
|
19
19
|
from dargs.dargs import Argument
|
|
20
20
|
|
|
21
|
-
from dpdispatcher import dlog
|
|
22
21
|
from dpdispatcher.base_context import BaseContext
|
|
22
|
+
from dpdispatcher.dlog import dlog
|
|
23
23
|
|
|
24
24
|
# from dpdispatcher.submission import Machine
|
|
25
|
-
from dpdispatcher.utils import
|
|
25
|
+
from dpdispatcher.utils.utils import (
|
|
26
|
+
RetrySignal,
|
|
27
|
+
generate_totp,
|
|
28
|
+
get_sha256,
|
|
29
|
+
retry,
|
|
30
|
+
rsync,
|
|
31
|
+
)
|
|
26
32
|
|
|
27
33
|
|
|
28
34
|
class SSHSession:
|
|
@@ -140,6 +146,7 @@ class SSHSession:
|
|
|
140
146
|
# Make a Paramiko Transport object using the socket
|
|
141
147
|
ts = paramiko.Transport(sock)
|
|
142
148
|
ts.banner_timeout = 60
|
|
149
|
+
ts.auth_timeout = self.timeout + 20
|
|
143
150
|
ts.use_compression(compress=True)
|
|
144
151
|
|
|
145
152
|
# Tell Paramiko that the Transport is going to be used as a client
|
|
@@ -939,21 +946,35 @@ class SSHContext(BaseContext):
|
|
|
939
946
|
per_nfile = 100
|
|
940
947
|
ntar = len(files) // per_nfile + 1
|
|
941
948
|
if ntar <= 1:
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
949
|
+
try:
|
|
950
|
+
self.block_checkcall(
|
|
951
|
+
"tar {} {} {}".format(
|
|
952
|
+
tar_command,
|
|
953
|
+
shlex.quote(of),
|
|
954
|
+
" ".join([shlex.quote(file) for file in files]),
|
|
955
|
+
)
|
|
947
956
|
)
|
|
948
|
-
|
|
957
|
+
except RuntimeError as e:
|
|
958
|
+
if "No such file or directory" in str(e):
|
|
959
|
+
raise FileNotFoundError(
|
|
960
|
+
"Any of the backward files does not exist in the remote directory."
|
|
961
|
+
) from e
|
|
962
|
+
raise e
|
|
949
963
|
else:
|
|
950
964
|
file_list_file = os.path.join(
|
|
951
965
|
self.remote_root, ".tmp.tar." + str(uuid.uuid4())
|
|
952
966
|
)
|
|
953
967
|
self.write_file(file_list_file, "\n".join(files))
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
968
|
+
try:
|
|
969
|
+
self.block_checkcall(
|
|
970
|
+
f"tar {tar_command} {shlex.quote(of)} -T {shlex.quote(file_list_file)}"
|
|
971
|
+
)
|
|
972
|
+
except RuntimeError as e:
|
|
973
|
+
if "No such file or directory" in str(e):
|
|
974
|
+
raise FileNotFoundError(
|
|
975
|
+
"Any of the backward files does not exist in the remote directory."
|
|
976
|
+
) from e
|
|
977
|
+
raise e
|
|
957
978
|
# trans
|
|
958
979
|
from_f = pathlib.PurePath(os.path.join(self.remote_root, of)).as_posix()
|
|
959
980
|
to_f = pathlib.PurePath(os.path.join(self.local_root, of)).as_posix()
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import logging
|
|
2
|
+
import os
|
|
3
|
+
import sys
|
|
4
|
+
import warnings
|
|
5
|
+
|
|
6
|
+
dlog = logging.getLogger("dpdispatcher")
|
|
7
|
+
dlog.propagate = False
|
|
8
|
+
dlog.setLevel(logging.INFO)
|
|
9
|
+
try:
|
|
10
|
+
dlogf = logging.FileHandler(
|
|
11
|
+
os.getcwd() + os.sep + "dpdispatcher" + ".log", delay=True
|
|
12
|
+
)
|
|
13
|
+
except PermissionError:
|
|
14
|
+
warnings.warn(
|
|
15
|
+
"dpdispatcher.log meet permission error. redirect the log to ~/dpdispatcher.log"
|
|
16
|
+
)
|
|
17
|
+
dlogf = logging.FileHandler(
|
|
18
|
+
os.path.join(os.path.expanduser("~"), "dpdispatcher.log"), delay=True
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
dlogf_formatter = logging.Formatter("%(asctime)s - %(levelname)s : %(message)s")
|
|
22
|
+
dlogf.setFormatter(dlogf_formatter)
|
|
23
|
+
dlog.addHandler(dlogf)
|
|
24
|
+
|
|
25
|
+
dlog_stdout = logging.StreamHandler(sys.stdout)
|
|
26
|
+
dlog_stdout.setFormatter(dlogf_formatter)
|
|
27
|
+
dlog.addHandler(dlog_stdout)
|
|
28
|
+
|
|
29
|
+
__all__ = [
|
|
30
|
+
"dlog",
|
|
31
|
+
]
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
import argparse
|
|
3
3
|
from typing import List, Optional
|
|
4
4
|
|
|
5
|
-
from dpdispatcher.gui import start_dpgui
|
|
5
|
+
from dpdispatcher.entrypoints.gui import start_dpgui
|
|
6
|
+
from dpdispatcher.entrypoints.submission import handle_submission
|
|
6
7
|
|
|
7
8
|
|
|
8
9
|
def main_parser() -> argparse.ArgumentParser:
|
|
@@ -23,6 +24,37 @@ def main_parser() -> argparse.ArgumentParser:
|
|
|
23
24
|
)
|
|
24
25
|
subparsers = parser.add_subparsers(title="Valid subcommands", dest="command")
|
|
25
26
|
##########################################
|
|
27
|
+
# backward
|
|
28
|
+
parser_submission = subparsers.add_parser(
|
|
29
|
+
"submission",
|
|
30
|
+
help="Handle terminated submission.",
|
|
31
|
+
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
|
|
32
|
+
)
|
|
33
|
+
parser_submission.add_argument(
|
|
34
|
+
"SUBMISSION_HASH",
|
|
35
|
+
type=str,
|
|
36
|
+
help="Submission hash to download.",
|
|
37
|
+
)
|
|
38
|
+
parser_submission_action = parser_submission.add_argument_group(
|
|
39
|
+
"Actions",
|
|
40
|
+
description="One or more actions to take on submission.",
|
|
41
|
+
)
|
|
42
|
+
parser_submission_action.add_argument(
|
|
43
|
+
"--download-terminated-log",
|
|
44
|
+
action="store_true",
|
|
45
|
+
help="Download log files of terminated tasks.",
|
|
46
|
+
)
|
|
47
|
+
parser_submission_action.add_argument(
|
|
48
|
+
"--download-finished-task",
|
|
49
|
+
action="store_true",
|
|
50
|
+
help="Download finished tasks.",
|
|
51
|
+
)
|
|
52
|
+
parser_submission_action.add_argument(
|
|
53
|
+
"--clean",
|
|
54
|
+
action="store_true",
|
|
55
|
+
help="Clean submission.",
|
|
56
|
+
)
|
|
57
|
+
##########################################
|
|
26
58
|
# gui
|
|
27
59
|
parser_gui = subparsers.add_parser(
|
|
28
60
|
"gui",
|
|
@@ -67,7 +99,14 @@ def parse_args(args: Optional[List[str]] = None):
|
|
|
67
99
|
|
|
68
100
|
def main():
|
|
69
101
|
args = parse_args()
|
|
70
|
-
if args.command == "
|
|
102
|
+
if args.command == "submission":
|
|
103
|
+
handle_submission(
|
|
104
|
+
submission_hash=args.SUBMISSION_HASH,
|
|
105
|
+
download_terminated_log=args.download_terminated_log,
|
|
106
|
+
download_finished_task=args.download_finished_task,
|
|
107
|
+
clean=args.clean,
|
|
108
|
+
)
|
|
109
|
+
elif args.command == "gui":
|
|
71
110
|
start_dpgui(
|
|
72
111
|
port=args.port,
|
|
73
112
|
bind_all=args.bind_all,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Entry points."""
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
|
|
3
|
+
from dpdispatcher.dlog import dlog
|
|
4
|
+
from dpdispatcher.submission import Submission
|
|
5
|
+
from dpdispatcher.utils.job_status import JobStatus
|
|
6
|
+
from dpdispatcher.utils.record import record
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def handle_submission(
|
|
10
|
+
*,
|
|
11
|
+
submission_hash: str,
|
|
12
|
+
download_terminated_log: bool = False,
|
|
13
|
+
download_finished_task: bool = False,
|
|
14
|
+
clean: bool = False,
|
|
15
|
+
):
|
|
16
|
+
"""Handle terminated submission.
|
|
17
|
+
|
|
18
|
+
Parameters
|
|
19
|
+
----------
|
|
20
|
+
submission_hash : str
|
|
21
|
+
Submission hash to download.
|
|
22
|
+
download_terminated_log : bool, optional
|
|
23
|
+
Download log files of terminated tasks.
|
|
24
|
+
download_finished_task : bool, optional
|
|
25
|
+
Download finished tasks.
|
|
26
|
+
clean : bool, optional
|
|
27
|
+
Clean submission.
|
|
28
|
+
|
|
29
|
+
Raises
|
|
30
|
+
------
|
|
31
|
+
ValueError
|
|
32
|
+
At least one action should be specified.
|
|
33
|
+
"""
|
|
34
|
+
if int(download_terminated_log) + int(download_finished_task) + int(clean) == 0:
|
|
35
|
+
raise ValueError("At least one action should be specified.")
|
|
36
|
+
|
|
37
|
+
submission_file = record.get_submission(submission_hash)
|
|
38
|
+
submission = Submission.submission_from_json(str(submission_file))
|
|
39
|
+
submission.belonging_tasks = [
|
|
40
|
+
task for job in submission.belonging_jobs for task in job.job_task_list
|
|
41
|
+
]
|
|
42
|
+
# TODO: for unclear reason, the submission_hash may be changed
|
|
43
|
+
submission.submission_hash = submission_hash
|
|
44
|
+
submission.machine.context.bind_submission(submission)
|
|
45
|
+
submission.update_submission_state()
|
|
46
|
+
|
|
47
|
+
terminated_tasks = []
|
|
48
|
+
finished_tasks = []
|
|
49
|
+
for task in submission.belonging_tasks:
|
|
50
|
+
task.get_task_state(submission.machine.context)
|
|
51
|
+
if task.task_state == JobStatus.terminated:
|
|
52
|
+
terminated_tasks.append(task)
|
|
53
|
+
elif task.task_state == JobStatus.finished:
|
|
54
|
+
finished_tasks.append(task)
|
|
55
|
+
submission.belonging_tasks = []
|
|
56
|
+
|
|
57
|
+
if download_terminated_log:
|
|
58
|
+
for task in terminated_tasks:
|
|
59
|
+
task.backward_files = [task.outlog, task.errlog]
|
|
60
|
+
submission.belonging_tasks += terminated_tasks
|
|
61
|
+
if download_finished_task:
|
|
62
|
+
submission.belonging_tasks += finished_tasks
|
|
63
|
+
|
|
64
|
+
submission.download_jobs()
|
|
65
|
+
|
|
66
|
+
if download_terminated_log:
|
|
67
|
+
terminated_log_files = []
|
|
68
|
+
for task in terminated_tasks:
|
|
69
|
+
assert submission.local_root is not None
|
|
70
|
+
terminated_log_files.append(
|
|
71
|
+
Path(submission.local_root) / task.task_work_path / task.outlog
|
|
72
|
+
)
|
|
73
|
+
terminated_log_files.append(
|
|
74
|
+
Path(submission.local_root) / task.task_work_path / task.errlog
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
dlog.info(
|
|
78
|
+
"Terminated logs are downloaded into:\n "
|
|
79
|
+
+ "\n ".join([str(f) for f in terminated_log_files])
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
if clean:
|
|
83
|
+
submission.clean_jobs()
|
|
@@ -4,10 +4,11 @@ import shlex
|
|
|
4
4
|
from abc import ABCMeta, abstractmethod
|
|
5
5
|
from typing import List, Tuple
|
|
6
6
|
|
|
7
|
+
import yaml
|
|
7
8
|
from dargs import Argument, Variant
|
|
8
9
|
|
|
9
|
-
from dpdispatcher import dlog
|
|
10
10
|
from dpdispatcher.base_context import BaseContext
|
|
11
|
+
from dpdispatcher.dlog import dlog
|
|
11
12
|
|
|
12
13
|
script_template = """\
|
|
13
14
|
{script_header}
|
|
@@ -124,6 +125,13 @@ class Machine(metaclass=ABCMeta):
|
|
|
124
125
|
machine = cls.load_from_dict(machine_dict=machine_dict)
|
|
125
126
|
return machine
|
|
126
127
|
|
|
128
|
+
@classmethod
|
|
129
|
+
def load_from_yaml(cls, yaml_path):
|
|
130
|
+
with open(yaml_path) as f:
|
|
131
|
+
machine_dict = yaml.safe_load(f)
|
|
132
|
+
machine = cls.load_from_dict(machine_dict=machine_dict)
|
|
133
|
+
return machine
|
|
134
|
+
|
|
127
135
|
@classmethod
|
|
128
136
|
def load_from_dict(cls, machine_dict):
|
|
129
137
|
batch_type = machine_dict["batch_type"]
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"""Machines."""
|
|
2
|
+
import importlib
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
|
|
5
|
+
PACKAGE_BASE = "dpdispatcher.machines"
|
|
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)
|
{dpdispatcher-0.6.0/dpdispatcher → dpdispatcher-0.6.1/dpdispatcher/machines}/distributed_shell.py
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
from dpdispatcher import dlog
|
|
2
|
-
from dpdispatcher.JobStatus import JobStatus
|
|
1
|
+
from dpdispatcher.dlog import dlog
|
|
3
2
|
from dpdispatcher.machine import Machine
|
|
4
|
-
from dpdispatcher.utils import
|
|
3
|
+
from dpdispatcher.utils.job_status import JobStatus
|
|
4
|
+
from dpdispatcher.utils.utils import (
|
|
5
5
|
customized_script_header_template,
|
|
6
6
|
run_cmd_with_all_output,
|
|
7
7
|
)
|
{dpdispatcher-0.6.0/dpdispatcher → dpdispatcher-0.6.1/dpdispatcher/machines}/dp_cloud_server.py
RENAMED
|
@@ -4,12 +4,12 @@ import time
|
|
|
4
4
|
import uuid
|
|
5
5
|
import warnings
|
|
6
6
|
|
|
7
|
-
from dpdispatcher import dlog
|
|
8
|
-
from dpdispatcher.dpcloudserver import Client, zip_file
|
|
9
|
-
from dpdispatcher.dpcloudserver.config import ALI_OSS_BUCKET_URL
|
|
10
|
-
from dpdispatcher.JobStatus import JobStatus
|
|
7
|
+
from dpdispatcher.dlog import dlog
|
|
11
8
|
from dpdispatcher.machine import Machine
|
|
12
|
-
from dpdispatcher.utils import
|
|
9
|
+
from dpdispatcher.utils.dpcloudserver import Client, zip_file
|
|
10
|
+
from dpdispatcher.utils.dpcloudserver.config import ALI_OSS_BUCKET_URL
|
|
11
|
+
from dpdispatcher.utils.job_status import JobStatus
|
|
12
|
+
from dpdispatcher.utils.utils import customized_script_header_template
|
|
13
13
|
|
|
14
14
|
shell_script_header_template = """
|
|
15
15
|
#!/bin/bash -l
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import shlex
|
|
2
2
|
|
|
3
|
-
from dpdispatcher import dlog
|
|
4
|
-
from dpdispatcher.JobStatus import JobStatus
|
|
3
|
+
from dpdispatcher.dlog import dlog
|
|
5
4
|
from dpdispatcher.machine import Machine
|
|
6
|
-
from dpdispatcher.utils import
|
|
5
|
+
from dpdispatcher.utils.job_status import JobStatus
|
|
6
|
+
from dpdispatcher.utils.utils import customized_script_header_template
|
|
7
7
|
|
|
8
8
|
fugaku_script_header_template = """\
|
|
9
9
|
{queue_name_line}
|
|
@@ -3,10 +3,14 @@ from typing import List
|
|
|
3
3
|
|
|
4
4
|
from dargs import Argument
|
|
5
5
|
|
|
6
|
-
from dpdispatcher import dlog
|
|
7
|
-
from dpdispatcher.JobStatus import JobStatus
|
|
6
|
+
from dpdispatcher.dlog import dlog
|
|
8
7
|
from dpdispatcher.machine import Machine
|
|
9
|
-
from dpdispatcher.utils import
|
|
8
|
+
from dpdispatcher.utils.job_status import JobStatus
|
|
9
|
+
from dpdispatcher.utils.utils import (
|
|
10
|
+
RetrySignal,
|
|
11
|
+
customized_script_header_template,
|
|
12
|
+
retry,
|
|
13
|
+
)
|
|
10
14
|
|
|
11
15
|
lsf_script_header_template = """\
|
|
12
16
|
#!/bin/bash -l
|
|
@@ -2,7 +2,7 @@ import os
|
|
|
2
2
|
import shutil
|
|
3
3
|
import time
|
|
4
4
|
|
|
5
|
-
from dpdispatcher.utils import customized_script_header_template
|
|
5
|
+
from dpdispatcher.utils.utils import customized_script_header_template
|
|
6
6
|
|
|
7
7
|
try:
|
|
8
8
|
from bohriumsdk.client import Client
|
|
@@ -14,9 +14,9 @@ except ModuleNotFoundError:
|
|
|
14
14
|
else:
|
|
15
15
|
found_bohriumsdk = True
|
|
16
16
|
|
|
17
|
-
from dpdispatcher import dlog
|
|
18
|
-
from dpdispatcher.JobStatus import JobStatus
|
|
17
|
+
from dpdispatcher.dlog import dlog
|
|
19
18
|
from dpdispatcher.machine import Machine
|
|
19
|
+
from dpdispatcher.utils.job_status import JobStatus
|
|
20
20
|
|
|
21
21
|
shell_script_header_template = """
|
|
22
22
|
#!/bin/bash -l
|
|
@@ -147,7 +147,9 @@ class OpenAPI(Machine):
|
|
|
147
147
|
)
|
|
148
148
|
|
|
149
149
|
job_state = self.map_dp_job_state(
|
|
150
|
-
dp_job_status,
|
|
150
|
+
dp_job_status,
|
|
151
|
+
check_return.get("exitCode", 0), # type: ignore
|
|
152
|
+
self.ignore_exit_code,
|
|
151
153
|
)
|
|
152
154
|
if job_state == JobStatus.finished:
|
|
153
155
|
job_log = self.job.log(job_id)
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import shlex
|
|
2
2
|
|
|
3
|
-
from dpdispatcher import dlog
|
|
4
|
-
from dpdispatcher.JobStatus import JobStatus
|
|
3
|
+
from dpdispatcher.dlog import dlog
|
|
5
4
|
from dpdispatcher.machine import Machine
|
|
6
|
-
from dpdispatcher.utils import
|
|
5
|
+
from dpdispatcher.utils.job_status import JobStatus
|
|
6
|
+
from dpdispatcher.utils.utils import customized_script_header_template
|
|
7
7
|
|
|
8
8
|
pbs_script_header_template = """
|
|
9
9
|
#!/bin/bash -l
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import shlex
|
|
2
2
|
|
|
3
|
-
from dpdispatcher import dlog
|
|
4
|
-
from dpdispatcher.JobStatus import JobStatus
|
|
3
|
+
from dpdispatcher.dlog import dlog
|
|
5
4
|
from dpdispatcher.machine import Machine
|
|
6
|
-
from dpdispatcher.utils import
|
|
5
|
+
from dpdispatcher.utils.job_status import JobStatus
|
|
6
|
+
from dpdispatcher.utils.utils import customized_script_header_template
|
|
7
7
|
|
|
8
8
|
shell_script_header_template = """
|
|
9
9
|
#!/bin/bash -l
|