pfd.entrypoint package
Submodules
pfd.entrypoint.args module
- pfd.entrypoint.args.gen_doc(*, make_anchor=True, make_link=True, **kwargs)[source]
[Modified from DPGEN2]Generate the doc string of the submit args
- Parameters:
make_anchor (bool, optional) – _description_. Defaults to True.
make_link (bool, optional) – _description_. Defaults to True.
- Returns:
_description_
- Return type:
_type_
- pfd.entrypoint.args.submit_args(default_step_config={'continue_on_failed': False, 'continue_on_num_success': None, 'continue_on_success_ratio': None, 'executor': None, 'parallelism': None, 'template_config': {'envs': None, 'image': 'registry.dp.tech/dptech/deepmd-kit:v3.0.0a1-2024Q1', 'retry_on_transient_error': None, 'timeout': None, 'timeout_as_transient_error': False}})[source]
Normalize the full input arguments of the submit script
- Parameters:
default_step_config (_type_, optional) – _description_. Defaults to normalize_step_dict({}).
- Returns:
_description_
- Return type:
_type_
- pfd.entrypoint.args.wf_args(default_step_config={'continue_on_failed': False, 'continue_on_num_success': None, 'continue_on_success_ratio': None, 'executor': None, 'parallelism': None, 'template_config': {'envs': None, 'image': 'registry.dp.tech/dptech/deepmd-kit:v3.0.0a1-2024Q1', 'retry_on_transient_error': None, 'timeout': None, 'timeout_as_transient_error': False}})[source]
pfd.entrypoint.common module
pfd.entrypoint.download module
- pfd.entrypoint.download.download(workflow_id, wf_config: Dict | None = {}, wf_keys: List | None = None, prefix: str | None = None, chk_pnt: bool = False)[source]
- pfd.entrypoint.download.download_by_def(workflow_id, wf_config: Dict = {}, iterations: List[int] | None = None, step_defs: List[str] | None = None, prefix: str | None = None, chk_pnt: bool = False)[source]
- pfd.entrypoint.download.download_end_result(workflow_id, wf_config: Dict = {}, prefix: str | None = None)[source]
[Modified from DPGEN2]Download the final data and dataset of a workflow.
- Parameters:
workflow_id (_type_) – The ID of the workflow to download from.
wf_config (Dict, optional) – The configuration of the workflow. Defaults to {}.
prefix (Optional[str], optional) – The prefix for the download path. Defaults to None.
- Raises:
RuntimeError – If the workflow fails.
pfd.entrypoint.main module
pfd.entrypoint.submit module
- class pfd.entrypoint.submit.FlowGen(config: Dict, debug: bool = False, download_path: Path | str = PosixPath('.'))[source]
Bases:
object- property download_path
- submit(reuse_step: List[ArgoStep] | None = None, no_submission: bool = False, only_submit: bool = True)[source]
- property wf_type
- pfd.entrypoint.submit.get_resubmit_keys(wf, unsuccessful_step_keys: bool = False)[source]
[From DPGEN2] Get the keys of all steps in the workflow for resubmission.
- pfd.entrypoint.submit.get_superop(key)[source]
[From DPGEN2] Get the super operation key for a given step key.
- Parameters:
key (str) – The step key.
- Returns:
The super operation key, or None if not found.
- Return type:
str
- pfd.entrypoint.submit.make_pfd_op(fp_style: str = 'vasp', train_style: str = 'dp', explore_style: str = 'ase', wf_style: str = 'finetune', prep_fp_config: dict = {'continue_on_failed': False, 'continue_on_num_success': None, 'continue_on_success_ratio': None, 'executor': None, 'parallelism': None, 'template_config': {'envs': None, 'image': 'registry.dp.tech/dptech/deepmd-kit:v3.0.0a1-2024Q1', 'retry_on_transient_error': None, 'timeout': None, 'timeout_as_transient_error': False}}, run_fp_config: dict = {'continue_on_failed': False, 'continue_on_num_success': None, 'continue_on_success_ratio': None, 'executor': None, 'parallelism': None, 'template_config': {'envs': None, 'image': 'registry.dp.tech/dptech/deepmd-kit:v3.0.0a1-2024Q1', 'retry_on_transient_error': None, 'timeout': None, 'timeout_as_transient_error': False}}, train_config: dict = {'continue_on_failed': False, 'continue_on_num_success': None, 'continue_on_success_ratio': None, 'executor': None, 'parallelism': None, 'template_config': {'envs': None, 'image': 'registry.dp.tech/dptech/deepmd-kit:v3.0.0a1-2024Q1', 'retry_on_transient_error': None, 'timeout': None, 'timeout_as_transient_error': False}}, prep_explore_config: dict = {'continue_on_failed': False, 'continue_on_num_success': None, 'continue_on_success_ratio': None, 'executor': None, 'parallelism': None, 'template_config': {'envs': None, 'image': 'registry.dp.tech/dptech/deepmd-kit:v3.0.0a1-2024Q1', 'retry_on_transient_error': None, 'timeout': None, 'timeout_as_transient_error': False}}, run_explore_config: dict = {'continue_on_failed': False, 'continue_on_num_success': None, 'continue_on_success_ratio': None, 'executor': None, 'parallelism': None, 'template_config': {'envs': None, 'image': 'registry.dp.tech/dptech/deepmd-kit:v3.0.0a1-2024Q1', 'retry_on_transient_error': None, 'timeout': None, 'timeout_as_transient_error': False}}, scheduler_config: dict = {'continue_on_failed': False, 'continue_on_num_success': None, 'continue_on_success_ratio': None, 'executor': None, 'parallelism': None, 'template_config': {'envs': None, 'image': 'registry.dp.tech/dptech/deepmd-kit:v3.0.0a1-2024Q1', 'retry_on_transient_error': None, 'timeout': None, 'timeout_as_transient_error': False}}, collect_data_config: dict = {'continue_on_failed': False, 'continue_on_num_success': None, 'continue_on_success_ratio': None, 'executor': None, 'parallelism': None, 'template_config': {'envs': None, 'image': 'registry.dp.tech/dptech/deepmd-kit:v3.0.0a1-2024Q1', 'retry_on_transient_error': None, 'timeout': None, 'timeout_as_transient_error': False}}, select_confs_config: dict = {'continue_on_failed': False, 'continue_on_num_success': None, 'continue_on_success_ratio': None, 'executor': None, 'parallelism': None, 'template_config': {'envs': None, 'image': 'registry.dp.tech/dptech/deepmd-kit:v3.0.0a1-2024Q1', 'retry_on_transient_error': None, 'timeout': None, 'timeout_as_transient_error': False}}, evaluate_config: dict = {'continue_on_failed': False, 'continue_on_num_success': None, 'continue_on_success_ratio': None, 'executor': None, 'parallelism': None, 'template_config': {'envs': None, 'image': 'registry.dp.tech/dptech/deepmd-kit:v3.0.0a1-2024Q1', 'retry_on_transient_error': None, 'timeout': None, 'timeout_as_transient_error': False}}, upload_python_packages: List[PathLike] | None = None, init_train: bool = False, init_fp: bool = False)[source]
- pfd.entrypoint.submit.resubmit_workflow(wf_config, wfid, list_steps=False, reuse=None, fold=False, unsuccessful_step_keys: bool = False, **kwargs)[source]
- pfd.entrypoint.submit.successful_step_keys(wf, unsuccessful_step_keys: bool = False)[source]
[From DPGEN2] Get the keys of all successful steps in the workflow.
- Parameters:
wf (_type_) – The workflow object.
unsuccessful_step_keys (bool, optional) – If True, include keys of unsuccessful steps. Defaults to False.
- Returns:
A list of successful step keys.
- Return type:
list