Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
781de36
Initial plan
Copilot Aug 26, 2025
9d25645
feat(tf): add change-bias command support for TensorFlow backend
Copilot Aug 26, 2025
e42ce04
Changes before error encountered
Copilot Aug 27, 2025
c1c3bcd
fix(tf): address code review feedback - use j_loader and follow consi…
Copilot Aug 27, 2025
272e087
fix(tf): address code review feedback - remove unused imports, fix Ru…
Copilot Aug 27, 2025
6a60acd
Addressing PR comments
Copilot Aug 27, 2025
63a94e8
Changes before error encountered
Copilot Aug 27, 2025
0d97532
fix: remove test artifacts and add coverage files to .gitignore
Copilot Aug 27, 2025
d86fe63
feat(tf): implement comprehensive change-bias support addressing code…
Copilot Aug 27, 2025
759d636
feat(tf): remove checkpoint directory support, output single model fi…
Copilot Aug 27, 2025
5ea02e7
fix(tf): pass log_level to RunOptions and clarify variable restoratio…
Copilot Aug 27, 2025
9db5460
fix(tf): properly initialize session and restore checkpoint variables…
Copilot Aug 27, 2025
ec6b2fa
fix(tf): properly call build before _init_session in change_bias
Copilot Aug 27, 2025
8e018ef
fix(tf): properly restore checkpoint variables in change_bias by read…
Copilot Aug 27, 2025
67ba8f7
style: fix linting issues in cross-backend change-bias test
Copilot Aug 27, 2025
44b9f20
Addressing PR comments
Copilot Aug 27, 2025
10d60e7
refactor: simplify tests and remove redundant CLI help checks
Copilot Aug 27, 2025
2a85218
chore: remove empty consistent test file for change-bias
Copilot Aug 27, 2025
88a87d9
Potential fix for code scanning alert no. 9901: Unused local variable
njzjz Aug 28, 2025
f14ddc0
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Aug 28, 2025
72ca58f
fix(tf): save updated checkpoint files after change_bias variable mod…
Copilot Aug 28, 2025
697e3b0
feat(tf): save updated checkpoint files in separate directory to avoi…
Copilot Aug 28, 2025
190864a
fix(tf): remove redundant logging in change_bias
Copilot Aug 28, 2025
2096f7a
docs: add TensorFlow backend support to change-bias documentation
Copilot Aug 28, 2025
5faffab
Refactor change-bias documentation for clarity
njzjz Aug 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,12 @@ buildcxx/
node_modules/
*.bib.original

# Coverage files
.coverage
.coverage.*

# Test output files (temporary)
test_dp_test/
test_dp_test_*.out
*_detail.out
out.json
5 changes: 3 additions & 2 deletions deepmd/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -721,12 +721,13 @@ def main_parser() -> argparse.ArgumentParser:
parser_change_bias = subparsers.add_parser(
"change-bias",
parents=[parser_log],
help="(Supported backend: PyTorch) Change model out bias according to the input data.",
help="Change model out bias according to the input data.",
formatter_class=RawTextArgumentDefaultsHelpFormatter,
epilog=textwrap.dedent(
"""\
examples:
dp change-bias model.pt -s data -n 10 -m change
dp --pt change-bias model.pt -s data -n 10 -m change
dp --tf change-bias model.ckpt -s data -n 10 -m change
"""
),
)
Expand Down
4 changes: 4 additions & 0 deletions deepmd/tf/entrypoints/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
from ..infer.model_devi import (
make_model_devi,
)
from .change_bias import (
change_bias,
)
from .compress import (
compress,
)
Expand Down Expand Up @@ -34,6 +37,7 @@
)

__all__ = [
"change_bias",
"compress",
"convert",
"doc_train_input",
Expand Down
Loading