to-164
This commit is contained in:
Executable
+106
@@ -0,0 +1,106 @@
|
||||
from aiDataParser import AsyncCore
|
||||
from pydantic import BaseModel
|
||||
from typing import List
|
||||
import os
|
||||
|
||||
class Output(BaseModel):
|
||||
law_name: str
|
||||
|
||||
if __name__ == '__main__':
|
||||
# input_path = '/home1/ava3/project/aiDataParser/task/match_plan/code_match_all/input'
|
||||
# output_path = '/home1/ava3/project/aiDataParser/task/match_plan/code_match_all/output'
|
||||
# ooo = 0
|
||||
# # files = []
|
||||
# for root, dirs, files in os.walk(input_path):
|
||||
# for file in files:
|
||||
# # بررسی پسوند فایل
|
||||
# if file.endswith('.json'):
|
||||
# file_name_full = file.split('.')[0]
|
||||
# file_name = file_name_full.split('_')[-1]
|
||||
# print(f'++++ {ooo}')
|
||||
# ooo +=1
|
||||
# ruuner = AsyncCore(
|
||||
# model_name='gpt-oss-120b',
|
||||
# data_path=f'{input_path}/{file}',
|
||||
# api_url="http://172.16.29.102:8001/v1/", #http://localhost:8010/v1/
|
||||
# output_path=f'{output_path}/{file_name}/',
|
||||
# task_name=f'fplan_{file_name}',
|
||||
# output_schema=Output,
|
||||
# reasoning_effort='medium',
|
||||
# ai_code_version='oss_120b_med',
|
||||
# request_timeout=120,
|
||||
# save_number=1,
|
||||
# max_token=1280,
|
||||
# semaphore_number=5
|
||||
# )
|
||||
# ruuner.async_eval()
|
||||
######################################################################
|
||||
name = 'تأمین اجتماعی'
|
||||
ruuner = AsyncCore(
|
||||
model_name='gpt-oss-120b',
|
||||
data_path=f'/home1/ava3/init_mahdi/project/aiDataParser/task/match_plan/code_match_all_46/input/prompt_تأمین اجتماعی.json',
|
||||
api_url="http://172.16.29.102:8001/v1/", #http://localhost:8010/v1/
|
||||
output_path=f'/home1/ava3/init_mahdi/project/aiDataParser/task/match_plan/code_match_all_46/output/{name}',
|
||||
task_name=f'fplan_tamin',
|
||||
output_schema=Output,
|
||||
reasoning_effort='medium',
|
||||
ai_code_version='oss_120b_med',
|
||||
request_timeout=120,
|
||||
save_number=1,
|
||||
max_token=10000,
|
||||
semaphore_number=5
|
||||
)
|
||||
ruuner.async_eval()
|
||||
######################################################################
|
||||
name = 'مالیات'
|
||||
ruuner = AsyncCore(
|
||||
model_name='gpt-oss-120b',
|
||||
data_path=f'/home1/ava3/init_mahdi/project/aiDataParser/task/match_plan/code_match_all_46/input/prompt_مالیات.json',
|
||||
api_url="http://172.16.29.102:8001/v1/", #http://localhost:8010/v1/
|
||||
output_path=f'/home1/ava3/init_mahdi/project/aiDataParser/task/match_plan/code_match_all_46/output/مالیات',
|
||||
task_name=f'fplan_maliat',
|
||||
output_schema=Output,
|
||||
reasoning_effort='medium',
|
||||
ai_code_version='oss_120b_med',
|
||||
request_timeout=120,
|
||||
save_number=1,
|
||||
max_token=10000,
|
||||
semaphore_number=5
|
||||
)
|
||||
ruuner.async_eval()
|
||||
######################################################################
|
||||
name = 'تشکل\u200cهای مدنی و احزاب'
|
||||
ruuner = AsyncCore(
|
||||
model_name='gpt-oss-120b',
|
||||
data_path=f'/home1/ava3/init_mahdi/project/aiDataParser/task/match_plan/code_match_all_46/input/prompt_تشکلهای مدنی و احزاب.json',
|
||||
api_url="http://172.16.29.102:8001/v1/", #http://localhost:8010/v1/
|
||||
output_path=f'/home1/ava3/init_mahdi/project/aiDataParser/task/match_plan/code_match_all_46/output/تشکلهای مدنی و احزاب',
|
||||
task_name=f'fplan_tashakol',
|
||||
output_schema=Output,
|
||||
reasoning_effort='medium',
|
||||
ai_code_version='oss_120b_med',
|
||||
request_timeout=120,
|
||||
save_number=1,
|
||||
max_token=10000,
|
||||
semaphore_number=5
|
||||
)
|
||||
ruuner.async_eval()
|
||||
######################################################################
|
||||
name = 'اداری و استخدامی'
|
||||
ruuner = AsyncCore(
|
||||
model_name='gpt-oss-120b',
|
||||
data_path=f'/home1/ava3/init_mahdi/project/aiDataParser/task/match_plan/code_match_all_46/input/prompt_اداری و استخدامی.json',
|
||||
api_url="http://172.16.29.102:8001/v1/", #http://localhost:8010/v1/
|
||||
output_path=f'/home1/ava3/init_mahdi/project/aiDataParser/task/match_plan/code_match_all_46/output/اداری و استخدامی',
|
||||
task_name=f'fplan_edari',
|
||||
output_schema=Output,
|
||||
reasoning_effort='medium',
|
||||
ai_code_version='oss_120b_med',
|
||||
request_timeout=120,
|
||||
save_number=1,
|
||||
max_token=10000,
|
||||
semaphore_number=5
|
||||
)
|
||||
ruuner.async_eval()
|
||||
|
||||
# python3 -m aiDataParser.task.match_plan.match_plan_qs_run
|
||||
Reference in New Issue
Block a user