This is an automated email from the ASF dual-hosted git repository.

yongzao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/master by this push:
     new e83718bc6a5 [AINode] Add a model ckpt path retrieve interface (#15689)
e83718bc6a5 is described below

commit e83718bc6a59da62022a4dcd90edb2e8e68b7d43
Author: Yongzao <[email protected]>
AuthorDate: Tue Jun 10 14:18:06 2025 +0800

    [AINode] Add a model ckpt path retrieve interface (#15689)
---
 iotdb-core/ainode/ainode/core/manager/model_manager.py | 12 ++++++++++++
 iotdb-core/ainode/ainode/core/model/model_storage.py   | 12 ++++++++++++
 2 files changed, 24 insertions(+)

diff --git a/iotdb-core/ainode/ainode/core/manager/model_manager.py 
b/iotdb-core/ainode/ainode/core/manager/model_manager.py
index 95fdda1456b..ced7277c1ae 100644
--- a/iotdb-core/ainode/ainode/core/manager/model_manager.py
+++ b/iotdb-core/ainode/ainode/core/manager/model_manager.py
@@ -100,6 +100,18 @@ class ModelManager:
         logger.info(f"load model {model_id}")
         return self.model_storage.load_model(model_id, acceleration)
 
+    def get_ckpt_path(self, model_id: str) -> str:
+        """
+        Get the checkpoint path for a given model ID.
+
+        Args:
+            model_id (str): The ID of the model.
+
+        Returns:
+            str: The path to the checkpoint file for the model.
+        """
+        return self.model_storage.get_ckpt_path(model_id)
+
     @staticmethod
     def load_built_in_model(model_id: str, attributes: {}):
         model_id = model_id.lower()
diff --git a/iotdb-core/ainode/ainode/core/model/model_storage.py 
b/iotdb-core/ainode/ainode/core/model/model_storage.py
index c0e2a21c80a..864b5c30e0a 100644
--- a/iotdb-core/ainode/ainode/core/model/model_storage.py
+++ b/iotdb-core/ainode/ainode/core/model/model_storage.py
@@ -119,3 +119,15 @@ class ModelStorage(object):
     def _remove_from_cache(self, file_path: str) -> None:
         if file_path in self._model_cache:
             del self._model_cache[file_path]
+
+    def get_ckpt_path(self, model_id: str) -> str:
+        """
+        Get the checkpoint path for a given model ID.
+
+        Args:
+            model_id (str): The ID of the model.
+
+        Returns:
+            str: The path to the checkpoint file for the model.
+        """
+        return os.path.join(self._model_dir, f"{model_id}")

Reply via email to