anhtld commited on
Commit
bd14d8a
·
verified ·
1 Parent(s): dfb4bfa

Auto-sync: 2026-06-30 02:54:08 (part 2)

Browse files
tests/test_maniskill_policy_rollout.py CHANGED
@@ -99,10 +99,16 @@ def test_policy_rollout_summary_includes_candidate_oracle_when_present() -> None
99
  "candidate_oracle_score_gain_over_selected": 1.7,
100
  "candidate_oracle_unique_count": 4,
101
  "candidate_oracle_improves_selected": True,
 
102
  "candidate_oracle_selected_branch_success": False,
103
  "candidate_oracle_selected_branch_progress": 0.1,
104
  "candidate_oracle_restore_error": 3e-7,
105
  "candidate_oracle_candidate_type": "retrieval_residual_residual_no_op",
 
 
 
 
 
106
  },
107
  {
108
  "success": True,
@@ -120,10 +126,16 @@ def test_policy_rollout_summary_includes_candidate_oracle_when_present() -> None
120
  "candidate_oracle_score_gain_over_selected": 0.0,
121
  "candidate_oracle_unique_count": 2,
122
  "candidate_oracle_improves_selected": False,
 
123
  "candidate_oracle_selected_branch_success": True,
124
  "candidate_oracle_selected_branch_progress": 0.9,
125
  "candidate_oracle_restore_error": 2e-7,
126
  "candidate_oracle_candidate_type": "retrieval_residual_policy_residual",
 
 
 
 
 
127
  },
128
  ]
129
 
@@ -139,6 +151,13 @@ def test_policy_rollout_summary_includes_candidate_oracle_when_present() -> None
139
  "retrieval_residual_residual_no_op": 1,
140
  "retrieval_residual_policy_residual": 1,
141
  }
 
 
 
 
 
 
 
142
 
143
 
144
  def test_policy_rollout_loads_state_archive(tmp_path: Path) -> None:
 
99
  "candidate_oracle_score_gain_over_selected": 1.7,
100
  "candidate_oracle_unique_count": 4,
101
  "candidate_oracle_improves_selected": True,
102
+ "candidate_oracle_best_branch_rank": 2,
103
  "candidate_oracle_selected_branch_success": False,
104
  "candidate_oracle_selected_branch_progress": 0.1,
105
  "candidate_oracle_restore_error": 3e-7,
106
  "candidate_oracle_candidate_type": "retrieval_residual_residual_no_op",
107
+ "candidate_oracle_valid_mask": [True, True],
108
+ "candidate_oracle_branch_successes": [False, True],
109
+ "candidate_oracle_branch_progress": [0.1, 0.8],
110
+ "candidate_oracle_branch_scores": [0.1, 1.8],
111
+ "candidate_oracle_branch_score_gains_over_selected": [0.0, 1.7],
112
  },
113
  {
114
  "success": True,
 
126
  "candidate_oracle_score_gain_over_selected": 0.0,
127
  "candidate_oracle_unique_count": 2,
128
  "candidate_oracle_improves_selected": False,
129
+ "candidate_oracle_best_branch_rank": 1,
130
  "candidate_oracle_selected_branch_success": True,
131
  "candidate_oracle_selected_branch_progress": 0.9,
132
  "candidate_oracle_restore_error": 2e-7,
133
  "candidate_oracle_candidate_type": "retrieval_residual_policy_residual",
134
+ "candidate_oracle_valid_mask": [True, True],
135
+ "candidate_oracle_branch_successes": [True, True],
136
+ "candidate_oracle_branch_progress": [0.9, 0.8],
137
+ "candidate_oracle_branch_scores": [1.9, 1.8],
138
+ "candidate_oracle_branch_score_gains_over_selected": [0.0, -0.1],
139
  },
140
  ]
141
 
 
151
  "retrieval_residual_residual_no_op": 1,
152
  "retrieval_residual_policy_residual": 1,
153
  }
154
+ assert summary["candidate_oracle_best_branch_rank"] == 1.5
155
+ assert summary["candidate_oracle_best_branch_rank_counts"] == {2: 1, 1: 1}
156
+ assert summary["candidate_oracle_branch_success_rates"] == [0.5, 1.0]
157
+ assert np.allclose(
158
+ summary["candidate_oracle_branch_score_gains_over_selected"],
159
+ [0.0, 0.8],
160
+ )
161
 
162
 
163
  def test_policy_rollout_loads_state_archive(tmp_path: Path) -> None: