Auto-sync: 2026-06-29 11:36:27
Browse files
dovla_cil/eval/maniskill_policy_rollout.py
CHANGED
|
@@ -2040,7 +2040,10 @@ def _lattice_candidate_mask(
|
|
| 2040 |
excluded = set(exclude_types)
|
| 2041 |
rows: list[list[bool]] = []
|
| 2042 |
for case in batch:
|
| 2043 |
-
allowed = [
|
|
|
|
|
|
|
|
|
|
| 2044 |
if not any(allowed):
|
| 2045 |
allowed = [True] * len(case.candidate_types)
|
| 2046 |
rows.append(allowed)
|
|
@@ -2057,10 +2060,21 @@ def _lattice_candidate_strict_mask(
|
|
| 2057 |
excluded = set(exclude_types)
|
| 2058 |
rows: list[list[bool]] = []
|
| 2059 |
for case in batch:
|
| 2060 |
-
rows.append(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2061 |
return torch.tensor(rows, dtype=torch.bool, device=device)
|
| 2062 |
|
| 2063 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2064 |
def _lattice_candidate_type_bonus(
|
| 2065 |
batch: list[_RolloutCase],
|
| 2066 |
*,
|
|
|
|
| 2040 |
excluded = set(exclude_types)
|
| 2041 |
rows: list[list[bool]] = []
|
| 2042 |
for case in batch:
|
| 2043 |
+
allowed = [
|
| 2044 |
+
not _candidate_type_matches_exclusion(candidate_type, excluded)
|
| 2045 |
+
for candidate_type in case.candidate_types
|
| 2046 |
+
]
|
| 2047 |
if not any(allowed):
|
| 2048 |
allowed = [True] * len(case.candidate_types)
|
| 2049 |
rows.append(allowed)
|
|
|
|
| 2060 |
excluded = set(exclude_types)
|
| 2061 |
rows: list[list[bool]] = []
|
| 2062 |
for case in batch:
|
| 2063 |
+
rows.append(
|
| 2064 |
+
[
|
| 2065 |
+
not _candidate_type_matches_exclusion(candidate_type, excluded)
|
| 2066 |
+
for candidate_type in case.candidate_types
|
| 2067 |
+
]
|
| 2068 |
+
)
|
| 2069 |
return torch.tensor(rows, dtype=torch.bool, device=device)
|
| 2070 |
|
| 2071 |
|
| 2072 |
+
def _candidate_type_matches_exclusion(candidate_type: str, excluded: set[str]) -> bool:
|
| 2073 |
+
if candidate_type in excluded:
|
| 2074 |
+
return True
|
| 2075 |
+
return any(part in excluded for part in candidate_type.split("+"))
|
| 2076 |
+
|
| 2077 |
+
|
| 2078 |
def _lattice_candidate_type_bonus(
|
| 2079 |
batch: list[_RolloutCase],
|
| 2080 |
*,
|
logs/auto_sync_hf.log
CHANGED
|
@@ -234,3 +234,4 @@ No files have been modified since last commit. Skipping to prevent empty commit.
|
|
| 234 |
No files have been modified since last commit. Skipping to prevent empty commit.
|
| 235 |
No files have been modified since last commit. Skipping to prevent empty commit.
|
| 236 |
No files have been modified since last commit. Skipping to prevent empty commit.
|
|
|
|
|
|
| 234 |
No files have been modified since last commit. Skipping to prevent empty commit.
|
| 235 |
No files have been modified since last commit. Skipping to prevent empty commit.
|
| 236 |
No files have been modified since last commit. Skipping to prevent empty commit.
|
| 237 |
+
No files have been modified since last commit. Skipping to prevent empty commit.
|