deepmd.tf.utils.compat
Alias for backward compatibility.
Module Contents
- deepmd.tf.utils.compat.convert_input_v0_v1(jdata: dict[str, Any], warning: bool = True, dump: str | pathlib.Path | None = None) → dict[str, Any][source]
Convert input from v0 format to v1.
- Parameters:
- jdata
dict[str, Any] loaded json/yaml file
- warningbool,
optional whether to show deprecation warning, by default True
- dump
Optional[Union[str, Path]], optional whether to dump converted file, by default None
- Returns:
dict[str, Any]converted output
- deepmd.tf.utils.compat.convert_input_v1_v2(jdata: dict[str, Any], warning: bool = True, dump: str | pathlib.Path | None = None) → dict[str, Any][source]
- deepmd.tf.utils.compat.convert_optimizer_v31_to_v32(jdata: dict[str, Any], warning: bool = True) → dict[str, Any][source]
Convert optimizer format from v3.1 to v3.2.
v3.1 format: optimizer parameters (opt_type, kf_blocksize, etc.) in training section. v3.2 format: separate optimizer section with type field.
- Parameters:
- jdata
dict[str, Any] loaded json/yaml file
- warningbool,
optional whether to show deprecation warning, by default True
- Returns:
dict[str, Any]converted output with optimizer section
- deepmd.tf.utils.compat.deprecate_numb_test(jdata: dict[str, Any], warning: bool = True, dump: str | pathlib.Path | None = None) → dict[str, Any][source]
Deprecate numb_test since v2.1. It has taken no effect since v2.0.
See #1243.
- Parameters:
- jdata
dict[str, Any] loaded json/yaml file
- warningbool,
optional whether to show deprecation warning, by default True
- dump
Optional[Union[str, Path]], optional whether to dump converted file, by default None
- Returns:
dict[str, Any]converted output
- deepmd.tf.utils.compat.update_deepmd_input(jdata: dict[str, Any], warning: bool = True, dump: str | pathlib.Path | None = None) → dict[str, Any][source]