From c68bfc598f16020245762238eb77d6955a32e756 Mon Sep 17 00:00:00 2001 From: Yuxuan Hu Date: Tue, 26 Aug 2025 13:26:29 -0700 Subject: [PATCH] fix Error in episode x: 'tuple' object has no attribute '_values' in apps/toy_rl Summary: calling items() on ValueMesh yields a flattened iterable of Tuple[Point, Trajectory] now, probably due to monarch api change. Test Plan: python -m apps.toy_rl.main --- apps/toy_rl/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/toy_rl/main.py b/apps/toy_rl/main.py index 27461d550..70720dd69 100644 --- a/apps/toy_rl/main.py +++ b/apps/toy_rl/main.py @@ -171,7 +171,7 @@ async def episode_collector_task(): try: print(f"🎮 Running episode {episode_count + 1}...") results = await collectors.run_episode.call() - num_trajectories = sum([len(r._values) for r in results]) + num_trajectories = len([r for r in results]) episode_count += 1 print( f"✅ Episode {episode_count} completed! Generated {num_trajectories} trajectories."