From c084b2015a978b954cfce8d31c1a26cdef00da6c Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Thu, 19 Sep 2024 21:26:57 -0400 Subject: [PATCH] fix(pt): move entry point from `deepmd.pt.model` to `deepmd.pt` (#4146) `deepmd.pt` should be a more reasonable one to load the plugins. ## Summary by CodeRabbit - **New Features** - Enhanced initialization process for the `deepmd.pt` module, allowing for improved dynamic loading and configuration. - **Refactor** - Removed unnecessary imports and function calls related to entry point loading in the `deepmd.pt.model` module, streamlining the module's initialization. Signed-off-by: Jinzhe Zeng --- deepmd/pt/__init__.py | 5 +++++ deepmd/pt/model/__init__.py | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/deepmd/pt/__init__.py b/deepmd/pt/__init__.py index ab61736198..daf3d406e9 100644 --- a/deepmd/pt/__init__.py +++ b/deepmd/pt/__init__.py @@ -4,6 +4,11 @@ from deepmd.pt.cxx_op import ( ENABLE_CUSTOMIZED_OP, ) +from deepmd.utils.entry_point import ( + load_entry_point, +) + +load_entry_point("deepmd.pt") __all__ = [ "ENABLE_CUSTOMIZED_OP", diff --git a/deepmd/pt/model/__init__.py b/deepmd/pt/model/__init__.py index 8422ac3802..6ceb116d85 100644 --- a/deepmd/pt/model/__init__.py +++ b/deepmd/pt/model/__init__.py @@ -1,6 +1 @@ # SPDX-License-Identifier: LGPL-3.0-or-later -from deepmd.utils.entry_point import ( - load_entry_point, -) - -load_entry_point("deepmd.pt")