Skip to content

Commit

Permalink
feat(dpmodel/jax): add entry point for dpmodel and jax backend (#4284)
Browse files Browse the repository at this point in the history
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Introduced entry point loading functionality for enhanced module
initialization in both `dpmodel` and `jax` components of the DeepMD
framework.

These changes improve the framework's functionality and streamline
backend configuration.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Jinzhe Zeng <[email protected]>
  • Loading branch information
njzjz authored Oct 31, 2024
1 parent 0d13911 commit 9c767ad
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
7 changes: 7 additions & 0 deletions deepmd/dpmodel/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# SPDX-License-Identifier: LGPL-3.0-or-later
from deepmd.utils.entry_point import (
load_entry_point,
)

from .common import (
DEFAULT_PRECISION,
PRECISION_DICT,
Expand Down Expand Up @@ -32,3 +36,6 @@
"get_deriv_name",
"get_hessian_name",
]


load_entry_point("deepmd.dpmodel")
6 changes: 6 additions & 0 deletions deepmd/jax/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
# SPDX-License-Identifier: LGPL-3.0-or-later
"""JAX backend."""

from deepmd.utils.entry_point import (
load_entry_point,
)

load_entry_point("deepmd.jax")

0 comments on commit 9c767ad

Please sign in to comment.