Add independent physical objective evaluation - #657
Conversation
|
This comment has been minimized.
This comment has been minimized.
9309e87 to
e97a120
Compare
e97a120 to
43a5d0e
Compare
| atol=0.0, | ||
| ) | ||
| reached = (self._progress < len(self.cfg.regions)) & held | ||
| reached_ids = torch.nonzero(reached, as_tuple=False).squeeze(-1) |
There was a problem hiding this comment.
If the objective runs on CUDA, torch.nonzero(reached) forces a GPU-to-CPU synchronization on every control step, even when no milestone is reached. This can slow the simulation loop; milestone timestamps could be updated using tensor masks without extracting indices.
Prompt To Fix With AI
This is a comment left during a code review.
Path: embodichain/lab/gym/envs/objectives/ordered_placement.py
Line: 182
Comment:
**Per-step GPU synchronization**
If the objective runs on CUDA, `torch.nonzero(reached)` forces a GPU-to-CPU synchronization on every control step, even when no milestone is reached. This can slow the simulation loop; milestone timestamps could be updated using tensor masks without extracting indices.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Description
Stack
codex/task-catalogThis PR now contains only the physical-objective layer originally developed with the task catalog. The catalog, CLI, static gallery, packaging foundation, and their focused tests have moved to #664.
repeated_pick_placeobjective deployment, checked-in startup evidence, public API documentation, project context, and focused tests.Refs #106 and #655. This remains the first incremental physical-evaluation slice; learned-policy adapters, named multi-run experiments, and broader predicates remain follow-up work.
Dependencies: #664 must merge first. No new Python dependencies are introduced. Real physical qualification requires a DexSim build compatible with the repository spawn descriptor API.
Validation
black .with Black 26.3.1: no files changed.python docs/scripts/check_api_docs.py: 2186/2186 exports documented.python .agents/skills/project-dev-context/scripts/context.py check: passed.python -m compileall -q embodichain embodichain_tasks: passed.dexsim.engine; no functional assertions ran locally after the split.The checked-in startup record reports an initialization error and unavailable physical outcome because the available DexSim build rejected
com_quaternion. It does not claim either measured failure or success.Type of change
Screenshots
Not applicable. The dependent catalog PR provides the static gallery UI.
Checklist
black .command to format the code base.python docs/scripts/check_api_docs.py).