ec436095dd
Book-CI / test (macos-latest) (push) Has been cancelled
Book-CI / test (ubuntu-latest) (push) Has been cancelled
Book-CI / test (windows-latest) (push) Has been cancelled
Release Fake Tag / publish (push) Has been cancelled
Deploy / deploy (macos-latest) (push) Has been cancelled
Deploy / deploy (ubuntu-latest) (push) Has been cancelled
Deploy / deploy (windows-latest) (push) Has been cancelled
Release to PyPI / Build & publish sglang-kt (push) Has been cancelled
Release to PyPI / Build kt-kernel (Python 3.11) (push) Has been cancelled
Release to PyPI / Build kt-kernel (Python 3.12) (push) Has been cancelled
Release to PyPI / Publish kt-kernel to PyPI (push) Has been cancelled
14 lines
520 B
Python
14 lines
520 B
Python
import json
|
|
|
|
converted_data = []
|
|
with open('/data/user23202791/lpl/LLaMA-Factory/examples/KT_used/translation.jsonl', 'r', encoding='utf-8') as f:
|
|
for line in f:
|
|
data = json.loads(line)
|
|
converted_data.append({
|
|
"instruction": "",
|
|
"input": data["问"],
|
|
"output": data["答"]
|
|
})
|
|
|
|
with open('/data/user23202791/lpl/LLaMA-Factory/examples/KT_used/sft_translation.json', 'w', encoding='utf-8') as f:
|
|
json.dump(converted_data, f, ensure_ascii=False, indent=4) |