dpgen package

dpgen.info()[source]

Subpackages

Submodules

dpgen.arginfo module

dpgen.arginfo.general_mdata_arginfo(name: str, tasks: Tuple[str]) Argument[source]

Generate arginfo for general mdata.

namestr

mdata name

taskstuple[str]

tuple of task keys, e.g. (“train”, “model_devi”, “fp”)

Argument

arginfo

dpgen.main module

dpgen.main.main()[source]
dpgen.main.main_parser() ArgumentParser[source]

Returns parser for dpgen command.

argparse.ArgumentParser

parser for dpgen command

dpgen.util module

dpgen.util.box_center(ch='', fill=' ', sp='|')[source]

put the string at the center of | |

dpgen.util.expand_sys_str(root_dir: Union[str, Path]) List[str][source]

Recursively iterate over directories taking those that contain type.raw file.

root_dirUnion[str, Path]

starting directory

List[str]

list of string pointing to system directories

dpgen.util.normalize(arginfo: Argument, data: dict, strict_check: bool = True) dict[source]

Normalize and check input data.

arginfodargs.Argument

argument information

datadict

input data

strict_checkbool, default=True

strict check data or not

dict

normalized data

dpgen.util.sepline(ch='-', sp='-', screen=False)[source]

seperate the output by ‘-’