Skip to content

Sriyash/cube - #33

Draft
yandaboa wants to merge 22 commits into
UW-Lab:mainfrom
yandaboa:sriyash/cube
Draft

Sriyash/cube#33
yandaboa wants to merge 22 commits into
UW-Lab:mainfrom
yandaboa:sriyash/cube

Conversation

@yandaboa

Copy link
Copy Markdown

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.
List any dependencies that are required for this change.

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (existing functionality will not work without user modification)
  • Documentation update

Screenshots

Please attach before and after screenshots of the change if applicable.

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with ./uwlab.sh --format
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the changelog and the corresponding version in the extension's config/extension.toml file
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

@github-actions github-actions Bot added documentation Improvements or additions to documentation infrastructure asset labels Aug 28, 2026
@patrickhaoy

Copy link
Copy Markdown
Collaborator

@greptileai

@greptile-apps

greptile-apps Bot commented Aug 28, 2026

Copy link
Copy Markdown

Greptile Summary

This PR adds cube manipulation configurations, tactile collection and reset-state tooling, diffusion-policy integration, and an ASTEROID iterative collection/training/evaluation workflow.

  • Adds new task configurations, observations, rewards, events, actions, and recording support for cube workflows.
  • Extends policy evaluation, demonstration collection, and dataset handling.
  • Adds a diffusion-policy submodule and orchestration/helper scripts.

Confidence Score: 2/5

The PR is not safe to merge until the broken collection invocation, incompatible shell interpreter, and ignored no-video setting are corrected.

The new orchestration workflow can fail before collecting data because it passes an unsupported argument, the new executable helper fails under its declared shell, and evaluation disregards an explicit resource-control option.

Files Needing Attention: scripts/ASTEROID/run_asteroid.py; scripts_v2/tools/collect_cubepick_expert5.sh

Important Files Changed

Filename Overview
scripts/ASTEROID/run_asteroid.py Adds iterative collection, training, and evaluation orchestration, but its collection video flag is incompatible with the target CLI and its no-video option is ignored during evaluation.
scripts_v2/tools/collect_demos.py Reworks collection around exploration and expert policies, per-environment horizons, recording, and optional video.
scripts_v2/tools/collect_cubepick_expert5.sh Adds a cube expert collection launcher that cannot execute under its declared POSIX-shell interpreter.
source/uwlab_rl/uwlab_rl/wrappers/diffusion.py Substantially extends diffusion-policy observation and action adaptation.
source/uwlab_tasks/uwlab_tasks/manager_based/manipulation/omnireset/mdp/events.py Adds extensive cube reset and state-management behavior.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[ASTEROID orchestrator] --> B[Collect demonstrations]
  B --> C[Train diffusion policy]
  C --> D[Evaluate checkpoint]
  D --> E{More iterations?}
  E -- Yes --> B
  E -- No --> F[Finish]
Loading

Reviews (1): Last reviewed commit: "Move ICE driver to scripts/ASTEROID/run_..." | Re-trigger Greptile

Comment thread scripts/ASTEROID/run_asteroid.py Outdated
Comment on lines +97 to +98
if not no_video:
command += ["--save_video", "--enable_cameras"]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Collection uses unsupported video flag

During a default ASTEROID run, the orchestrator passes --save_video, but collect_demos.py defines only --video, causing collection to fail during argument or Hydra configuration parsing before the first dataset is collected.

@@ -0,0 +1,52 @@
#!/bin/sh

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Interpreter rejects Bash array syntax

When this executable runs on a system where /bin/sh is a POSIX shell such as dash, its Bash-only arrays and ${!ckpts[@]} expansion fail during parsing, so the collection commands never launch.

Suggested change
#!/bin/sh
#!/usr/bin/env bash

Comment thread scripts/ASTEROID/run_asteroid.py Outdated
Comment on lines +223 to +224
# if not no_video:
command += ["--save_video", "--enable_cameras"]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 No-video setting is ignored

When the orchestrator is run with --no_video, eval_policy still appends --save_video and --enable_cameras, causing evaluation to initialize rendering resources and record video despite the explicit opt-out.

patrickhaoy added a commit that referenced this pull request Aug 29, 2026
Encode the review guidance given on PR #33 so Greptile checks it:

- task-package-self-contained: new tasks get their own package under
  uwlab_tasks/.../<category>/<task>/ with all task-specific mdp terms and
  cfgs inside; do not extend another task's package or env cfg.
- new-task-docs: list new task ids in uw_environments.rst; publications
  also get docs/source/publications/<name>/ and a README bullet.
- optional-research-dependencies: heavy/research deps (diffusion_policy
  etc.) go in extras_require, a submodule, or docs, never install_requires.
- submodule-policy: lab-owned repo, pinned, optional to init, documented.
- Point checkpoints/datasets at the UW-Lab/uwlab-assets HF dataset.
sriyash421 and others added 22 commits August 31, 2026 01:13
20s clip from record_reset_states.py with --video, peg pinned
horizontal (pitch=pi/2, roll=0). Used to verify orientation
before regenerating Peg reset state datasets.
…t CubePick

- rewards.py: pick_height_threshold 0.025→0.4, dense reward target 0.1→0.4
- reset_states_cfg.py: broaden ObjectAnywhereEEAnywhere EE pose range, switch
  reset/grasp dataset_dir to Datasets/CubePick
- rl_state_cfg.py: disable DLSSG/AO/reflections/denoiser, enable DLAA;
  FinetuneEval dataset_dir → ./Datasets/CubePick
- bump diffusion_policy submodule to 1df75dd

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Remove /mnt/storage/lti rsl_rl + pip_prebundle import shims from train.py/play.py
  (play.py keeps --max_episodes/--eval_output/--discretize_actions features)
- Resolve leftover conflict markers in .gitignore; ignore .claude_* dev files
- Untrack .claude_logs/, .claude_run.sh, .claude_setup_uwlab_sriyash_env.sh,
  .claude_test_path.py (kept on disk)
- Restore upstream .vscode/ tooling that had been deleted
- Point UWLAB_CLOUD_ASSETS_DIR back at UW-Lab HF repo (contents identical)
- Reset experts_path default to "" instead of a local checkpoint path
- Make TaskCommandCfg.receptive_asset_cfg optional (None) instead of removing it,
  so data_collection_rgb_cfg.py which still passes it keeps constructing

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019PwcDG7deVjsLbuG1gPdyk
…and README

- run_incontext_exploration.py -> scripts/ASTEROID/run_asteroid.py
- .gitignore: keep only Datasets/ (local reset datasets) from the branch additions
- README.md: revert to upstream (personal checkpoint notes removed)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019PwcDG7deVjsLbuG1gPdyk
…os_asteroid.py; drop env shims

run_asteroid.py rewritten around RunCfg -> [IterationCfg] -> CollectCfg/TrainCfg/EvalCfg.
Curricula are functions building the iteration list (CURRICULA / --schedule); the
previous constants become default_curriculum(). AsteroidRun executes the stages and
writes run_cfg.json to the run directory. Adds --dry_run; wires the previously
unused --not_use_pretrained_checkpoint flag to TrainCfg.init_from_previous.

Behavior changes vs. the old script:
- iteration i now collects its own dataset first (was: previous iteration collected it);
  same commands, resume semantics unchanged
- collect video uses collect_demos_asteroid.py's --video/--video_dir (old passed
  --save_video, which it does not accept); the wandb demo-video upload that called
  the nonexistent conversions/convert_zarr_video.py is dropped
- --no_video now also disables eval video

collect_demos.py: our version moves to collect_demos_asteroid.py; upstream's
collect_demos.py is restored untouched. collect_cubepick_expert5.sh updated.

Remove the /mnt/storage/lti rsl_rl / diffusion_policy / pip_prebundle import shims
from collect_demos_asteroid.py, eval_distilled_policy.py, play_log_obs.py,
record_grasps.py, record_reset_states.py.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019PwcDG7deVjsLbuG1gPdyk
…upstream

Per upstream maintainer guidance, everything ASTEROID-specific now lives in
source/uwlab_tasks/uwlab_tasks/manager_based/manipulation/asteroid/, laid out like
omnireset/ (config/ur5e_robotiq_2f85 + mdp). The package *subclasses* the OmniReset
scene, event, observation, reward and env configs and only expresses the pick-only
deltas, so omnireset/ is byte-identical to UW-Lab/UWLab main again (the branch had
been commenting receptive-object code out of omnireset, which broke its tasks).

New package (tasks are registered under the "Asteroid-" prefix):
- mdp/commands*.py      PickTaskCommand(Cfg): task command with no receptive object
- mdp/rewards.py        ProgressContextPickOnly + dense/sparse pick rewards
- mdp/events.py         SingleObjectMultiResetManager (resets keyed by one object),
                        randomize_env_cfg_unified, randomize_gripper_pos_affine,
                        reset_root_states_discrete_grid
- mdp/observations.py   gripper_pos_normalized, fingertip_contact_force_b
- mdp/recorders/        PreStepExpertMaskRecorder + AsteroidActionStateRecorderManagerCfg
- mdp/actions/          RelCartesianOSCPositionAction(Cfg) (3-DOF + gripper)
- config/.../reset_states_cfg.py, rl_state_cfg.py, data_collection_tactile_cfg.py,
  actions.py, agents/rsl_rl_cfg.py (AsteroidPPORunnerCfg / AsteroidDAggerRunnerCfg
  whose expert obs group points at the pick-only PolicyCfg)
- Reset/grasp datasets come from ASTEROID_DATASETS_DIR (default Datasets/CubePick).

Behavioral notes vs. the previous branch state:
- Receptive-object terms are removed via `= None` overrides instead of commented code.
- randomize_env_cfg_unified promotes the OSC action's scale to per-env on first use
  instead of patching omnireset's RelCartesianOSCAction.
- The tactile expert_obs group reuses PickObservationsCfg.PolicyCfg instead of a copy.

Scripts: all ASTEROID tooling is under scripts/ASTEROID/ (collect_demos_asteroid.py,
eval_asteroid_policy.py, play_log_obs.py, the two launch .sh); upstream's
scripts_v2/tools/{collect_demos,eval_distilled_policy,visualize_reset_states}.py are
restored. record_reset_states.py now handles scenes without a receptive object (keeps
the video flags). run_asteroid.py defaults point at the Asteroid-* tasks.

Docs: docs/source/publications/asteroid/index.rst (quick start + package layout),
linked from docs/index.rst and the README "Getting Started" list.
uwlab_rl/wrappers/diffusion.py: restore license header and builtin generics.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019PwcDG7deVjsLbuG1gPdyk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

asset documentation Improvements or additions to documentation infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants