to-164
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
from aiDataParser import AsyncCore
|
||||
from pydantic import BaseModel
|
||||
import os
|
||||
import orjson
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def load_orjson(path: str | Path):
|
||||
path = Path(path)
|
||||
with path.open("rb") as f: # باید باینری باز بشه برای orjson
|
||||
return orjson.loads(f.read())
|
||||
|
||||
|
||||
def save_orjson(path, data):
|
||||
with open(path, "wb") as f:
|
||||
f.write(
|
||||
orjson.dumps(data, option=orjson.OPT_INDENT_2 | orjson.OPT_NON_STR_KEYS)
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
# start = time.time()
|
||||
ruuner = AsyncCore(
|
||||
output_schema=None,
|
||||
model_name="gemma-4-31B-it", # "gemma-3-27b" , # "gpt-oss-120b"
|
||||
data_path="/home1/ava3/DataLake/OCR/normal_dataset/CHAMROSH/unvalid_string.json",
|
||||
output_path="/home1/ava3/DataLake/OCR/normal_dataset/CHAMROSH/validation",
|
||||
api_url="http://localhost:8001/v1/", # "http://172.16.29.102:8001/v1/"
|
||||
task_name="word-correction", # "gemma-27",
|
||||
reasoning_effort="medium",
|
||||
ai_code_version="gemma4-31b-med",
|
||||
request_timeout=600,
|
||||
save_number=1,
|
||||
semaphore_number=100,
|
||||
priority=5,
|
||||
max_token=None,
|
||||
)
|
||||
ruuner.sync_eval()
|
||||
|
||||
# python3 -m aiDataParser.task.just_run.run
|
||||
Reference in New Issue
Block a user