Skip to content

Commit

Permalink
Fix invalid escape sequence (#2820)
Browse files Browse the repository at this point in the history
Fix the following warnings: DeprecationWarning: invalid escape sequence
  • Loading branch information
njzjz authored Sep 18, 2023
1 parent b8a4771 commit ce7532a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion deepmd/utils/argcheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -1203,7 +1203,7 @@ def loss_ener_spin():
doc_start_pref_pf = start_pref("atom_pref")
doc_limit_pref_pf = limit_pref("atom_pref")
doc_relative_f = "If provided, relative force error will be used in the loss. The difference of force will be normalized by the magnitude of the force in the label with a shift given by `relative_f`, i.e. DF_i / ( || F || + relative_f ) with DF denoting the difference between prediction and label and || F || denoting the L2 norm of the label."
doc_enable_atom_ener_coeff = "If true, the energy will be computed as \sum_i c_i E_i. c_i should be provided by file atom_ener_coeff.npy in each data system, otherwise it's 1."
doc_enable_atom_ener_coeff = r"If true, the energy will be computed as \sum_i c_i E_i. c_i should be provided by file atom_ener_coeff.npy in each data system, otherwise it's 1."
return [
Argument(
"start_pref_e",
Expand Down
2 changes: 1 addition & 1 deletion deepmd/utils/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def detect_model_version(input_model: str):
elif file_content.find("model_attr/model_version") == -1:
name_dsea = file_content.find('name: "DescrptSeA"')
post_dsea = file_content[name_dsea:]
post_dsea2 = post_dsea[:300].find("\}")
post_dsea2 = post_dsea[:300].find(r"}")
search_double = post_dsea[:post_dsea2]
if search_double.find("DT_DOUBLE") == -1:
version = "1.2"
Expand Down

0 comments on commit ce7532a

Please sign in to comment.