File tree Expand file tree Collapse file tree 2 files changed +293
-270
lines changed Expand file tree Collapse file tree 2 files changed +293
-270
lines changed Original file line number Diff line number Diff line change @@ -95,6 +95,9 @@ def stop_torchserve(self) -> Union[str, Exception]:
9595 except (subprocess .CalledProcessError , OSError ) as e :
9696 return e
9797
98+ def get_model_store (self ) -> List [str ]:
99+ return os .listdir (self .model_store )
100+
98101
99102class ManagementAPI :
100103 def __init__ (self , address : str , error_callback : Callable = None ) -> None :
@@ -118,12 +121,15 @@ def get_loaded_models(self) -> Optional[Dict[str, Any]]:
118121 def get_model (self ,
119122 model_name : str ,
120123 version : Optional [str ] = None ,
121- list_all : bool = False ) -> List [Dict [str , Any ]]:
124+ list_all : bool = False ,
125+ custom_metadata : bool = False ) -> List [Dict [str , Any ]]:
122126 req_url = self .address + "/models/" + model_name
123127 if version :
124128 req_url += "/" + version
125129 elif list_all :
126130 req_url += "/all"
131+ if custom_metadata :
132+ req_url += "?customized=true"
127133
128134 res = self .client .get (req_url )
129135 return res .json ()
You can’t perform that action at this time.
0 commit comments