CPM-9G-8B/quick_start_clean/transform_data.py

10 lines
203 B
Python
Raw Normal View History

2024-02-28 17:42:58 +08:00
import random
def rand(n: int, r: random.Random):
return int(r.random() * n)
def transform(data, num_sample: int, r: random.Random):
return {"input": data["input"], "output": data["output"]}