33 lines
839 B
Python
33 lines
839 B
Python
#!/usr/bin/env python3
|
|
import json
|
|
from pathlib import Path
|
|
|
|
import pyarrow.parquet as pq
|
|
|
|
|
|
BASE = Path("data/Open-SWE-Traces/data")
|
|
CONFIGS = [
|
|
"minimax_m25_openhands_trajectories",
|
|
"minimax_m25_sweagent_trajectories",
|
|
"qwen35_openhands_trajectories",
|
|
"qwen35_sweagent_trajectories",
|
|
]
|
|
|
|
|
|
def main() -> int:
|
|
for cfg in CONFIGS:
|
|
file = sorted((BASE / cfg).glob("*.parquet"))[0]
|
|
row = pq.read_table(file).slice(0, 1).to_pylist()[0]
|
|
print("CFG", cfg)
|
|
print("cols", list(row.keys()))
|
|
trajectory = row["trajectory"]
|
|
print("len", len(trajectory))
|
|
for index, message in enumerate(trajectory[:10]):
|
|
print("MSG", index, json.dumps(message, ensure_ascii=False)[:1600])
|
|
print("---")
|
|
return 0
|
|
|
|
|
|
if __name__ == "__main__":
|
|
raise SystemExit(main())
|