暂时取消主动释放显存
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user