(self, traj_path: str)
| 48 | |
| 49 | class TrajectoryAnalyzer: |
| 50 | def __init__(self, traj_path: str): |
| 51 | try: |
| 52 | with open(traj_path) as f: |
| 53 | self.traj = json.load(f) |
| 54 | self.messages = self.traj.get("messages", []) |
| 55 | except (json.JSONDecodeError, FileNotFoundError, KeyError): |
| 56 | self.traj = {} |
| 57 | self.messages = [] |
| 58 | |
| 59 | @property |
| 60 | def steps(self) -> int: |