暂时取消主动释放显存

This commit is contained in:
2024-06-26 13:47:31 +08:00
parent 403858a287
commit 3645e13f00
2 changed files with 3 additions and 19 deletions

View File

@@ -1,7 +1,3 @@
from paddlenlp import Taskflow
from config.keys import SETTLEMENT_LIST_SCHEMA, DISCHARGE_RECORD_SCHEMA, COST_LIST_SCHEMA
# 项目奔溃的重试次数
RETRY_TIME = 1
@@ -19,15 +15,3 @@ LAYOUT_ANALYSIS = False
# 可使用的GPU
CUDA_VISIBLE_DEVICES = "1"
# # 基本医保结算单
# SETTLEMENT_IE = Taskflow("information_extraction", schema=SETTLEMENT_LIST_SCHEMA, model="uie-x-base",
# task_path="config/model/settlement_list_model", layout_analysis=LAYOUT_ANALYSIS)
#
# # 出院记录
# DISCHARGE_IE = Taskflow("information_extraction", schema=DISCHARGE_RECORD_SCHEMA, model="uie-x-base",
# task_path="config/model/discharge_record_model", layout_analysis=LAYOUT_ANALYSIS)
#
# # 费用清单
# COST_IE = Taskflow("information_extraction", schema=COST_LIST_SCHEMA, model="uie-x-base",
# task_path="config/model/cost_list_model", layout_analysis=LAYOUT_ANALYSIS)

View File

@@ -173,9 +173,9 @@ def information_extraction(ie, phrecs):
result = merge_result(result, ie_result)
# 完成一次任务释放显存
paddle.device.cuda.empty_cache()
logging.info("显存释放完成")
# # 完成一次任务释放显存
# paddle.device.cuda.empty_cache()
# logging.info("显存释放完成")
return result