Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix invalid escape sequence #2820

Merged
merged 1 commit into from
Sep 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion deepmd/utils/argcheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -1200,7 +1200,7 @@
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."

Check warning on line 1203 in deepmd/utils/argcheck.py

View check run for this annotation

Codecov / codecov/patch

deepmd/utils/argcheck.py#L1203

Added line #L1203 was not covered by tests
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 @@
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"}")

Check warning on line 36 in deepmd/utils/convert.py

View check run for this annotation

Codecov / codecov/patch

deepmd/utils/convert.py#L36

Added line #L36 was not covered by tests
search_double = post_dsea[:post_dsea2]
if search_double.find("DT_DOUBLE") == -1:
version = "1.2"
Expand Down