Update 1/model.py
This commit is contained in:
parent
f48d62d396
commit
9994433e27
20
1/model.py
20
1/model.py
@ -18,8 +18,28 @@ class TritonPythonModel:
|
||||
|
||||
self.model_name = args["model_name"]
|
||||
self.base_model_path = self._get_config_parameter("base_model_path")
|
||||
self.sub_dir_path = self._get_config_parameter("sub_dir_path")
|
||||
|
||||
self.logger.log_info(f"base_model_path: {self.base_model_path}")
|
||||
self.logger.log_info(f"sub_dir_path: {self.sub_dir_path}") # sub_dir_path 로깅 추가
|
||||
|
||||
if self.sub_dir_path and os.path.isdir(self.sub_dir_path):
|
||||
try:
|
||||
file_list = os.listdir(self.sub_dir_path)
|
||||
self.logger.log_info(f"'{self.sub_dir_path}' 경로의 파일 목록:\n{file_list}")
|
||||
|
||||
# date-w-locale.txt 파일 내용 로깅
|
||||
target_file_path = os.path.join(self.sub_dir_path, "date-w-locale.txt")
|
||||
if os.path.exists(target_file_path):
|
||||
with open(target_file_path, 'r', encoding='utf-8') as f:
|
||||
file_content = f.read()
|
||||
self.logger.log_info(f"'{target_file_path}' 파일 내용:\n{file_content}")
|
||||
else:
|
||||
self.logger.log_warn(f"'{target_file_path}' 파일을 찾을 수 없습니다.")
|
||||
except Exception as e:
|
||||
self.logger.log_error(f"파일 시스템 접근 중 오류 발생: {e}")
|
||||
elif self.sub_dir_path:
|
||||
self.logger.log_warn(f"지정된 경로 '{self.sub_dir_path}'가 유효한 디렉토리가 아니거나 존재하지 않습니다.")
|
||||
|
||||
|
||||
self.load_model()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user