/feat_stats.npz`. The successor-model knobs (plan_beta, plan_depth,
+ plan_particles, plan_score, ...) are carried by the launcher but never read, exactly as for `iql`.
+ """
+
+ def __init__(self, ckpt, feat_stats, device, img_layout="chw", cams=None, proprio_keys=None):
+ from robomimic.algo.ifql_torch import IFQLTorch
+ from robomimic.algo.rsm_scorer import PooledDinoState, CAMS, PROPRIO_KEYS
+ self.ckpt = ckpt
+ self.agent = IFQLTorch(ckpt, device=device)
+ if not feat_stats:
+ feat_stats = self.agent.feat_stats
+ if not feat_stats:
+ raise RuntimeError("rsm_backend=ifql needs rsm_feat_stats (or a bundle that records one)")
+ self.state = PooledDinoState(feat_stats, cams=cams or CAMS,
+ proprio_keys=proprio_keys or PROPRIO_KEYS,
+ img_layout=img_layout).to(device)
+ self.feat_stats = feat_stats
+
+ @torch.no_grad()
+ def state_from_obs(self, obs_t):
+ return self.state(obs_t)
+
+ @torch.no_grad()
+ def score(self, x, chunks, goal_dict=None):
+ """x [B*N, d] z-scored DINO states, chunks [B*N, chunk, adim] -> Q [B*N]."""
+ return self.agent.q(x, chunks[:, 0])
+
+ def describe(self):
+ d = self.agent.describe()
+ d.update({"feat_stats": self.feat_stats, "state_dim": int(self.state.d)})
+ return d
+
+
+def RSMScorerState(st):
+ """BEAM_RISE: RSMScorer.as_state, imported lazily (rsm_scorer pulls in rsm_libero)."""
+ from robomimic.algo.rsm_scorer import RSMScorer
+ return RSMScorer.as_state(st)
+
+
+class RSMPlannerMixin:
+ """See module docstring. Requires `self.algo_config`, `self.nets`, `self.device`, `self.ac_dim`
+ and `_sample_action_chunks` on the host class."""
+
+ # ---- configuration -----------------------------------------------------
+ def configure_planner(self, **kw):
+ """Override planner keys at run time (the eval config, not the checkpoint, decides the planner)."""
+ from robomimic.algo.rsm_beam import BEAM_DEFAULTS as _BEAM_DEFAULTS # BEAM_RISE 2026-11-09 (additive)
+ unknown = set(kw) - set(PLANNER_DEFAULTS) - set(ADV_DEFAULTS) - set(_BEAM_DEFAULTS)
+ if unknown:
+ raise KeyError(f"unknown planner keys {sorted(unknown)}")
+ ov = getattr(self, "_planner_overrides", None) or {}
+ ov.update(kw)
+ self._planner_overrides = ov
+ self._planner_scorer = None
+ self._planner_cfg_cache = None
+
+ def planner_cfg(self):
+ cache = getattr(self, "_planner_cfg_cache", None)
+ if cache is not None:
+ return cache
+ cfg = {}
+ for k, d in list(PLANNER_DEFAULTS.items()) + list(ADV_DEFAULTS.items()):
+ cfg[k] = _cfg_get(self.algo_config, k, d)
+ cfg.update(getattr(self, "_planner_overrides", None) or {})
+ if cfg["plan_n"] is not None:
+ cfg["plan_n"] = int(cfg["plan_n"])
+ cfg["plan_sample_batch"] = int(cfg["plan_sample_batch"] or 0)
+ cfg["plan_max_rows"] = int(cfg["plan_max_rows"] or 0)
+ if cfg["plan_rule"] not in RULES:
+ raise ValueError(f"plan_rule={cfg['plan_rule']} not in {RULES}")
+ self._planner_cfg_cache = cfg
+ return cfg
+
+ @property
+ def planning_enabled(self):
+ n = self.planner_cfg()["plan_n"]
+ return n is not None and n > 1
+
+ def _get_scorer(self):
+ sc = getattr(self, "_planner_scorer", None)
+ if sc is not None:
+ return sc
+ cfg = self.planner_cfg()
+ if cfg["rsm_backend"] == "iql":
+ if cfg["rsm_ckpt"]:
+ sc = IQLCriticBackend.from_checkpoint(cfg["rsm_ckpt"], self.device,
+ feat_stats=cfg["rsm_feat_stats"])
+ else:
+ if "critic" not in self.nets or len(self.nets["critic"]) == 0:
+ raise RuntimeError("rsm_backend=iql needs a checkpoint with critic nets")
+ sc = IQLCriticBackend(list(self.nets["critic"]), own=True)
+ elif cfg["rsm_backend"] == "ifql":
+ if not cfg["rsm_ckpt"]:
+ raise RuntimeError("rsm_backend=ifql needs rsm_ckpt (an ifql_bundle.pt)")
+ sc = IFQLCriticBackend(cfg["rsm_ckpt"], cfg["rsm_feat_stats"], self.device,
+ img_layout=cfg["rsm_img_layout"])
+ else:
+ from robomimic.algo.rsm_scorer import RSMScorer, MAX_ROWS as _SCORER_MAX_ROWS
+ if not cfg["rsm_ckpt"] or not cfg["rsm_feat_stats"]:
+ raise RuntimeError("rsm_backend=%s needs rsm_ckpt and rsm_feat_stats" % cfg["rsm_backend"])
+ # TAIL ALARM (2026-09-21): one hop is a Geom(1-beta) draw of mean 1/(1-beta) frames, discounted by
+ # gamma**(1/(1-beta)); after plan_depth hops the fold DROPS gamma**(depth/(1-beta)) of the gamma-mass.
+ # Nothing ever checked it (depth was swept and picked by success); say so loudly when most of the
+ # mass is dropped, so the read-out is understood as a short-horizon predictor, not a gamma-value.
+ # The TAIL ALARM measures the DETERMINISTIC fold's dropped gamma-mass. The coin chain drops
+ # nothing by construction (its cap is set so P(truncation) <= 1e-3), so firing it there would be
+ # a false alarm; the chain prints its own banner from RSMScorer.__init__ and its own CAP ALARM.
+ # gen_q#273: the MPC read-outs take their horizon FROM gamma by construction (K chunks =
+ # ceil(H/hop_frames), H = 1/(1-gamma)), so the fold's dropped-mass alarm does not apply
+ # and would fire on every MPC cell.
+ _tail = (0.0 if cfg["plan_mode"] in ("chain", "chain_rb", "mpc", "mpc_disc", "beam") else
+ float(cfg["plan_gamma"]) ** (int(cfg["plan_depth"]) / (1.0 - float(cfg["plan_beta"]))))
+ if _tail > 0.5:
+ import sys as _sys
+ print(f"[rsm_planner] TAIL ALARM: depth={cfg['plan_depth']} beta={cfg['plan_beta']} gamma={cfg['plan_gamma']} "
+ f"drops {_tail:.0%} of the gamma-mass -- the read-out covers ~{int(cfg['plan_depth'])/(1-float(cfg['plan_beta'])):.0f} frames", file=_sys.stderr)
+ sc = RSMScorer(backend=cfg["rsm_backend"], ckpt=cfg["rsm_ckpt"], hop_ckpt=cfg["rsm_hop_ckpt"],
+ feat_stats=cfg["rsm_feat_stats"],
+ # BEAM_RISE 2026-11-09: plan_mode=beam scores its nodes with the chain read-out
+ mode=("chain" if cfg["plan_mode"] == "beam" else cfg["plan_mode"]),
+ depth=cfg["plan_depth"],
+ beta=cfg["plan_beta"], gamma=cfg["plan_gamma"], n_particles=cfg["plan_particles"],
+ flow_steps=cfg["plan_flow_steps"], device=self.device,
+ img_layout=cfg["rsm_img_layout"], dwm_module=cfg["rsm_dwm_module"],
+ score_kind=cfg["plan_score"], lcb_quantile=cfg["plan_lcb_quantile"],
+ rescore_top=cfg["plan_rescore_top"],
+ n_particles_rescore=cfg["plan_particles_rescore"],
+ temperature=cfg["plan_temperature"],
+ max_rows=cfg["plan_max_rows"] or _SCORER_MAX_ROWS,
+ chain_cap=int(cfg.get("plan_chain_cap", 0) or 0),
+ chain_tail_eps=float(cfg.get("plan_chain_tail_eps", 1e-3) or 1e-3),
+ chain_seed=(None if int(cfg.get("plan_chain_seed", -1) or -1) < 0
+ else int(cfg["plan_chain_seed"])),
+ mpc_horizon=int(cfg.get("plan_mpc_horizon", 0) or 0))
+ if sc.chunk != int(cfg["plan_chunk"]):
+ raise RuntimeError(f"plan_chunk={cfg['plan_chunk']} but the RSM was trained on chunk {sc.chunk}")
+ self._planner_scorer = sc
+ return sc
+
+ def planner_describe(self):
+ cfg = dict(self.planner_cfg())
+ if self.planning_enabled or cfg["rsm_ckpt"]:
+ try:
+ cfg["scorer"] = self._get_scorer().describe()
+ if cfg["plan_mode"] == "beam": # BEAM_RISE 2026-11-09 (additive)
+ cfg["beam"] = self._get_beam().describe()
+ except Exception as e: # description must never break an eval
+ cfg["scorer"] = {"error": repr(e)}
+ return cfg
+
+ # ---- logging -----------------------------------------------------------
+ def pop_plan_log(self):
+ log = getattr(self, "_plan_log", None) or []
+ self._plan_log = []
+ return log
+
+ # ---- the action --------------------------------------------------------
+ def _executed_window(self, naction):
+ To = self.algo_config.horizon.observation_horizon
+ Ta = self.algo_config.horizon.action_horizon
+ Tp = self.algo_config.horizon.prediction_horizon
+ start = To - 1
+ if Tp == 1: # IQLDiffusion's no-chunking quirk
+ start -= 1
+ return naction[:, start:start + Ta], start
+
+ def _sample_chunked(self, rep, rep_goal, sample_batch):
+ """`_sample_action_chunks` over at most `sample_batch` rows at a time, concatenated.
+
+ sample_batch <= 0 is the released path: a single call on the whole [B*N, ...] batch. The split is
+ purely a memory measure -- rows are independent under the sampler -- but it does change the order in
+ which the DDPM chain consumes the RNG, so it is opt-in via `training.plan_sample_batch`."""
+ rows = rep[next(iter(rep))].shape[0]
+ if sample_batch <= 0 or rows <= sample_batch:
+ return self._sample_action_chunks(rep, rep_goal)
+ out = []
+ for lo in range(0, rows, sample_batch):
+ hi = min(lo + sample_batch, rows)
+ sl = {k: v[lo:hi] for k, v in rep.items()}
+ sl_goal = None if rep_goal is None else {k: v[lo:hi] for k, v in rep_goal.items()}
+ out.append(self._sample_action_chunks(sl, sl_goal))
+ return torch.cat(out, dim=0)
+
+ # ---- BEAM_RISE 2026-11-09: plan_mode=beam (robomimic/algo/rsm_beam.py) ------------------------
+ def _get_beam(self):
+ bs = getattr(self, "_planner_beam", None)
+ if bs is not None and bs.sc is self._get_scorer():
+ return bs
+ from robomimic.algo.rsm_beam import BeamSearch
+ cfg = self.planner_cfg()
+ if cfg["rsm_backend"] != "mlp":
+ raise ValueError("plan_mode=beam is implemented on the mlp backend (got %s)" % cfg["rsm_backend"])
+ if cfg["plan_rule"] != "argmax":
+ raise ValueError("plan_mode=beam selects by argmax of the path value (got plan_rule=%s)" % cfg["plan_rule"])
+ bs = self._planner_beam = BeamSearch(self._get_scorer(), cfg)
+ return bs
+
+ @torch.no_grad()
+ def _beam_get_action(self, obs_dict, naction, cand, B, N, t0, t_sample):
+ import json as _json, os as _os
+ scorer = self._get_scorer()
+ beam = self._get_beam()
+ t1 = time.time()
+ obs_t = {k: v[:, -1] for k, v in obs_dict.items()}
+ st = scorer.state_from_obs(obs_t)
+ z0 = scorer._inputs(RSMScorerState(st)) # [B, D] latent
+ A = scorer._flat_chunk(cand) # [B*N, da]
+ idx, f_rows, extra = [], [], []
+ for b in range(B):
+ j, info = beam.plan(z0[b], A[b * N:(b + 1) * N])
+ idx.append(j)
+ f1 = info["f1"].float().cpu()
+ f = info["f"].float().cpu()
+ rank1 = int((f1 > f1[j]).sum()) # 0 == the chosen root is best-of-N's own pick
+ f_rows.append(f1)
+ extra.append({"rank_l1": rank1, "f_fin_max": float(f.max()), "f1_chosen": float(f1[j]),
+ "f1_max": float(f1.max()), "levels": info["levels"],
+ **({"sel_rank": info["sel_rank"]} if "sel_rank" in info else {})})
+ t_score = time.time() - t1
+ idx_t = torch.tensor(idx, dtype=torch.long, device="cpu") # eval sets default tensor type to cuda
+ chosen = naction.view(B, N, *naction.shape[1:])[torch.arange(B, device=naction.device),
+ idx_t.to(naction.device)]
+ action, _ = self._executed_window(chosen)
+ s = torch.stack(f_rows) # [B, N] level-1 scores
+ ar = torch.arange(B, device="cpu")
+ log = getattr(self, "_plan_log", None)
+ if log is None:
+ log = self._plan_log = []
+ log.append({
+ "n": N, "rule": "beam", "idx": idx, "score_kind": "beam_" + beam.agg,
+ # score_* = the LEVEL-1 (best-of-N) log path value of the root chunks; score_chosen is the
+ # level-1 value of the root the beam executed, so score_max - score_chosen > 0 means the
+ # beam overrode best-of-N's pick.
+ "score_chosen": s[ar, idx_t].tolist(), "score_max": s.max(1).values.tolist(),
+ "score_mean": s.mean(1).tolist(), "score_std": s.std(1).tolist() if N > 1 else [0.0] * B,
+ "score_min": s.min(1).values.tolist(),
+ "ties_at_max": (s >= s.max(1, keepdim=True).values - 1e-6).sum(1).tolist(),
+ "t_sample": t_sample, "t_score": t_score,
+ })
+ _p = _os.environ.get("RR_BEAM_LOG", "")
+ if _p:
+ try:
+ with open(_p, "a") as fh:
+ fh.write(_json.dumps({"t_sample": t_sample, "t_score": t_score, "idx": idx, "beam": extra}) + "\n")
+ except Exception:
+ pass
+ return action
+
+ @torch.no_grad() # the rollout path has NO no_grad anywhere (sim_pipeline/eval/rollout.py
+ # -> robomimic_rollout_policy.predict -> get_action), so the released
+ # DDPM sampler retained an autograd graph across all 100 inference
+ # timesteps: ~75 GB of live activations at plan_n=2048, which is what
+ # actually capped the candidate-count ladder. Forward numerics and RNG
+ # draws are identical under no_grad, so every cell already on disk is
+ # unchanged; this only stops the graph being built.
+ def plan_get_action(self, obs_dict, goal_dict=None):
+ cfg = self.planner_cfg()
+ N = cfg["plan_n"] or 1
+ if N <= 1:
+ naction = self._sample_action_chunks(obs_dict, goal_dict)
+ action, _ = self._executed_window(naction)
+ return action
+
+ t0 = time.time()
+ keys = list(obs_dict.keys())
+ B = obs_dict[keys[0]].shape[0]
+ rep = {k: v.repeat_interleave(N, 0) for k, v in obs_dict.items()}
+ rep_goal = None if goal_dict is None else {k: v.repeat_interleave(N, 0) for k, v in goal_dict.items()}
+ naction = self._sample_chunked(rep, rep_goal, cfg["plan_sample_batch"]) # [B*N, Tp, ac]
+ t_sample = time.time() - t0
+
+ _, start = self._executed_window(naction)
+ chunk = int(cfg["plan_chunk"])
+ cand = naction[:, start:start + chunk] # [B*N, chunk, ac]
+ if cfg["plan_mode"] == "beam": # BEAM_RISE 2026-11-09: additive, no other mode enters
+ return self._beam_get_action(obs_dict, naction, cand, B, N, t0, t_sample)
+ # gen_q#273: keep the actions the released path discards. `naction` is [B*N, Tp=16, ac] and only
+ # the first `chunk` (8) of the executed window is scored; the rest is the PROPOSER'S OWN
+ # CONTINUATION of that same candidate and is what an MPC read-out should roll the world model over
+ # past frame 8. Write-only for every existing backend (rsm_mpc_ctx docstring), so no cell moves.
+ _mpc_ctx.set_tail(naction[:, start + chunk:]) # [B*N, Tp-start-chunk, ac]
+ obs_t = {k: v[:, -1] for k, v in obs_dict.items()} # current frame (To-1)
+
+ t1 = time.time()
+ rule = cfg["plan_rule"]
+ scorer = None
+ q_prob = q_logit = q_lcb = q_problog = None # every read-out of the RSM scorer (for the log)
+ if rule in ("random", "first"):
+ # Both controls ignore the scores by construction, so the scorer is never built. The
+ # CANDIDATES are identical either way -- they come from the proposer, not the scorer -- which
+ # is what makes `first` a control on the same 128 draws at a fraction of the cost.
+ scores = torch.zeros(B * N, device=naction.device)
+ else:
+ scorer = self._get_scorer()
+ if isinstance(scorer, IQLCriticBackend):
+ obs_rep_t = {k: v[:, -1] for k, v in rep.items()}
+ if scorer.needs_dino_state:
+ # Encode the B CURRENT frames once and repeat across the N candidates -- the same
+ # thing the IFQL and RSM branches do. Encoding `rep` instead would run the frozen
+ # ViT B*N=128x too often for an identical result.
+ obs_rep_t["dino_state"] = scorer.state_from_obs(obs_t).repeat_interleave(N, 0)
+ scores = scorer.score(obs_rep_t, cand, goal_dict=rep_goal)
+ elif isinstance(scorer, IFQLCriticBackend):
+ # DINO is the expensive part, so encode the B current frames ONCE and repeat the state
+ # across the N candidates (the same thing the RSM path does below).
+ x = scorer.state_from_obs(obs_t).repeat_interleave(N, 0)
+ scores = scorer.score(x, cand)
+ else:
+ st = scorer.state_from_obs(obs_t) # B states
+ # The SCORER repeats its own state (gen_q#268). This line used to rebuild the
+ # namespace here as (x, tok, pr) and dropped the pixel backends' `img`:
+ # state_from_obs built LeWM's frames and the next line threw them away, so _inputs
+ # saw img=None and _rows died on `None.shape[0]` -- which is why no LeWM eval cell
+ # ever landed. A field list maintained in the caller goes stale; RSMScorer.repeat_state
+ # repeats whatever the state carries.
+ st_rep = scorer.repeat_state(st, N)
+ seed = cfg["plan_seed"]
+ scores = scorer.score(st_rep, cand, seed=None if seed is None or int(seed) < 0 else int(seed))
+ q_prob = getattr(scorer, "last_q", None)
+ q_logit = getattr(scorer, "last_q_logit", None)
+ q_lcb = getattr(scorer, "last_q_lcb", None)
+ q_problog = getattr(scorer, "last_q_problog", None)
+ t_score = time.time() - t1
+
+ # plan_score=prob_log hands back a float64 array whose values sit near -depth * logit (about -490 at
+ # depth 4 on threading, where the reward logits are ~121). float32's spacing at that magnitude is
+ # 6e-5, which is still far below the O(1) gaps between candidates, but casting down would put the
+ # ranking back in the regime of "distinct candidates collapse to one float" that this read-out
+ # exists to leave -- and would make the 1e-6 tie tolerance below narrower than one ULP. So keep
+ # float64 when that is what the scorer produced; every other read-out is float32 exactly as before.
+ _sc = scores.detach().cpu()
+ s = (_sc.double() if _sc.dtype == torch.float64 else _sc.float()).view(B, N)
+ p = s if q_prob is None else q_prob.detach().float().cpu().view(B, N)
+ lg = None if q_logit is None else q_logit.detach().float().cpu().view(B, N)
+ lc = None if q_lcb is None else q_lcb.detach().float().cpu().view(B, N)
+ pl = None if q_problog is None else q_problog.detach().double().cpu().view(B, N)
+ gen = getattr(self, "_plan_generator", None)
+ if gen is None and cfg["plan_seed"] is not None and int(cfg["plan_seed"]) >= 0:
+ gen = torch.Generator().manual_seed(int(cfg["plan_seed"]))
+ self._plan_generator = gen
+ idx = select(s, rule, temp=cfg["plan_temp"], topk=cfg["plan_topk"], generator=gen)
+
+ ar_dev = torch.arange(B, device=naction.device)
+ chosen = naction.view(B, N, *naction.shape[1:])[ar_dev, idx.to(naction.device)]
+ ar = torch.arange(B, device="cpu")
+ action, _ = self._executed_window(chosen)
+
+ log = getattr(self, "_plan_log", None)
+ if log is None:
+ log = self._plan_log = []
+ entry = {
+ "n": N, "rule": rule, "idx": idx.tolist(),
+ "score_kind": cfg["plan_score"] if q_prob is not None else ("none" if rule in ("random", "first") else "prob"),
+ # the RANKING array (Q̄ or Q̄_logit per plan_score; the IQL critic's Q for backend iql)
+ "score_chosen": s[ar, idx].tolist(),
+ "score_max": s.max(1).values.tolist(), "score_mean": s.mean(1).tolist(),
+ "score_std": s.std(1).tolist() if N > 1 else [0.0] * B,
+ "score_min": s.min(1).values.tolist(),
+ # ties at the max of the ranking array (argmax picks the first of them; that is uniform over the tied
+ # set ONLY IF candidates are exchangeable in index, which is an assumption -- plan_rule=first is the
+ # control that measures it, see select() and gen_q#282) and saturation of the probability read-out (QÌ„ >= 0.999): both are 1 when
+ # the ranking carries nothing
+ "ties_at_max": (s >= s.max(1, keepdim=True).values - 1e-6).sum(1).tolist(),
+ "frac_saturated": (p >= 0.999).float().mean(1).tolist(),
+ # both read-outs of the RSM scorer, whichever one ranks
+ "prob_chosen": p[ar, idx].tolist(), "prob_max": p.max(1).values.tolist(), "prob_mean": p.mean(1).tolist(),
+ # gen_q#266: ties of the PROBABILITY array itself, regardless of which array ranks. `ties_at_max`
+ # above is the ranking array's, so under plan_score=prob_log it is prob_log's (~1) and says
+ # nothing about prob. This one makes "prob would have tied ~60 of 128 here, prob_log ties 1" a
+ # WITHIN-CELL comparison on the same states, instead of a comparison across two sweeps.
+ # (With a backend that has no probability read-out, p is the ranking array and this equals
+ # `ties_at_max` by construction.)
+ "prob_ties_at_max": (p >= p.max(1, keepdim=True).values - 1e-6).sum(1).tolist(),
+ "prob_ties_at_max_exact": (p == p.max(1, keepdim=True).values).sum(1).tolist(),
+ "prob_distinct": [int(torch.unique(p[b]).numel()) for b in range(B)],
+ "t_sample": t_sample, "t_score": t_score,
+ }
+ if lc is not None:
+ entry.update({"lcb_chosen": lc[ar, idx].tolist(), "lcb_max": lc.max(1).values.tolist(),
+ "lcb_mean": lc.mean(1).tolist(),
+ "lcb_std": lc.std(1).tolist() if N > 1 else [0.0] * B,
+ "lcb_quantile": float(getattr(scorer, "lcb_quantile", float("nan"))),
+ "lcb_ties_at_max": (lc >= lc.max(1, keepdim=True).values - 1e-6).sum(1).tolist()})
+ if pl is not None:
+ # gen_q#266: prob_log is `prob` folded in the log-complement domain, so its tie count is the
+ # health number that makes the "prob ties ~60 of 128, prob_log ties 1" claim checkable from the
+ # eval JSON alone -- no re-scoring. Recorded beside `ties_at_max` / `logit_ties_at_max` and
+ # with the same 1e-6 absolute tolerance, on the float64 array (see the dtype note above).
+ entry.update({"prob_log_chosen": pl[ar, idx].tolist(), "prob_log_max": pl.max(1).values.tolist(),
+ "prob_log_mean": pl.mean(1).tolist(),
+ "prob_log_std": pl.std(1).tolist() if N > 1 else [0.0] * B,
+ "prob_log_ties_at_max": (pl >= pl.max(1, keepdim=True).values - 1e-6).sum(1).tolist(),
+ # The 1e-6 ABSOLUTE tolerance above is the convention the other read-outs use,
+ # but it is not a tie count for this one: prob_log = -log(1 - QÌ„) ranges over 40+
+ # orders of magnitude (about 124 where every candidate succeeds, about 1e-44 in a
+ # hopeless state where every logit is -100), so in the hopeless regime 1e-6
+ # swallows the whole candidate set and reports 128 ties where the float64 values
+ # are in fact distinct. These two are tolerance-free and are what the ordering
+ # claim should be read off: exact bitwise equality, and the count of DISTINCT
+ # values in the array.
+ "prob_log_ties_at_max_exact": (pl == pl.max(1, keepdim=True).values).sum(1).tolist(),
+ "prob_log_distinct": [int(torch.unique(pl[b]).numel()) for b in range(B)]})
+ if lg is not None:
+ entry.update({"logit_chosen": lg[ar, idx].tolist(), "logit_max": lg.max(1).values.tolist(),
+ "logit_mean": lg.mean(1).tolist(),
+ "logit_std": lg.std(1).tolist() if N > 1 else [0.0] * B,
+ "logit_ties_at_max": (lg >= lg.max(1, keepdim=True).values - 1e-6).sum(1).tolist()})
+ log.append(entry)
+ return action
diff --git a/code_src/rise_robomimic/robomimic/algo/rsm_scorer.py b/code_src/rise_robomimic/robomimic/algo/rsm_scorer.py
new file mode 100644
index 0000000000000000000000000000000000000000..d228ec64f1faf7fdd108b4c3431f289bd0363339
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/algo/rsm_scorer.py
@@ -0,0 +1,1876 @@
+"""RSM (successor-model) scorer for RISE policy extraction (rsm_rise Stage 3).
+
+One object, two jobs:
+
+ score(state, A) -> QÌ„[N] E1: rank N candidate 8-step chunks at one state (common random
+ numbers across the N rows: particle i of every candidate uses the
+ same flow noise / hop-head noise / restart coin, so the arg-max is a
+ paired comparison).
+ advantage(state, A) -> Q̄, V̄_τ E2: Q̄ of the logged (kNN-swapped) chunk and the τ-expectile of Q̄
+ over M hop-head chunks at the same state.
+
+State = the pooled DINO vector RISE's `DinoV2Core(concatenate=True)` produces for the CURRENT frame:
+[agentview CLS|GeM (768) | wrist CLS|GeM (768) | eef_pos(3) eef_quat(4) gripper_qpos(2)] = 1545, z-scored
+with the Stage-1 cache's feat_stats.npz (mu/sd over all frames, sd floored at 1e-3). Images arrive in the
+policy's format (float CHW in [0,1], robomimic ObsUtils.process_frame), which is exactly what
+scripts/relabel_dino.py fed DINO when it built the cache (NOT the H/W-transposed layout of RISE's
+offline relabel_dino_features.py; `img_layout="rise_t"` reproduces that one if a cache ever needs it).
+
+Backends
+ mlp the rsm_libero MLP flow (train_rsm.py blob: enc/rew/flow/rms/config/d_act/enc_kind/d_in),
+ read-outs d1 / fold / recursive via is_ope.q_fold / q_recursive (crn=True).
+ dwm the token successor model (stream C): `dwm_readout.load_critic_dwm(path, device)` (module name
+ `rsm_dwm_module`, default `dwm_readout`), scoring RAW [B,514,384] tokens + RAW proprio; d1 / fold.
+ mc MC return-to-go MLP on [x | A] (S3H5 control), blob {"net", "config":{"d_in","d_act","width","depth"}}.
+The IQL-critic backend (S3H4) lives in rsm_planner.py because it scores the raw obs dict with the
+fork's own critic nets, not a DINO state.
+
+All read-outs return QÌ„ on the success-probability scale ([0,1] for d1/fold; recursive is rescaled by
+(1-γ) from is_ope's Q/(1-γ)). The E2 caller rescales (1/(1-γ) "td" or batch-standardised "std").
+
+Logit read-out (stream E, orchestrator 13:05): d1 / fold also expose Q̄_logit = mean over particles of the
+reward head's RAW logit at the last hop state (the DWM read-out's `q_logit` convention), which does not
+saturate / tie at 1.0 the way mean-sigmoid does. `score_kind="logit"` ranks by it; `.last_q` / `.last_q_logit`
+hold both arrays after every score() call. Temperature T (calib.json next to the checkpoint, or an explicit
+override) enters only the sigmoid: q = mean_i σ(logit_i / T); the logit ranking is T-free. Two-stage screening
+(rescore_top=K, n_particles_rescore=M): every candidate is scored with n_particles, the top-K by the ranking
+array are rescored with M particles and written back (DWM: inside dwm_readout; MLP: here, second draw of the
+seeded stream). Log-complement read-out (gen_q#266): `score_kind="prob_log"` ranks by the SAME quantity as "prob" -- the whole
+product fold, averaged over particles -- but folded as log(1 - Q) so it never rounds to 1.0. `prob`'s ties are
+numerical, not structural: threading cells record reward logits near +121, where σ is exactly 1.0 in float64
+and Q collapses to exactly 1.0 for ~60 of 128 candidates, so the arg-max there is a uniform draw inside the
+tied set. `prob_log` is a strictly monotone transform of `prob`'s infinite-precision value, so it keeps the
+fold (unlike "logit", which reports only the LAST hop's logit and discards hops 0..L-2) and still totally
+orders the candidates. It needs the per-hop reward logits, so it is mlp-backend / d1-fold only, and
+`.last_q_problog` holds it after every score() call. Rows of the MLP read-out are processed in slices of at most `max_rows` (65536) with the CRN
+noise drawn ONCE for all particles, so plan_particles up to 32768 at N=128 fits and results do not depend on
+the slicing.
+"""
+from __future__ import annotations
+
+import contextlib
+import math
+import importlib
+import os
+import sys
+from types import SimpleNamespace
+
+import numpy as np
+import torch
+import torch.nn as nn
+
+RSM_LIBERO_DIR = os.environ.get(
+ "RSM_LIBERO_DIR", "/proj/dmfexp/zwhong/rsm_rise/code/gen_q/rsm_libero")
+
+CAMS = ("agentview_image", "robot0_eye_in_hand_image")
+PROPRIO_KEYS = ("robot0_eef_pos", "robot0_eef_quat", "robot0_gripper_qpos")
+D_TOK, N_PATCH = 384, 256
+STATE_DIM = 2 * 2 * D_TOK + 9 # 1545
+
+# "chain"/"chain_rb" (gen_q#267): the coin-terminated beta chain, the ogbench_genq/rsm.py read-out.
+# ADDED, never substituted -- d1/fold/recursive are byte-for-byte the code they were.
+# gen_q#273: "mpc" / "mpc_disc" are the WORLD-MODEL MPC read-outs (dwm / dinowm / lewm backends only).
+# The roll-out is the same open-loop one the fold performs; only the combination of the per-chunk
+# reward-head values differs -- terminal latent, or the gamma-discounted sum over the roll-out.
+_MODES = ("d1", "fold", "recursive", "chain", "chain_rb", "mpc", "mpc_disc")
+_MPC_MODES = ("mpc", "mpc_disc")
+# Backends whose state is the RAW token frame + raw proprio rather than the pooled 1545-d vector, and
+# whose q() takes the dwm read-out's kwargs (crn_seed, internal two-stage rescore). gen_q#268 adds
+# `dinowm`: the same token state and the same read-out interface, with DINO-WM's deterministic latent
+# dynamics in place of the occupancy flow (rsm_libero/dinowm_readout.py).
+TOKEN_BACKENDS = ("dwm", "dinowm")
+# Default read-out module per backend; `rsm_dwm_module` overrides it (that is how stream C injects an
+# alternative DWM read-out). Keyed by backend so `rsm_backend=dinowm` needs no extra hydra override
+# and the eval JSON records WHICH scorer ran in `rsm_backend` itself -- which is what
+# scripts/verdict_table.py classifies the arm on.
+READOUT_MODULE = {"dwm": "dwm_readout", "dinowm": "dinowm_readout"}
+_SCORE_KINDS = ("prob", "logit", "prob_log", "conformal_lcb")
+MAX_ROWS = 65536 # rows (candidates x particles) per slice of the MLP read-out
+# coin-terminated beta chain: the cap is chosen so P(walk longer than cap) <= this. The reference
+# (ogbench_genq/rsm.py:76) documents exactly this rule -- its REC_MAX_DEPTH = 10 is the ~1e-3 tail at
+# beta = 0.98. Never hard-code a cap; call chain_cap(beta, gamma).
+CHAIN_TAIL_EPS = 1e-3
+
+
+def read_calib_temperature(ckpt):
+ """calib.json next to a checkpoint (rsm_libero/calib_dwm.py: {"T": ...}) -> T, or None if absent/unreadable."""
+ try:
+ cj = os.path.join(os.path.dirname(os.path.abspath(ckpt)), "calib.json")
+ if os.path.exists(cj):
+ import json
+ return float(json.load(open(cj))["T"])
+ except Exception as e: # a broken calib file must not break the scorer; T = 1
+ print(f"[rsm_scorer] calib.json next to {ckpt} unreadable ({e}); T=1", flush=True)
+ return None
+
+
+def _rsm_modules():
+ """Import rsm_libero's model / train_rsm / is_ope lazily (they are plain top-level modules)."""
+ if RSM_LIBERO_DIR not in sys.path:
+ sys.path.insert(0, RSM_LIBERO_DIR)
+ model = importlib.import_module("model")
+ train_rsm = importlib.import_module("train_rsm")
+ is_ope = importlib.import_module("is_ope")
+ return model, train_rsm, is_ope
+
+
+@contextlib.contextmanager
+def seeded(seed, device=None):
+ """Fork the RNG state and seed it, so a scorer call is reproducible without disturbing the
+ caller's stream (the diffusion sampler's noise must stay independent of the scorer's)."""
+ if seed is None or int(seed) < 0:
+ yield
+ return
+ devices = []
+ if device is not None and torch.device(device).type == "cuda" and torch.cuda.is_available():
+ devices = [torch.device(device)]
+ with torch.random.fork_rng(devices=devices):
+ torch.manual_seed(int(seed))
+ yield
+
+
+def gem_pool(patch_tokens):
+ """DinoV2Core's GeM: [B,256,384] -> [B,384] (clamp 1e-6, pow 4, mean over the 16x16 grid, pow 1/4)."""
+ B = patch_tokens.shape[0]
+ pd = int(np.sqrt(patch_tokens.shape[-2]))
+ p = patch_tokens.reshape(B, pd, pd, -1).clamp(min=1e-6).permute(0, 3, 1, 2)
+ return nn.functional.avg_pool2d(p.pow(4), (pd, pd)).pow(1 / 4).reshape(B, -1)
+
+
+def pooled_from_tokens(tok):
+ """[B,514,384] (agentview CLS, 256 patches, wrist CLS, 256 patches) -> [B,1536] = z.f16.npy layout."""
+ out = []
+ for c in range(2):
+ cls = tok[:, c * (1 + N_PATCH)]
+ pt = tok[:, c * (1 + N_PATCH) + 1:(c + 1) * (1 + N_PATCH)]
+ out.append(torch.cat([cls, gem_pool(pt)], -1))
+ return torch.cat(out, -1)
+
+
+def expectile(q, tau, iters=50):
+ """tau-expectile of each row of q [B,M] (tau=0.5 is exactly the mean).
+ Fixed-point iteration of the asymmetric-least-squares stationarity condition."""
+ tau = float(tau)
+ v = q.mean(1, keepdim=True)
+ if abs(tau - 0.5) < 1e-12:
+ return v[:, 0]
+ for _ in range(iters):
+ w = torch.where(q > v, torch.full_like(q, tau), torch.full_like(q, 1.0 - tau))
+ v_new = (w * q).sum(1, keepdim=True) / w.sum(1, keepdim=True)
+ if torch.allclose(v_new, v, atol=1e-7, rtol=0):
+ v = v_new
+ break
+ v = v_new
+ return v[:, 0]
+
+
+# --------------------------------------------------------------------------- #
+# state: pooled DINO vector / tokens from the policy's obs dict
+# --------------------------------------------------------------------------- #
+class PooledDinoState(nn.Module):
+ """obs dict at ONE time step (values [B, ...], images float CHW in [0,1]) -> z-scored 1545-d state.
+
+ `dino` may be any module with `.backbone_model` (a dinov2 hub model) and `.transform`; by default
+ RISE's DinoV2Core (frozen, concatenate=True) is instantiated, which is what the cache used."""
+
+ def __init__(self, feat_stats, cams=CAMS, proprio_keys=PROPRIO_KEYS, backbone="dinov2_vits14",
+ img_layout="chw", dino=None):
+ super().__init__()
+ self.cams = tuple(cams)
+ self.proprio_keys = tuple(proprio_keys)
+ self.img_layout = img_layout
+ if dino is None:
+ from robomimic.models.obs_core import DinoV2Core
+ dino = DinoV2Core(input_shape=(3, 84, 84), backbone_name=backbone, frozen=True, concatenate=True)
+ self.dino = dino.eval()
+ for p in self.dino.parameters():
+ p.requires_grad_(False)
+ # STATE DEFINITION (Stage 1, final): x = clip((feat - mu) / max(sd, sd_floor), -z_clip, z_clip).
+ # sd_floor / z_clip come from feat_stats.npz (relabel_dino.py writes them), else PACK.json next
+ # to it, else the defaults 0.01 / 10 -- identical to rsm_libero data.py._feat.
+ st = np.load(feat_stats)
+ mu = np.asarray(st["mu"], np.float32)
+ sd = np.asarray(st["sd"], np.float32)
+ sd_floor, z_clip = None, None
+ if "sd_floor" in st.files:
+ sd_floor = float(st["sd_floor"])
+ if "z_clip" in st.files:
+ z_clip = float(st["z_clip"])
+ pack = os.path.join(os.path.dirname(os.path.abspath(feat_stats)), "PACK.json")
+ if (sd_floor is None or z_clip is None) and os.path.exists(pack):
+ import json
+ pk = json.load(open(pack))
+ sd_floor = float(pk.get("sd_floor", 0.01)) if sd_floor is None else sd_floor
+ z_clip = float(pk.get("z_clip", 10.0)) if z_clip is None else z_clip
+ self.sd_floor = 0.01 if sd_floor is None else sd_floor
+ self.z_clip = 10.0 if z_clip is None else z_clip
+ sd = np.maximum(sd, self.sd_floor).astype(np.float32)
+ self.register_buffer("mu", torch.as_tensor(mu))
+ self.register_buffer("sd", torch.as_tensor(sd))
+ self.d = int(mu.shape[0])
+
+ def normalize(self, feat):
+ """[B, d] raw [z | proprio] -> the trainer's state (z-score with floored sd, then clip)."""
+ x = (feat - self.mu) / self.sd
+ if self.z_clip and self.z_clip > 0:
+ x = x.clamp(-self.z_clip, self.z_clip)
+ return x
+
+ def _images(self, obs_t):
+ ims = []
+ for c in self.cams:
+ im = obs_t[c].float()
+ if im.dim() == 3:
+ im = im[None]
+ if self.img_layout == "rise_t": # RISE's offline relabel: (N,H,W,C)->(N,C,W,H)
+ im = im.transpose(-1, -2)
+ ims.append(im)
+ return ims
+
+ def _proprio(self, obs_t, B):
+ pr = [obs_t[k].float().reshape(B, -1) for k in self.proprio_keys]
+ return torch.cat(pr, -1)
+
+ @torch.no_grad()
+ def forward(self, obs_t):
+ ims = self._images(obs_t)
+ feats = [self.dino(im) for im in ims] # each [B, 768]
+ B = feats[0].shape[0]
+ x = torch.cat(feats + [self._proprio(obs_t, B)], -1)
+ if x.shape[1] != self.d:
+ raise RuntimeError(f"pooled state is {x.shape[1]}-d but feat_stats has {self.d} dims")
+ return self.normalize(x)
+
+ @torch.no_grad()
+ def raw_features(self, obs_t):
+ """Un-normalised [z(1536) | proprio(9)] -- what the cache stores (z as fp16)."""
+ ims = self._images(obs_t)
+ feats = [self.dino(im) for im in ims]
+ B = feats[0].shape[0]
+ return torch.cat(feats + [self._proprio(obs_t, B)], -1)
+
+ @torch.no_grad()
+ def tokens(self, obs_t):
+ """[B,514,384] raw (un-normalised) DINO tokens in the cache's token order, plus the pooled state."""
+ ims = self._images(obs_t)
+ toks, pooled = [], []
+ for im in ims:
+ f = self.dino.backbone_model.forward_features(self.dino.transform(im))
+ cls, pt = f["x_norm_clstoken"], f["x_norm_patchtokens"]
+ toks.append(torch.cat([cls[:, None], pt], 1))
+ pooled.append(torch.cat([cls, gem_pool(pt)], -1))
+ B = toks[0].shape[0]
+ tok = torch.cat(toks, 1)
+ x = torch.cat(pooled + [self._proprio(obs_t, B)], -1)
+ return tok, self.normalize(x)
+
+
+# --------------------------------------------------------------------------- #
+# hop head (Stage 2, bc_arm.py policy_r1.pt)
+# --------------------------------------------------------------------------- #
+class HopPolicy(nn.Module):
+ """Wraps a bc_arm.py policy so q_fold / q_recursive can call sample_eps(z, task, eps) on the
+ z-scored state. bc_arm's `--policy-features raw --feat-scale center` rescales the input by
+ sd / mean(sd) over the visual block (RawFeat); `zscore` is the identity."""
+
+ def __init__(self, pol, scale):
+ super().__init__()
+ self.pol = pol
+ self.d_act = int(pol.d_act) if hasattr(pol, "d_act") else int(pol.mu.out_features)
+ self.register_buffer("scale", torch.as_tensor(scale, dtype=torch.float32))
+
+ def sample_eps(self, z, task, eps):
+ z = z * self.scale
+ if hasattr(self.pol, "sample_eps"): # BCHead, ConcatFlowPolicy
+ return self.pol.sample_eps(z, task, eps)
+ # FlowPolicy: its Euler loop started from the supplied noise (CRN)
+ a = eps
+ steps = int(getattr(self.pol, "steps", 8))
+ for s in range(steps):
+ k = torch.full((z.shape[0],), 1.0 - s / steps, device=z.device)
+ a = a + self.pol.velocity(z, task, a, k) / steps
+ return a
+
+ def sample(self, z, task):
+ return self.pol.sample(z * self.scale, task)
+
+
+def load_hop_head(path, d_z, n_task, device, feat_sd=None):
+ model, _, _ = _rsm_modules()
+ ck = torch.load(path, map_location=device, weights_only=False)
+ c = ck["config"]
+ sd_ = ck["pol"]
+ fam = c.get("policy_family", "concat")
+ if c.get("policy_features", "raw") != "raw":
+ raise RuntimeError("hop head must read raw (z-scored) features; got policy_features="
+ f"{c.get('policy_features')}")
+ if fam == "gauss":
+ d_act = sd_["mu.weight"].shape[0]
+ pol = model.BCHead(d_z, d_act, n_task)
+ elif fam == "flow":
+ d_act = sd_["out.weight"].shape[0]
+ pol = model.FlowPolicy(d_z, d_act, n_task)
+ else:
+ last = max(int(k.split(".")[1]) for k in sd_ if k.startswith("net.") and k.endswith(".weight"))
+ d_act = sd_[f"net.{last}.weight"].shape[0]
+ pol = model.ConcatFlowPolicy(d_z, d_act, n_task, width=int(c.get("pol_width", 1024) or 1024),
+ depth=int(c.get("pol_depth", 4) or 4))
+ pol.load_state_dict(sd_)
+ pol = pol.to(device).eval()
+ for p in pol.parameters():
+ p.requires_grad_(False)
+ scale = np.ones(d_z, np.float32)
+ if c.get("feat_scale", "zscore") == "center":
+ if feat_sd is None:
+ raise RuntimeError("hop head trained with --feat-scale center needs feat_stats sd")
+ n_z = d_z - 9
+ scale[:n_z] = feat_sd[:n_z] / max(float(feat_sd[:n_z].mean()), 1e-6)
+ return HopPolicy(pol, scale).to(device), int(c.get("chunk", 8))
+
+
+def _particle_quantile(qp, p):
+ """p-quantile over the particle axis of a [B, n] per-particle score matrix (the conformal read-out's
+ lower confidence bound). torch.quantile caps its input at 2**24 elements, so it is applied row-blockwise."""
+ qp = qp.float()
+ p = float(p)
+ if not 0.0 < p < 1.0:
+ raise ValueError(f"plan_lcb_quantile must be in (0, 1), got {p}")
+ n = qp.shape[1]
+ if n < 2:
+ return qp[:, 0].clone()
+ rows = max(1, (2 ** 24) // n)
+ if rows >= qp.shape[0]:
+ return torch.quantile(qp, p, dim=1)
+ return torch.cat([torch.quantile(qp[i:i + rows], p, dim=1) for i in range(0, qp.shape[0], rows)], 0)
+
+
+# --------------------------------------------------------------------------- #
+# MLP read-out with the raw logit (is_ope.q_fold re-implemented; is_ope.py belongs to another stream)
+# --------------------------------------------------------------------------- #
+@torch.no_grad()
+def _q_fold_logit(enc_z, a_chunk, task, *, rew, flow, rms, pol, beta, gamma, depth=1, n_particles=16,
+ flow_steps=8, temperature=1.0, max_rows=MAX_ROWS, return_particles=False,
+ return_problog=False, return_trace=False, openloop=False,
+ sample_clip=0.0):
+ """is_ope.q_fold (crn=True) with the reward head's RAW logit collected at the read-out states.
+
+ Returns (q_mean [B], logit_mean [B]): q_mean = the product fold Q_k = c_k + (1 - c_k) γ^h Q_{k+1} with
+ c_k = σ(R(z_k) / T), Monte-Carlo mean over particles (== q_fold's first output when T = 1); logit_mean =
+ mean over particles of R(z_L) at the LAST hop (the DWM read-out's q_logit convention; at depth 1 it is the
+ logit of the d1 read-out). CRN exactly as q_fold: the noise for hop k (x0 [n, D]) and the hop-head noise
+ (eps [n, d_act]) are drawn from the current torch stream in q_fold's order and tiled over the candidates
+ (row b*n + i = candidate b, particle i). All of it is drawn ONCE up front, then the B*n rows are processed
+ in slices of at most `max_rows` rows (whole candidates; particles are sliced too when one candidate alone
+ exceeds max_rows), so the estimate does not depend on the slicing.
+
+ return_particles=True appends the per-particle fold values q [B, n] (whose mean over dim 1 is q_mean); the
+ conformal read-out ranks by a low quantile of that row instead of its mean.
+
+ return_trace=True appends a VISUALISATION-ONLY dict of the intermediate quantities the fold already
+ computes and throws away (gen_q#270, the successor-stitching figure): per hop k in 0..depth-1 the
+ successor SAMPLES z_k [depth, B, n, D] (fp16), the raw reward logits lg [depth, B, n], the membership
+ c_k = sigmoid(lg/T) [depth, B, n], the hop-head action chunk that PRODUCED each z_k [depth, B, n, d_act]
+ (fp16; hop 0's is the candidate itself), and the backward fold's partial values q_k [depth+1, B, n] with
+ q_k[depth] = 0 and q_k[0] == the per-particle q that q_mean averages. It draws NOTHING extra from the
+ RNG and writes into preallocated buffers after each existing computation, so q_mean / logit_mean /
+ prob_log are bit-identical with the flag on and off (tests/test_rsm_trace.py asserts exactly that).
+
+ return_problog=True appends the `prob_log` ranking array [B] (higher is better): the SAME quantity as
+ q_mean, computed in the log-complement domain so it does not collapse when σ saturates. Derivation
+ (gen_q#266) -- with G = γ^h, q_L = 0 and q_k = c_k + (1 - c_k) G q_{k+1}:
+
+ 1 - q_k = (1 - c_k) (1 - G q_{k+1}) (exact)
+ u_k := log(1 - q_k) = logσ(-lg_k / T) + log1p(G expm1(u_{k+1})), u_L = 0 (*)
+
+ using 1 - G q_{k+1} = 1 - G(1 - e^{u_{k+1}}) = 1 + G expm1(u_{k+1}), so the recursion is closed in the
+ log domain and never reads the float32 q (which is a DENORMAL in a hopeless state and corrupted the
+ ranking at depth >= 2 when it was used; see the comment in the loop).
+
+ NOTE this is a one-step RECURSION, not a sum over hops. The issue's summed form
+ `u_0 = Σ_k [log(1-c_k) + log(1 - G q_{k+1})]` double-counts, because log(1 - G q_{k+1}) is not
+ log(1 - q_{k+1}) unless G = 1, so each term is short a -log(1 - q_{k+1}). Counterexample: L = 2,
+ c = (0.5, 0.5), G = 0.5 -> q_0 = 0.625, u_0 = -0.98083, while the sum gives -1.67398 (1 - q_0 = 0.1875
+ instead of 0.375). (*) is what is implemented, and the test asserts it against a float64 loop.
+
+ Both terms of (*) are well conditioned where the probability form is not: logσ(-lg/T) returns about -121
+ for lg/T = 121 instead of log(0) = -inf, and q_{k+1} in [0, 1] with G < 1 gives 1 - G q_{k+1} >= 1 - G
+ (0.182 at beta=0.95, gamma=0.99), so reusing the fold's own float q_{k+1} there costs only a relative
+ O(eps) error. The per-particle mean is taken in the SAME domain, so the order is exactly the order of
+ the infinite-precision q_mean: since mean_i q_i = 1 - mean_i (1 - q_i), ranking by mean_i q_i descending
+ is ranking by log(mean_i exp(u_i)) ascending, and the array returned is its negation. That mean is
+ taken as m + log1p(mean_i expm1(u_i - m)) with m = max_i u_i, NOT as logsumexp_i(u_i) - log n; see the
+ comment at the return for why the logsumexp form collapses in the hopeless regime."""
+ _, train_rsm, _ = _rsm_modules()
+ sample_future = train_rsm.sample_future
+ dev = enc_z.device
+ B, D = enc_z.shape
+ n, depth = int(n_particles), int(depth)
+ if depth >= 2 and pol is None:
+ raise RuntimeError(f"fold at depth {depth} needs a hop head (rsm_hop_ckpt)")
+ beta, gamma = float(beta), float(gamma)
+ h = 1.0 / (1.0 - beta)
+ T = float(temperature) if temperature else 1.0
+ x0s, epss = [], []
+ for k in range(depth): # same draw order as q_fold(crn=True)
+ x0s.append(torch.randn(n, D, device=dev))
+ if k < depth - 1:
+ epss.append(torch.randn(n, int(pol.d_act), device=dev))
+ max_rows = max(int(max_rows), 1)
+ cand_per = max(1, max_rows // n)
+ part_per = n if n <= max_rows else max_rows
+ q_out = torch.empty(B, n, device=dev, dtype=torch.float32)
+ lg_out = torch.empty(B, n, device=dev, dtype=torch.float32)
+ # log(1 - q) per particle, accumulated in float64: the saturated values sit near -121 * depth, where
+ # float32's absolute resolution (1e-5 at that magnitude) is still far below the O(0.1) logit gaps we
+ # need to order, but float64 costs one [B, n] buffer and removes the question.
+ lq_out = torch.empty(B, n, device=dev, dtype=torch.float64) if return_problog else None
+ # visualisation-only buffers (gen_q#270); None unless return_trace
+ tr = None
+ if return_trace:
+ tr = {"z": torch.empty(depth, B, n, D, device=dev, dtype=torch.float16),
+ "a": torch.empty(depth, B, n, a_chunk.shape[1], device=dev, dtype=torch.float16),
+ "lg": torch.empty(depth, B, n, device=dev, dtype=torch.float32),
+ "c": torch.empty(depth, B, n, device=dev, dtype=torch.float32),
+ "q": torch.zeros(depth + 1, B, n, device=dev, dtype=torch.float32)}
+ G = gamma ** h
+ # G capped strictly below 1 for the log-domain fold only: at G == 1 (gamma == 1) the term
+ # log1p(G * expm1(u)) would be log(0) = -inf for a fully saturated hop. q_out's fold keeps the
+ # uncapped G, so `prob` and `logit` stay bit-identical.
+ G_l = min(G, 1.0 - 1e-12)
+ for b0 in range(0, B, cand_per):
+ b1 = min(B, b0 + cand_per); nb = b1 - b0
+ for p0 in range(0, n, part_per):
+ p1 = min(n, p0 + part_per); npp = p1 - p0
+ z = enc_z[b0:b1].repeat_interleave(npp, 0)
+ a = a_chunk[b0:b1].repeat_interleave(npp, 0)
+ tk = task[b0:b1].repeat_interleave(npp, 0)
+ bq = torch.full((z.shape[0],), beta, device=dev)
+ cs, lcs, lg = [], [], None
+ for k in range(depth):
+ x0 = x0s[k][p0:p1].repeat(nb, 1)
+ if tr is not None:
+ tr["a"][k, b0:b1, p0:p1] = a.detach().view(nb, npp, -1).half()
+ z = sample_future(flow, z, a, tk, bq, rms, flow_steps, n=1, x0=x0)
+ # gen_q#271. The label's own rollout (stitch_decompose.py) clamps the sampled
+ # latent to the trainer's `sample_clip` after EVERY hop; the fold never has. At
+ # depth 1 that is invisible (R is read at the sampled z either way, and the
+ # clamp only ever binds on the tail), but at depth >= 2 an unclamped z is fed
+ # back into the flow and the two rollouts drift apart. Default 0.0 == off ==
+ # the historic fold, so every archived cell is bit-identical.
+ if sample_clip > 0:
+ z = z.clamp(-sample_clip, sample_clip)
+ lg = rew(z, tk).float()
+ cs.append(torch.sigmoid(lg / T))
+ if tr is not None:
+ tr["z"][k, b0:b1, p0:p1] = z.detach().view(nb, npp, -1).half()
+ tr["lg"][k, b0:b1, p0:p1] = lg.detach().view(nb, npp)
+ tr["c"][k, b0:b1, p0:p1] = cs[-1].detach().view(nb, npp)
+ if return_problog:
+ # log(1 - c_k) = log σ(-lg_k / T), exact for large positive logits
+ lcs.append(nn.functional.logsigmoid(-(lg.double() / T)))
+ if k == depth - 1:
+ break
+ # gen_q#271. CLOSED LOOP (default, unchanged): the action for the next hop is
+ # RE-SAMPLED from the hop head, so Q estimates "apply this candidate once, then
+ # follow the hop policy". OPEN LOOP (openloop=True): the candidate action chunk
+ # is REPEATED at every hop, which is the generating process of the stitching
+ # diagnostic's own GOAL/FAIL label (stitch_decompose.py never reassigns `act`
+ # inside its hop loop). The eps draws above are kept either way, so the flow
+ # noise x0s is bit-identical between the two settings and the only thing that
+ # differs is which action is applied.
+ if not openloop:
+ a = pol.sample_eps(z, tk, epss[k][p0:p1].repeat(nb, 1))
+ q = torch.zeros_like(cs[-1])
+ lq = None if not return_problog else torch.zeros_like(lcs[-1]) # u_L = log(1 - q_L) = 0
+ for k in range(depth - 1, -1, -1): # backward fold
+ c = cs[k]
+ if return_problog:
+ # u_k = log(1 - c_k) + log(1 - G q_{k+1}), with the second term written WITHOUT q:
+ # 1 - G q_{k+1} = 1 - G(1 - e^{u_{k+1}}) = 1 + G expm1(u_{k+1}).
+ # Using the fold's own float32 q_{k+1} here was wrong at the bottom of the range and a
+ # 90-digit reference caught it: in a hopeless state c_k = sigmoid(-100) = 3.7e-44 is a
+ # float32 DENORMAL with 2-3 bits of mantissa, and log1p(-G q) is then the same
+ # magnitude as log(1 - c_k) itself, so the quantisation corrupted the ranking at every
+ # depth >= 2 (depth 1 was unaffected, which is why the preflight cell looked fine).
+ # This form is closed in float64: expm1 is exact for tiny u, log1p for tiny arguments,
+ # and the saturated end is unchanged (u -> -inf gives log1p(-G) = log(1 - G)).
+ lq = lcs[k] + torch.log1p(G_l * torch.expm1(lq))
+ q = c + (1.0 - c) * G * q
+ if tr is not None:
+ tr["q"][k, b0:b1, p0:p1] = q.detach().view(nb, npp)
+ q_out[b0:b1, p0:p1] = torch.nan_to_num(q, nan=0.0).clamp(0.0, 1.0).view(nb, npp)
+ lg_out[b0:b1, p0:p1] = torch.nan_to_num(lg, nan=0.0).view(nb, npp)
+ if return_problog:
+ # nan -> 0.0 is the SAME fallback as q's (q = 0 <-> log(1 - q) = 0), and clamp_max(0)
+ # mirrors q.clamp(0, 1)'s upper end (q >= 0 <-> u <= 0).
+ lq_out[b0:b1, p0:p1] = torch.nan_to_num(lq, nan=0.0).clamp(max=0.0).view(nb, npp)
+ out = [q_out.mean(1), lg_out.mean(1)]
+ if return_particles:
+ out.append(q_out)
+ if return_problog:
+ # rank = -log(mean_i (1 - q_i)) = -log(mean_i exp(u_i)): monotone in the exact q_mean, higher better.
+ #
+ # NOT `logsumexp_i(u_i) - log n`. That form is algebraically right and numerically WRONG at the
+ # bottom of the range, and it cost a preflight to find out. In a hopeless state every reward logit
+ # is about -100, so u_i = logsigmoid(-lg_i/T) is about -3.7e-44: distinct per candidate and
+ # perfectly representable, but `logsumexp` returns m + log(sum exp(u - m)) = m + log n, and adding
+ # -3.7e-44 to log 16 = 2.7726 loses it completely. Subtracting log n then gives EXACTLY -0.0 for
+ # all 128 candidates -- measured: 1 distinct value out of 128, i.e. a total collapse, and strictly
+ # WORSE than `prob` itself (24-95 distinct there). It is the same failure as `prob`'s, mirrored to
+ # the other end of the range.
+ #
+ # So the mean is taken as m + log1p(mean_i expm1(u_i - m)), m = max_i u_i: exactly the same
+ # quantity, but every step is conditioned for small arguments. expm1 is exact for tiny u_i - m
+ # (where `exp` would return 1.0 and drop the difference), log1p is exact for tiny means, and log n
+ # never appears, so nothing is added to an O(1) constant and cancelled back out. Behaviour at the
+ # saturated-high end is unchanged: there u_i - m spans O(10) and every term is O(1).
+ m = lq_out.max(dim=1, keepdim=True).values # <= 0
+ rel = torch.expm1(lq_out - m).mean(dim=1) # in (-1, 0]
+ out.append(-(m[:, 0] + torch.log1p(rel.clamp(min=-1.0 + 1e-300))))
+ if return_trace:
+ out.append(tr)
+ return tuple(out)
+
+
+# --------------------------------------------------------------------------- #
+# coin-terminated beta chain (gen_q#267; the reference read-out)
+# --------------------------------------------------------------------------- #
+# Reference: ogbench_genq/rsm.py (worktree agent-a0467d92d2631bf34)
+# rsm.py:113 rec_p = (GAMMA - rec_beta) / (GAMMA * (1 - rec_beta))
+# rsm.py:76 REC_MAX_DEPTH = 10 # "P(depth > 10) ~ 1e-3 at beta = 0.98"
+# rsm.py:532 chain_prob(): each level, ALIVE rows flip the coin at rec_p, sample ONE beta-horizon
+# midpoint and re-decide the action there; dead rows freeze. After the scan, ONE goal
+# read at each row's frozen node. Expectation form -- no max, no per-hop accumulation.
+#
+# WHY THIS COIN AND NOT gamma**h. A single beta-occupancy draw lands at a frame offset ~ Geom(1-beta)
+# (PGF G(z) = (1-beta)/(1-beta z)). The walk composes M = N+1 of them with N ~ Geom(1-p)
+# (PGF H(u) = u(1-p)/(1-p u)). Then
+# H(G(z)) = (1-beta)(1-p) / (1 - p(1-beta) - beta z),
+# a geometric with ratio beta / (1 - p(1-beta)). Demanding that ratio == gamma gives
+# p = (gamma - beta) / (gamma (1 - beta)) [rsm.py:113]
+# and the normaliser then collapses to exactly (1-gamma). So the composed frame offset is EXACTLY
+# Geom(1-gamma): "sampling at beta" reproduces "sampling at gamma" in distribution, not approximately.
+# gamma**h with h = 1/(1-beta) is a DIFFERENT number (0.6050 vs 0.5051 at beta=0.98, gamma=0.99) and does
+# not satisfy the identity; it also fails the reference's own sanity comment, since 0.6050**10 = 7.0e-3
+# while 0.5051**10 = 1.08e-3 -- the "~1e-3" the reference documents.
+#
+# HOW IT DIFFERS FROM `_q_fold_logit` (the defect this fixes). The fold computes the ABSORBING hitting
+# probability q_k = c_k + (1-c_k) gamma**h q_{k+1}, i.e. "did membership fire anywhere inside a
+# gamma**h-geometric window". The chain computes the DISCOUNTED OCCUPANCY read
+# Q_gamma = E[ c at a Geom(1-gamma) offset ]. These are different functionals: for constant c the fold
+# returns c / (1 - gamma**h (1-c)) and the chain returns c -- a factor ~1/(1-gamma**h) apart (5.5x at
+# beta=0.95). They are NOT expected to agree, and the chain is not verified against the fold; it is
+# verified against its own exact Rao-Blackwellised form (`chain_rb` below), which is a true identity.
+
+def chain_continuation_p(beta, gamma):
+ """The reference's coin (rsm.py:113). Requires beta <= gamma; at beta == gamma the chain degenerates
+ to a single read (p = 0), which is correct -- one beta-draw already has the gamma horizon."""
+ beta, gamma = float(beta), float(gamma)
+ if not (0.0 <= beta <= gamma < 1.0):
+ raise ValueError(f"coin chain needs 0 <= beta <= gamma < 1, got beta={beta}, gamma={gamma}")
+ return (gamma - beta) / (gamma * (1.0 - beta))
+
+
+def chain_cap(beta, gamma, tail_eps=CHAIN_TAIL_EPS):
+ """Smallest L with P(N > L) = p**L <= tail_eps. The cap is a TRUNCATION GUARD, not a tuning knob:
+ the reference's 10 is exactly this rule at beta=0.98 with tail ~1e-3. Never hard-code it."""
+ p = chain_continuation_p(beta, gamma)
+ if p <= 0.0:
+ return 0
+ return int(math.ceil(math.log(float(tail_eps)) / math.log(p)))
+
+
+# alias: RSMScorer has an ATTRIBUTE named chain_cap (the override), so the function needs a
+# non-colliding name at the call site inside the class.
+chain_cap_fn = chain_cap
+
+
+def _q_chain_logit(enc_z, a_chunk, task, *, rew, flow, rms, pol, beta, gamma, cap=None,
+ n_particles=16, flow_steps=8, temperature=1.0, max_rows=MAX_ROWS,
+ tail_eps=CHAIN_TAIL_EPS, rb=False, return_particles=False, seed=None, return_trace=False):
+ """Coin-terminated beta chain, the rsm.py read-out. Returns (q_mean [B], lg_mean [B],
+ [q_particles [B,n] if return_particles], stats dict).
+
+ Per particle: walk N hops, each gated by an independent Bernoulli(p) coin; at a hop, sample ONE
+ beta-horizon successor with the trained flow and let the hop head re-decide the action there (the
+ reference's `occ_bits` + actor re-decide). When the coin fails -- or the cap binds -- the row freezes
+ and takes ONE more beta-occupancy draw as its goal read, exactly as rsm.py takes one `gl` at the frozen
+ node. The estimate is the mean over particles of the membership at that read. N+1 beta-draws compose
+ to a Geom(1-gamma) frame offset (see the module comment).
+
+ Dead rows are PRUNED from the network call, so the expected cost is 1/(1-p) levels of work per row
+ rather than `cap` levels -- the chain is cheaper than a deterministic depth-L fold whenever
+ 1/(1-p) < L. CRN: the flow noise for level k and the hop-head noise for level k are drawn ONCE per
+ particle index and shared across candidates, exactly as `_q_fold_logit` does, so candidate comparisons
+ stay paired. The coins are likewise shared across candidates per (particle, level), so every candidate
+ is scored on the SAME set of walk lengths -- otherwise the coin noise alone would reorder candidates.
+
+ rb=True replaces the coin with its exact conditional expectation (Rao-Blackwell): the full depth-(cap+1)
+ trajectory is run and read k is weighted by the coin's own law, w_k = (1-p) p**k for k < cap and
+ p**cap for k == cap. E[chain] == chain_rb exactly, so chain_rb is the analytic target the sampled
+ chain is verified against. It costs `cap+1` levels (no pruning), so it is a TEST path, not the
+ read-out."""
+ _, train_rsm, _ = _rsm_modules() # same lazy import as _q_fold_logit (rsm_libero is not a package)
+ sample_future = train_rsm.sample_future
+ dev = enc_z.device
+ B, D = enc_z.shape
+ n = int(n_particles)
+ beta, gamma = float(beta), float(gamma)
+ p_cont = chain_continuation_p(beta, gamma)
+ # gen_q#270 VISUALISATION ONLY. The sampled chain prunes frozen rows, so there is no full-depth
+ # tensor to hand back -- which is why tracing was refused here. When return_trace is on we keep a
+ # per-level copy of every row's latent and read the reward classifier at EVERY level, purely for
+ # colour-coding. The value still uses ONE read at the frozen node; nothing below changes q_out.
+ tr_z, tr_c, tr_alive = ([], [], []) if return_trace else (None, None, None)
+ L = int(chain_cap(beta, gamma, tail_eps) if cap is None else cap)
+ if L >= 1 and pol is None:
+ raise RuntimeError(f"coin chain at cap {L} needs a hop head (rsm_hop_ckpt)")
+ T = float(temperature) if temperature else 1.0
+ g = None
+ if seed is not None: # reproducible coins/noise without touching global RNG
+ g = torch.Generator(device=dev); g.manual_seed(int(seed))
+ rnd = lambda *s: torch.randn(*s, device=dev, generator=g)
+ # CRN draws, per particle index, shared across candidates -- same contract as _q_fold_logit
+ x0s = [rnd(n, D) for _ in range(L + 1)] # flow noise per level
+ epss = [rnd(n, int(pol.d_act)) for _ in range(L)] if L >= 1 else [] # hop-head noise per level
+ coins = torch.rand(L, n, device=dev, generator=g) if L >= 1 else None # the coin, per (level, particle)
+
+ max_rows = max(int(max_rows), 1)
+ cand_per = max(1, max_rows // n)
+ part_per = n if n <= max_rows else max_rows
+ q_out = torch.empty(B, n, device=dev, dtype=torch.float32)
+ lg_out = torch.empty(B, n, device=dev, dtype=torch.float32)
+ hops_out = torch.zeros(B, n, device=dev, dtype=torch.int32)
+ capped_out = torch.zeros(B, n, device=dev, dtype=torch.bool)
+ levels_run = 0 # measured network levels, for the cost claim
+
+ for b0 in range(0, B, cand_per):
+ b1 = min(B, b0 + cand_per); nb = b1 - b0
+ for p0 in range(0, n, part_per):
+ p1 = min(n, p0 + part_per); npp = p1 - p0
+ R = nb * npp
+ z = enc_z[b0:b1].repeat_interleave(npp, 0)
+ a = a_chunk[b0:b1].repeat_interleave(npp, 0)
+ tk = task[b0:b1].repeat_interleave(npp, 0)
+ bq = torch.full((R,), beta, device=dev)
+ # particle index of each row, so the per-particle CRN draws line up after pruning
+ pid = torch.arange(p0, p1, device=dev).repeat(nb)
+
+ if rb:
+ # ---- analytic path: full trajectory, coin replaced by its law -----------------
+ w = torch.tensor([(1.0 - p_cont) * p_cont ** k for k in range(L)] + [p_cont ** L],
+ device=dev, dtype=torch.float64)
+ q = torch.zeros(R, device=dev, dtype=torch.float64)
+ lg = None
+ for k in range(L + 1):
+ z = sample_future(flow, z, a, tk, bq, rms, flow_steps, n=1, x0=x0s[k][pid])
+ lg = rew(z, tk).float()
+ q = q + w[k] * torch.sigmoid(lg / T).double()
+ levels_run += R
+ if k < L:
+ a = pol.sample_eps(z, tk, epss[k][pid])
+ q_out[b0:b1, p0:p1] = torch.nan_to_num(q.float(), nan=0.0).clamp(0.0, 1.0).view(nb, npp)
+ lg_out[b0:b1, p0:p1] = torch.nan_to_num(lg, nan=0.0).view(nb, npp)
+ hops_out[b0:b1, p0:p1] = L
+ continue
+
+ # ---- sampled path: coin-terminated walk with row pruning -------------------------
+ alive = torch.ones(R, dtype=torch.bool, device=dev)
+ hops = torch.zeros(R, dtype=torch.int32, device=dev)
+ for k in range(L):
+ cont = alive & (coins[k][pid] < p_cont)
+ idx = cont.nonzero(as_tuple=True)[0]
+ alive = cont
+ if idx.numel() == 0:
+ break
+ sub = pid[idx]
+ z_new = sample_future(flow, z[idx], a[idx], tk[idx], bq[idx], rms, flow_steps,
+ n=1, x0=x0s[k][sub])
+ a_new = pol.sample_eps(z_new, tk[idx], epss[k][sub])
+ z = z.index_copy(0, idx, z_new)
+ a = a.index_copy(0, idx, a_new)
+ hops = hops.index_add(0, idx, torch.ones_like(idx, dtype=torch.int32))
+ levels_run += idx.numel()
+ if return_trace:
+ tr_z.append(z.detach().to(torch.float16).cpu())
+ tr_c.append(torch.sigmoid(rew(z, tk).float() / T).detach().cpu())
+ tr_alive.append(alive.detach().cpu())
+ # ONE goal read at each row's frozen node (rsm.py:559-561), for EVERY row
+ z = sample_future(flow, z, a, tk, bq, rms, flow_steps, n=1, x0=x0s[L][pid])
+ lg = rew(z, tk).float()
+ levels_run += R
+ if return_trace:
+ tr_z.append(z.detach().to(torch.float16).cpu())
+ tr_c.append(torch.sigmoid(lg / T).detach().cpu())
+ tr_alive.append(torch.zeros_like(alive).cpu()) # terminal level: nothing continues
+ # same NaN fallback and clamp as _q_fold_logit's q_out, so the two read-outs degrade
+ # identically on a pathological state instead of one of them emitting NaN into the ranking
+ q_out[b0:b1, p0:p1] = torch.nan_to_num(torch.sigmoid(lg / T),
+ nan=0.0).clamp(0.0, 1.0).view(nb, npp)
+ lg_out[b0:b1, p0:p1] = torch.nan_to_num(lg, nan=0.0).view(nb, npp)
+ hops_out[b0:b1, p0:p1] = hops.view(nb, npp)
+ capped_out[b0:b1, p0:p1] = alive.view(nb, npp) # still alive after L levels == capped
+
+ hf = hops_out.float()
+ capped_frac = float(capped_out.float().mean())
+ exp_hops = hf[~capped_out].mean() if (~capped_out).any() else torch.tensor(float("nan"))
+ if return_trace:
+ # [levels, R] / [levels, R, D] with R = B*n rows in (candidate, particle) order. hops_out gives
+ # each row's stop level, so a reader can slice each chain at its OWN length -- that ragged
+ # structure IS the figure: chains stagger, and rows sharing a particle index stop together
+ # because the coin is drawn per (level, particle) and shared across candidates.
+ import numpy as _np
+ _tr = {
+ "z": _np.stack([t.numpy() for t in tr_z]) if tr_z else None,
+ "c": _np.stack([t.numpy() for t in tr_c]) if tr_c else None,
+ "alive": _np.stack([t.numpy() for t in tr_alive]) if tr_alive else None,
+ "hops": hops_out.cpu().numpy(), # [B, n] stop level per (candidate, particle)
+ "capped": capped_out.cpu().numpy(),
+ "p_cont": float(p_cont), "cap": int(L), "beta": float(beta), "gamma": float(gamma),
+ "note": "value uses ONE read at the frozen node; c at earlier levels is colour only",
+ }
+ stats = {
+ "mode": "chain_rb" if rb else "chain",
+ "beta": beta, "gamma": gamma, "p_cont": p_cont, "cap": L, "tail_eps": float(tail_eps),
+ "tail_prob_at_cap": p_cont ** L, "n_particles": n,
+ # reference values the measurement must reproduce
+ "E_hops_expected": p_cont / (1.0 - p_cont) if p_cont < 1.0 else float("inf"),
+ "E_beta_reads_expected": 1.0 / (1.0 - p_cont) if p_cont < 1.0 else float("inf"),
+ "L_star_tab_discounts": (1.0 - beta) / (1.0 - gamma),
+ "frame_offset_mean_expected": gamma / (1.0 - gamma),
+ # measured
+ "hops_mean": float(hf.mean()), "hops_median": float(hf.median()),
+ "hops_p90": float(hf.flatten().quantile(0.90)),
+ "hops_mean_expired": float(exp_hops),
+ "capped_frac": capped_frac,
+ # the reference chain has NO absorbing event: membership is READ once at the frozen node and never
+ # terminates the walk (that is the OLD fold's behaviour). Recorded explicitly so the share is not
+ # mistaken for "not measured".
+ "absorbed_frac": 0.0, "expired_frac": 1.0 - capped_frac,
+ "absorbed_note": "reference chain has no absorbing event; termination is the coin or the cap",
+ "levels_run": int(levels_run), "levels_per_row": levels_run / max(B * n, 1),
+ # chain_rb runs the full cap-length trajectory BY CONSTRUCTION (it replaces the coin with its
+ # law, so there is nothing to terminate); its hops_mean is always the cap and the alarm would be a
+ # guaranteed false positive. The alarm is a property of the SAMPLED chain only.
+ # PER-CALL alarm, and it must NOT use the aggregate 1e-2 rule directly: one decision scores
+ # `n` particles, so its capped fraction is QUANTISED to multiples of 1/n and the smallest
+ # nonzero value at n=16 is 0.0625 > 1e-2. With P(cap) = p^L <= 1e-3 per particle, ~1.4 % of
+ # decisions legitimately cap one particle, so the aggregate rule applied per call fires on a
+ # perfectly healthy cell (~28 times in the first mug cell -- exactly the 1.4 % predicted).
+ # Per call the real signal is TWO or more particles capping, or a mean walk length near the
+ # cap; the cell-level verdict is computed from the pooled fractions in chain_hop_summary().
+ "cap_binding": (False if rb else
+ bool(capped_frac * n >= 2.0 or float(hf.mean()) > 0.9 * max(L, 1))),
+ }
+ if stats["cap_binding"]:
+ sys.stderr.write(
+ f"[CAP ALARM] chain cap is BINDING: beta={beta} gamma={gamma} cap={L} "
+ f"capped_frac={capped_frac:.4f} hops_mean={stats['hops_mean']:.3f} "
+ f"(alarm if capped_frac > 1e-2 or hops_mean > 0.9*cap) -- this cell is TRUNCATED and must not "
+ f"be quoted as a chain number without the flag\n")
+ sys.stderr.flush()
+ out = [q_out.mean(1), lg_out.mean(1)]
+ if return_particles:
+ out.append(q_out)
+ out.append(stats)
+ if return_trace:
+ out.append(_tr) # gen_q#270, LAST element; absent unless the caller asked for it
+ return tuple(out)
+
+# --------------------------------------------------------------------------- #
+# backends
+# --------------------------------------------------------------------------- #
+class MLPBackend:
+ """rsm_libero MLP successor (train_rsm.py). Uses is_ope.load_critic (identity or MLP encoder)."""
+
+ def __init__(self, ckpt, device, d_in=STATE_DIM, hop_ckpt="", feat_sd=None, max_rows=MAX_ROWS):
+ model, train_rsm, is_ope = _rsm_modules()
+ self.is_ope = is_ope
+ self.device = device
+ self.max_rows = int(max_rows)
+ self.temperature = read_calib_temperature(ckpt) or 1.0 # calib.json next to the blob, else 1
+ self.enc, self.rew, self.flow, self.rms, self.cfg = is_ope.load_critic(
+ ckpt, d_in, 1, device, data=None)
+ ck = torch.load(ckpt, map_location="cpu", weights_only=False)
+ self.n_task = max(1, len(ck.get("tasks", ["task"])))
+ self.d_act = int(ck["d_act"])
+ self.q_action_winrate = ck.get("q_action_winrate", None)
+ self.step = ck.get("step", None)
+ self.chunk = int(self.cfg.get("chunk", 8))
+ self.adim = self.d_act // self.chunk
+ self.d_z = int(self.cfg["d_z"])
+ self.hop, self.hop_chunk = None, None
+ if hop_ckpt:
+ self.hop, self.hop_chunk = load_hop_head(hop_ckpt, self.d_z, self.n_task, device, feat_sd=feat_sd)
+ if self.hop.d_act != self.d_act:
+ raise RuntimeError(f"hop head emits {self.hop.d_act}-d chunks, RSM expects {self.d_act}")
+
+ def latent(self, x):
+ return self.enc(x)
+
+ def q(self, z, a, *, mode, depth, beta, gamma, n_particles, flow_steps, return_logit=False,
+ temperature=None, return_lcb=None, return_problog=False, return_trace=False):
+ """Q̄ [B] (return_logit=False, the historic contract) or (Q̄, Q̄_logit) [B] each; with return_lcb=
+ a third array, the p-quantile over particles of the per-particle Q (the conformal read-out), and with
+ return_problog=True a further array, the `prob_log` ranking (QÌ„ itself, computed in the log-complement
+ domain so it does not tie when σ saturates). The returned tuple is
+ (Q̄, Q̄_logit [, LCB if return_lcb] [, prob_log if return_problog]). d1 / fold go through
+ `_q_fold_logit` (== is_ope.q_fold(crn=True) at T=1, plus the raw logit, row-sliced); recursive keeps
+ is_ope.q_recursive and has neither a logit nor a prob_log (it has no per-hop c_k).
+ temperature=None -> the checkpoint's calib.json T (or 1)."""
+ task = torch.zeros(z.shape[0], dtype=torch.long, device=z.device)
+ if mode == "d1":
+ depth = 1
+ if depth >= 2 and self.hop is None:
+ raise RuntimeError(f"read-out {mode} at depth {depth} needs a hop head (rsm_hop_ckpt)")
+ T = self.temperature if temperature is None else float(temperature)
+ if mode in ("chain", "chain_rb"):
+ # coin-terminated beta chain (gen_q#267). ADDITIVE: no existing mode reaches this branch, so
+ # d1/fold/recursive stay bit-identical. `depth` is IGNORED here on purpose -- the chain's only
+ # length parameter is the truncation cap, computed from (beta, gamma) by chain_cap(); a caller
+ # may override it with chain_cap_override for the cap sweep, never to tune success.
+ out = list(_q_chain_logit(z, a, task, rew=self.rew, flow=self.flow, rms=self.rms, pol=self.hop,
+ beta=beta, gamma=gamma,
+ cap=getattr(self, "chain_cap_override", None),
+ n_particles=n_particles, flow_steps=flow_steps, temperature=T,
+ max_rows=self.max_rows,
+ tail_eps=getattr(self, "chain_tail_eps", CHAIN_TAIL_EPS),
+ rb=(mode == "chain_rb"), return_trace=return_trace,
+ return_particles=return_lcb is not None,
+ seed=getattr(self, "chain_seed", None)))
+ q, ql = out.pop(0), out.pop(0)
+ res = [q, ql]
+ if return_lcb is not None:
+ res.append(_particle_quantile(out.pop(0), return_lcb))
+ # hop accounting rides on the instance, so the tuple contract above is untouched
+ self.last_chain_stats = out.pop(0)
+ if return_problog:
+ raise RuntimeError("plan_score=prob_log is a fold-only ranking (it folds per-hop c_k in the "
+ "log-complement domain); the chain reads membership ONCE at the frozen "
+ "node, so use plan_score=prob")
+ # gen_q#270: the chain now traces. _q_chain_logit appends the trace dict after the stats,
+ # so it is the last element; the caller gets ragged chains plus each row's stop level and
+ # slices at the true length. The returned q/ql are untouched.
+ if return_trace:
+ res.append(out.pop(0) if out else None)
+ if len(res) > 2:
+ return tuple(res)
+ return (q, ql) if return_logit else q
+ if mode in ("d1", "fold"):
+ out = list(_q_fold_logit(z, a, task, rew=self.rew, flow=self.flow, rms=self.rms, pol=self.hop,
+ beta=beta, gamma=gamma, depth=depth, n_particles=n_particles,
+ flow_steps=flow_steps, temperature=T, max_rows=self.max_rows,
+ return_particles=return_lcb is not None,
+ return_problog=bool(return_problog),
+ return_trace=bool(return_trace),
+ openloop=bool(getattr(self, "fold_openloop", False)),
+ sample_clip=float(getattr(self, "fold_sample_clip", 0.0))))
+ q, ql = out.pop(0), out.pop(0)
+ res = [q, ql]
+ if return_lcb is not None:
+ res.append(_particle_quantile(out.pop(0), return_lcb))
+ if return_problog:
+ res.append(out.pop(0))
+ if return_trace: # always LAST, so no existing position moves (gen_q#270)
+ res.append(out.pop(0))
+ if len(res) > 2:
+ return tuple(res)
+ return (q, ql) if return_logit else q
+ if mode == "recursive":
+ q, _ess = self.is_ope.q_recursive(z, a, task, rew=self.rew, flow=self.flow, rms=self.rms,
+ pol=self.hop, wend=None, beta=beta, gamma=gamma, depth=depth,
+ n_particles=n_particles, flow_steps=flow_steps,
+ use_is=False, crn=True)
+ q = q * (1.0 - gamma) # back to the success-probability scale
+ if return_lcb is not None:
+ raise RuntimeError("plan_score=conformal_lcb needs the d1 / fold read-out (recursive has no "
+ "per-particle success probability)")
+ if return_problog:
+ raise RuntimeError("plan_score=prob_log needs the d1 / fold read-out (recursive has no "
+ "per-hop reward logits to fold in the log-complement domain)")
+ if return_trace:
+ raise RuntimeError("return_trace needs the d1 / fold read-out (recursive's stochastic stop "
+ "keeps no per-hop c_k to trace)")
+ return (q, None) if return_logit else q
+ raise ValueError(mode)
+
+ def q_fold_reference(self, z, a, *, depth, beta, gamma, n_particles, flow_steps):
+ """is_ope.q_fold itself (crn=True), for tests against `_q_fold_logit`."""
+ task = torch.zeros(z.shape[0], dtype=torch.long, device=z.device)
+ q, _ = self.is_ope.q_fold(z, a, task, rew=self.rew, flow=self.flow, rms=self.rms, pol=self.hop,
+ beta=beta, gamma=gamma, depth=depth, n_particles=n_particles,
+ flow_steps=flow_steps, crn=True)
+ return q
+
+ def hop_sample(self, z, eps):
+ task = torch.zeros(z.shape[0], dtype=torch.long, device=z.device)
+ return self.hop.sample_eps(z, task, eps)
+
+
+class DWMBackend:
+ """Token successor model, stream C's shipped interface (rsm_libero/dwm_readout.py, status/C_dwm.md):
+ crit = load_critic_dwm(path, device); crit.q(x_tokens RAW [B,514,384], a_chunk [B,56], beta,
+ n_particles, crn_seed, depth, mode in {d1, fold}, proprio RAW [B,9],
+ hop_policy(pooled_raw [R,1545], eps [R,d_act]) -> [R,56], gamma, flow_steps) -> QÌ„ [B]
+ The critic normalises tokens/proprio itself (cache//tokens/tok_stats.npz). The hop head runs on the
+ z-scored pooled state, so the callable applies our feat_stats rule (`normalize`) to pooled_raw first.
+ `q()` takes inp = (tokens_raw, proprio_raw). mode "recursive" is not offered by the DWM read-out."""
+
+ def __init__(self, ckpt, device, module="dwm_readout", hop_ckpt="", feat_sd=None, d_in=STATE_DIM,
+ normalize=None):
+ _rsm_modules()
+ try:
+ mod = importlib.import_module(module)
+ except ImportError as e:
+ raise RuntimeError(f"DWM backend needs module '{module}' with load_critic_dwm (stream C): {e}")
+ self.core = mod.load_critic_dwm(ckpt, device=device)
+ self.d_act = int(self.core.d_act)
+ self.chunk = int(self.core.config.get("chunk", 8))
+ self.adim = self.d_act // self.chunk
+ self.d_z = d_in
+ self.normalize = normalize if normalize is not None else (lambda x: x)
+ self.q_action_winrate = getattr(self.core, "q_action_winrate", None)
+ self.step = getattr(self.core, "step", None)
+ self.hop = None
+ if hop_ckpt:
+ self.hop, _ = load_hop_head(hop_ckpt, d_in, 1, device, feat_sd=feat_sd)
+
+ def _hop_callable(self):
+ if self.hop is None:
+ return None
+ hop, norm = self.hop, self.normalize
+
+ class _Hop:
+ d_act = hop.d_act
+
+ def __call__(self, pooled_raw, eps):
+ x = norm(pooled_raw.float())
+ task = torch.zeros(x.shape[0], dtype=torch.long, device=x.device)
+ return hop.sample_eps(x, task, eps)
+ return _Hop()
+
+ @property
+ def temperature(self):
+ return float(getattr(self.core, "temperature", 1.0))
+
+ def q(self, inp, a, *, mode, depth, beta, gamma, n_particles, flow_steps, crn_seed=None,
+ return_logit=False, temperature=None, rescore_top=0, n_particles_rescore=0, return_lcb=None):
+ """Q̄ [B] or (Q̄, Q̄_logit) with return_logit=True; temperature=None -> the critic's own (calib.json);
+ rescore_top=K / n_particles_rescore=M -> dwm_readout's two-stage screening (top-K by q_logit).
+
+ return_lcb= additionally returns the p-quantile over particles of the per-particle Q. dwm_readout
+ returns only the MEAN, so the per-particle values are rebuilt from its `return_hops=True` output (the
+ per-hop c_k [B, n], folded exactly as _q_once does). Those hops belong to the STAGE-1 pass, so the
+ conformal read-out is incompatible with the internal two-stage screening and raises instead of
+ silently ranking rescored candidates by their stage-1 spread."""
+ tok, pr = inp
+ if mode == "recursive":
+ raise RuntimeError("the DWM read-out offers d1 / fold only (rsm_libero/dwm_readout.py)")
+ if mode == "d1":
+ depth = 1
+ if crn_seed is None: # fresh CRN draw per call, shared by all rows
+ crn_seed = int(torch.randint(0, 2 ** 31 - 1, (1,), device="cpu"))
+ kw = {}
+ if temperature is not None:
+ kw["temperature"] = float(temperature)
+ if rescore_top and n_particles_rescore:
+ kw["rescore_top"] = int(rescore_top)
+ kw["n_particles_rescore"] = int(n_particles_rescore)
+ if return_lcb is None:
+ return self.core.q(tok, a, float(beta), n_particles=int(n_particles), crn_seed=int(crn_seed),
+ depth=int(depth), mode=mode, proprio=pr, hop_policy=self._hop_callable(),
+ gamma=float(gamma), flow_steps=int(flow_steps),
+ return_logit=bool(return_logit), **kw)
+ if "rescore_top" in kw:
+ raise RuntimeError("plan_score=conformal_lcb cannot be combined with the DWM two-stage screening "
+ "(plan_rescore_top / plan_particles_rescore): dwm_readout only exposes the "
+ "stage-1 per-particle values")
+ (q, ql), cs = self.core.q(tok, a, float(beta), n_particles=int(n_particles), crn_seed=int(crn_seed),
+ depth=int(depth), mode=mode, proprio=pr, hop_policy=self._hop_callable(),
+ gamma=float(gamma), flow_steps=int(flow_steps), return_logit=True,
+ return_hops=True, **kw)
+ if mode in ("mpc", "mpc_disc"):
+ raise RuntimeError("plan_score=conformal_lcb is not defined for the MPC read-outs: the\n"
+ "per-particle rebuild below is the FOLD recursion, and using it under\n"
+ "mpc would rank candidates by a quantity the cell did not run.")
+ qp = torch.zeros_like(cs[-1]) # per-particle fold, same recursion as dwm_readout
+ if mode == "d1" or len(cs) == 1:
+ qp = cs[0]
+ else:
+ h = 1.0 / (1.0 - float(beta))
+ for c in reversed(cs):
+ qp = c + (1.0 - c) * (float(gamma) ** h) * qp
+ qp = torch.nan_to_num(qp, nan=0.0).clamp(0.0, 1.0)
+ return q, ql, _particle_quantile(qp, return_lcb)
+
+ def hop_sample(self, x, eps):
+ task = torch.zeros(x.shape[0], dtype=torch.long, device=x.device)
+ return self.hop.sample_eps(x, task, eps)
+
+
+class LeWMBackend:
+ """LeWM (gen_q#268): rsm_libero/lewm_readout.py, a JEPA world model with a membership probe.
+
+ crit = load_critic_lewm(path, device)
+ crit.q(inp = (frames [B,6,84,84] uint8-or-float, proprio (ignored)), a_chunk [B,56],
+ depth=L, mode in {d1, fold}, gamma) -> Q [B]
+
+ Its state is PIXELS -- the two RISE cameras stacked as 6 channels -- because LeWM predicts its
+ OWN encoder's embeddings; feeding it frozen DINO features would make it DINO-WM. The scorer
+ therefore hands it the planner's frames and still computes the pooled DINO state alongside, so
+ the hop head and every other consumer are unaffected and DINO still runs once per frame.
+ Deterministic, so there is no particle dimension: it is the cheapest scorer in the table.
+ """
+
+ def __init__(self, ckpt, device, module="lewm_readout", hop_ckpt="", feat_sd=None,
+ d_in=STATE_DIM, normalize=None):
+ _rsm_modules()
+ try:
+ mod = importlib.import_module(module)
+ except ImportError as e:
+ raise RuntimeError(f"LeWM backend needs module '{module}' with load_critic_lewm: {e}")
+ self.core = mod.load_critic_lewm(ckpt, device=device)
+ self.d_act = int(self.core.d_act)
+ self.chunk = int(self.core.chunk)
+ self.adim = self.d_act // self.chunk
+ self.d_z = d_in
+ self.res, self.in_ch = int(self.core.res), int(self.core.in_ch)
+ self.cams = tuple(self.core.cams)
+ self.normalize = normalize if normalize is not None else (lambda x: x)
+ self.q_action_winrate = getattr(self.core, "q_action_winrate", None)
+ self.step = getattr(self.core, "step", None)
+ # HOP HEAD (gen_q#288). It used to be pinned to None on the claim that LeWM "rolls the SAME
+ # candidate chunk", which made every LeWM MPC cell a single deterministic roll-out even though
+ # all 630 of them requested 16 particles. Owner, 2026-09-25: "should definitely be M different
+ # chains for DINOWM and LeWM with stochastic continuations just like RSM." So LeWM now chains
+ # with the SAME hop head DWM/DINO-WM do -- see lewm_readout's deviation 2 for the one thing that
+ # differs (the head is conditioned on the CURRENT observation's pooled DINO state, because a
+ # rolled LeWM embedding has no pooled DINO vector). Without --hop the old zero-order hold at
+ # one particle still runs, byte-identical, so the published M=1 arms stay reproducible.
+ self.hop = None
+ if hop_ckpt:
+ self.hop, _ = load_hop_head(hop_ckpt, d_in, 1, device, feat_sd=feat_sd)
+
+ def _hop_callable(self):
+ """Same object DWMBackend._hop_callable builds -- identical weights, identical z-scoring rule --
+ so "the same continuation actor as RSM" is literally the same code path, not a re-implementation."""
+ if self.hop is None:
+ return None
+ hop, norm = self.hop, self.normalize
+
+ class _Hop:
+ d_act = hop.d_act
+
+ def __call__(self, pooled_raw, eps):
+ x = norm(pooled_raw.float())
+ task = torch.zeros(x.shape[0], dtype=torch.long, device=x.device)
+ return hop.sample_eps(x, task, eps)
+ return _Hop()
+
+ @property
+ def temperature(self):
+ return float(getattr(self.core, "temperature", 1.0))
+
+ def q(self, inp, a, *, mode, depth, beta, gamma, n_particles, flow_steps, crn_seed=None,
+ return_logit=False, temperature=None, rescore_top=0, n_particles_rescore=0,
+ return_lcb=None):
+ return self.core.q(inp, a, beta=beta, n_particles=int(n_particles), crn_seed=crn_seed,
+ depth=depth, mode=mode, gamma=gamma, flow_steps=flow_steps,
+ hop_policy=self._hop_callable(),
+ return_logit=return_logit, temperature=temperature,
+ return_lcb=return_lcb)
+
+ def hop_sample(self, x, eps):
+ if self.hop is None:
+ return self.core.hop_sample(x, eps)
+ task = torch.zeros(x.shape[0], dtype=torch.long, device=x.device)
+ return self.hop.sample_eps(x, task, eps)
+
+
+class DFBackend:
+ """Diffusion Forcing as a VALUE estimator (gen_q#274 / #282): rsm_libero/df_readout.py.
+
+ crit = load_critic_df(path, device)
+ crit.q(inp = pooled state [B, 1545], a_chunk [B, 56], depth=K, mode in {mpc, mpc_disc},
+ gamma, n_particles=M) -> Q [B]
+
+ Its state is the SAME pooled 1545-d DINO state every mlp/RSM scorer reads, so `state_from_obs`
+ needs no branch for it: `df_data.obs_rows` applies literally the same z-score-and-clip that
+ PooledDinoState.forward does. Stochastic, so the particle axis is real (M = n_particles, the
+ analogue of RSM's P) and is NOT forced to 1 the way DINO-WM's is.
+ """
+
+ def __init__(self, ckpt, device, module="df_readout", hop_ckpt="", feat_sd=None,
+ d_in=STATE_DIM):
+ _rsm_modules()
+ try:
+ mod = importlib.import_module(module)
+ except ImportError as e:
+ raise RuntimeError(f"DF backend needs module '{module}' with load_critic_df: {e}")
+ self.core = mod.load_critic_df(ckpt, device=device)
+ self.d_act = int(self.core.d_act)
+ self.chunk = int(self.core.chunk)
+ self.adim = self.d_act // self.chunk
+ self.d_z = d_in
+ # No hop head: the continuation past the candidate chunk is the model's own sampled action
+ # channel, so a policy over DINO states would never be called. None rather than loaded, so
+ # an advantage() call fails loudly instead of silently scoring something else.
+ self.hop = None
+
+ @property
+ def temperature(self):
+ return float(getattr(self.core, "temperature", 1.0))
+
+ def q(self, inp, a, *, mode, depth, beta, gamma, n_particles, flow_steps, crn_seed=None,
+ return_logit=False, temperature=None, rescore_top=0, n_particles_rescore=0,
+ return_lcb=None):
+ return self.core.q(inp, a, beta=beta, n_particles=n_particles, crn_seed=crn_seed,
+ depth=depth, mode=mode, gamma=gamma, flow_steps=flow_steps,
+ return_logit=return_logit, temperature=temperature,
+ return_lcb=return_lcb)
+
+ def hop_sample(self, x, eps):
+ return self.core.hop_sample(x, eps)
+
+
+class MCBackend:
+ """MC return-to-go critic on the pooled state (S3H5). blob: {"net": state_dict,
+ "config": {"d_in": 1545, "d_act": 56, "width": 1024, "depth": 3, "scale": 1.0}}, net = MLP([x|A]) -> R."""
+
+ def __init__(self, ckpt, device, hop_ckpt="", feat_sd=None):
+ ck = torch.load(ckpt, map_location=device, weights_only=False)
+ c = ck["config"]
+ self.d_act, self.chunk = int(c["d_act"]), int(c.get("chunk", 8))
+ self.adim = self.d_act // self.chunk
+ self.d_z = int(c["d_in"])
+ w, dp = int(c.get("width", 1024)), int(c.get("depth", 3))
+ layers, ind = [], self.d_z + self.d_act
+ for i in range(dp):
+ layers += [nn.Linear(ind if i == 0 else w, w), nn.SiLU()]
+ layers += [nn.Linear(w, 1)]
+ self.net = nn.Sequential(*layers).to(device)
+ self.net.load_state_dict(ck["net"])
+ self.net.eval()
+ self.scale = float(c.get("scale", 1.0))
+ self.hop = None
+ if hop_ckpt:
+ self.hop, _ = load_hop_head(hop_ckpt, self.d_z, 1, device, feat_sd=feat_sd)
+
+ def q(self, x, a, return_logit=False, **_):
+ with torch.no_grad():
+ q = self.net(torch.cat([x, a], -1))[:, 0] * self.scale
+ return (q, None) if return_logit else q # a return-to-go has no logit
+
+ def hop_sample(self, x, eps):
+ task = torch.zeros(x.shape[0], dtype=torch.long, device=x.device)
+ return self.hop.sample_eps(x, task, eps)
+
+
+# --------------------------------------------------------------------------- #
+# the scorer
+# --------------------------------------------------------------------------- #
+class RSMScorer:
+ """score(state, A[N,chunk,adim]) -> QÌ„[N]; advantage(state, A[B,...]) -> (QÌ„[B], VÌ„[B], Qm[B,M])."""
+
+ def __init__(self, backend="mlp", ckpt="", hop_ckpt="", feat_stats="", mode="fold", depth=2,
+ beta=0.95, gamma=0.99, n_particles=16, flow_steps=8, device="cpu", state=None,
+ img_layout="chw", cams=CAMS, proprio_keys=PROPRIO_KEYS, dwm_module="dwm_readout",
+ dino=None, score_kind="prob", rescore_top=0, n_particles_rescore=0, temperature=0.0,
+ max_rows=MAX_ROWS, lcb_quantile=0.1, chain_cap=0, chain_tail_eps=CHAIN_TAIL_EPS,
+ chain_seed=None, mpc_horizon=0, fold_openloop=False, fold_sample_clip=0.0):
+ """score_kind: "prob" (mean σ, the historic ranking) | "logit" (mean raw logit, d1/fold only) |
+ "prob_log" (gen_q#266: the SAME quantity as "prob" -- the whole product fold, mean over particles --
+ but folded in the log-complement domain, so it is a strictly monotone transform of prob's
+ infinite-precision value and gives a total order over the candidates where prob ties ~half of them
+ at exactly 1.0; mlp backend, d1/fold only, since it needs the per-hop reward logits) |
+ "conformal_lcb" (the `lcb_quantile` quantile — 0.1 by default — over particles of the per-particle
+ success probability instead of its mean: a pessimistic read-out that prefers candidates whose future
+ is reliably good over candidates with one lucky particle).
+ rescore_top=K, n_particles_rescore=M (both > 0 to enable): two-stage particle screening in score().
+ temperature: 0 -> the checkpoint's calib.json T if present else 1.0; > 0 overrides."""
+ assert mode in _MODES, mode
+ assert score_kind in _SCORE_KINDS, score_kind
+ self.backend_name = backend
+ self.mode, self.depth = mode, int(depth)
+ self.beta, self.gamma = float(beta), float(gamma)
+ self.n_particles, self.flow_steps = int(n_particles), int(flow_steps)
+ self.score_kind = score_kind
+ self.rescore_top = int(rescore_top or 0)
+ self.n_particles_rescore = int(n_particles_rescore or 0)
+ self.temperature = float(temperature or 0.0)
+ self.lcb_quantile = float(lcb_quantile)
+ self.last_q = self.last_q_logit = self.last_q_lcb = self.last_q_problog = None
+ # coin chain (gen_q#267). chain_cap=0 means "compute it from (beta, gamma) and the 1e-3 tail",
+ # which is the ONLY legitimate way to set it; a non-zero override exists solely so the cap can be
+ # SWEPT as a truncation guard (and so the reference's own 10 can be reproduced), never to tune
+ # success. Recorded in describe() either way so every cell says which cap it ran.
+ self.chain_cap = int(chain_cap or 0)
+ self.chain_tail_eps = float(chain_tail_eps)
+ self.chain_seed = chain_seed
+ # gen_q#271: repeat the candidate action at every fold hop instead of re-sampling the hop
+ # head. Default False == the historic closed-loop fold, so every archived cell is
+ # bit-identical. mlp / (d1, fold) only -- at depth 1 it is a no-op by construction.
+ self.fold_openloop = bool(fold_openloop)
+ # gen_q#271: clamp the sampled latent between hops, as the label's rollout does.
+ # 0.0 == off == the historic fold; the trainer's own value for this corpus is 10.0.
+ self.fold_sample_clip = float(fold_sample_clip or 0.0)
+ self.chain_hop_acc = None
+ # gen_q#273 -- MPC. The horizon is given in FRAMES and comes from the discount:
+ # H = 1/(1-gamma). The number of open-loop chunks is ceil(H / hop_frames) and is computed
+ # AFTER the backend is built, from the model's own chunk length, so the launcher never has to
+ # hard-code 8. mpc_horizon=0 leaves `depth` exactly as the caller passed it.
+ self.mpc_horizon = int(mpc_horizon or 0)
+ # gen_q#282 (stream DF_VALUE): `df` is the third world-model column -- same H, same
+ # candidates, same provenance reward as dinowm/lewm, and the horizon is generated JOINTLY
+ # instead of autoregressively. It is MPC-only by construction: df_readout refuses d1/fold
+ # because DF has no per-hop hazard to fold.
+ if mode in _MPC_MODES and backend not in TOKEN_BACKENDS + ("lewm", "df"):
+ raise ValueError(f"plan_mode={mode} is a WORLD-MODEL read-out: it rolls a latent dynamics\n"
+ f"model open-loop and scores the result. Backends: dwm, dinowm, lewm, df "
+ f"(got backend={backend}).")
+ if mode in ("chain", "chain_rb"):
+ if backend != "mlp":
+ raise ValueError(f"the coin chain is implemented on the mlp backend (got backend={backend}); "
+ f"the token read-outs have no per-row freeze")
+ # fail loudly at construction, not 400 decisions in
+ _p = chain_continuation_p(self.beta, self.gamma)
+ _cap = self.chain_cap or chain_cap_fn(self.beta, self.gamma, self.chain_tail_eps)
+ # P(N > cap) = p**cap, except that Python's 0**0 is 1: at beta == gamma the coin never
+ # continues, so a cap of 0 truncates nothing and the tail is 0, not 1.
+ _tail = 0.0 if _p == 0.0 else _p ** _cap
+ sys.stderr.write(
+ f"[rsm_scorer] COIN CHAIN: beta={self.beta} gamma={self.gamma} p={_p:.6f} cap={_cap} "
+ f"tail=P(N>cap)={_tail:.2e} E[hops]={_p / (1 - _p):.3f} "
+ f"E[beta-reads]={1 / (1 - _p):.3f} (L*=(1-beta)/(1-gamma)={(1 - self.beta) / (1 - self.gamma):.1f})\n")
+ sys.stderr.flush()
+ if score_kind in ("logit", "conformal_lcb", "prob_log") and (mode == "recursive" or backend == "mc"):
+ raise ValueError(f"plan_score={score_kind} needs the d1 / fold read-out of the mlp / dwm / dinowm backend "
+ f"(got backend={backend}, mode={mode})")
+ # prob_log folds log(1 - c_k) = logσ(-lg_k/T) hop by hop, so it needs the per-hop reward LOGITS.
+ # The token read-outs (dwm / dinowm) expose only the per-hop c_k (return_hops), already through the
+ # sigmoid -- a saturated c_k = 1.0 there gives log(0) = -inf and the read-out would silently lose
+ # exactly the resolution it exists to recover. So it is restricted to the mlp backend, which owns
+ # `_q_fold_logit` and has the raw logits in hand. LeWM has no per-hop logit interface either.
+ if score_kind == "prob_log" and backend != "mlp":
+ raise ValueError(f"plan_score=prob_log needs the per-hop reward logits of the mlp backend's fold "
+ f"(got backend={backend}); the token read-outs expose only the post-sigmoid c_k")
+ if self.fold_sample_clip > 0:
+ if backend != "mlp" or mode not in ("d1", "fold"):
+ raise ValueError(f"fold_sample_clip is an mlp d1/fold option (got backend={backend}, "
+ f"mode={mode})")
+ sys.stderr.write(f"[rsm_scorer] FOLD SAMPLE CLIP: z clamped to +-{self.fold_sample_clip} "
+ f"after every hop (mode={mode} depth={depth})\n")
+ sys.stderr.flush()
+ if self.fold_openloop:
+ if backend != "mlp" or mode not in ("d1", "fold"):
+ raise ValueError(f"fold_openloop is an mlp d1/fold option (got backend={backend}, "
+ f"mode={mode})")
+ sys.stderr.write(f"[rsm_scorer] FOLD OPEN LOOP: the candidate action chunk is REPEATED at "
+ f"every hop (mode={mode} depth={depth}); the hop head is not sampled\n")
+ sys.stderr.flush()
+ if score_kind == "conformal_lcb" and not 0.0 < self.lcb_quantile < 1.0:
+ raise ValueError(f"plan_lcb_quantile must be in (0, 1), got {self.lcb_quantile}")
+ self.device = torch.device(device)
+ self.state = state
+ if self.state is None and feat_stats:
+ self.state = PooledDinoState(feat_stats, cams=cams, proprio_keys=proprio_keys,
+ img_layout=img_layout, dino=dino).to(self.device)
+ feat_sd = None if self.state is None else self.state.sd.cpu().numpy()
+ d_in = STATE_DIM if self.state is None else self.state.d
+ if backend == "mlp":
+ self.backend = MLPBackend(ckpt, self.device, d_in=d_in, hop_ckpt=hop_ckpt, feat_sd=feat_sd,
+ max_rows=max_rows)
+ elif backend in TOKEN_BACKENDS:
+ # `dwm_module` defaults to "dwm_readout", so only override it when the caller left it at
+ # that default: an explicit --rsm_dwm_module still wins.
+ _mod = dwm_module if dwm_module not in (None, "", "dwm_readout") \
+ else READOUT_MODULE[backend]
+ self.backend = DWMBackend(ckpt, self.device, module=_mod, hop_ckpt=hop_ckpt,
+ feat_sd=feat_sd, d_in=d_in,
+ normalize=None if self.state is None else self.state.normalize)
+ elif backend == "lewm":
+ self.backend = LeWMBackend(ckpt, self.device, hop_ckpt=hop_ckpt, feat_sd=feat_sd,
+ d_in=d_in,
+ normalize=None if self.state is None else self.state.normalize)
+ elif backend == "df":
+ self.backend = DFBackend(ckpt, self.device, hop_ckpt=hop_ckpt, feat_sd=feat_sd,
+ d_in=d_in)
+ elif backend == "mc":
+ self.backend = MCBackend(ckpt, self.device, hop_ckpt=hop_ckpt, feat_sd=feat_sd)
+ else:
+ raise ValueError(f"unknown backend {backend}")
+ self.chunk, self.adim, self.d_act = self.backend.chunk, self.backend.adim, self.backend.d_act
+ # gen_q#273: H frames -> K = ceil(H / hop_frames) chunks of open-loop roll-out. hop_frames is
+ # the model's OWN step, read off the loaded critic, so the cell name (H in frames) and the run
+ # can never disagree.
+ #
+ # ASK THE BACKEND, NEVER ASSUME. Two different critics live behind `backend == "dwm"`, and
+ # they do NOT share a hop (measured receipt: status/q273/hop_receipt.json, LSF 1874174):
+ # DWMCritic (dwm_readout.py, the RSM/DWM occupancy flow, `--model DWM=...:dwm`)
+ # : _step IS a draw from the beta-discounted successor, so its hop is
+ # _hop_frames(beta) = 1/(1-beta) frames and beta sets the roll granularity.
+ # DINOWMCritic (dinowm_readout.py, `--model DINOWM=...:dinowm`, which is what every DINO-WM
+ # cell in this table uses) : SUBCLASSES DWMCritic but OVERRIDES BOTH. _step is a
+ # deterministic one-chunk latent step with beta forced to zero
+ # (dinowm_readout.py:65-86, `bz = torch.zeros(...)`), and _hop_frames returns the
+ # constant self.hop_frames (:89-90) = ck["hop_frames"] or config chunk = 8.
+ # beta is therefore INERT on DINO-WM: _hop_frames is 8.0 at every beta in
+ # {0.90, 0.95, 0.98, 0.99, 0.995}, measured.
+ # LeWMCritic (lewm_readout.py) : step_emb advances the context by ONE action chunk, so
+ # hop_frames = chunk = 8 is genuinely true and beta is inert there too.
+ # A 2026-09-23 note in this file claimed DINO-WM's hop was 1/(1-beta); that read DWMCritic's
+ # base methods and missed the subclass overrides. It is retracted -- see status/DWM_MPC_DONE.
+ # The lookup order below is kept because it is the honest one (a backend that DOES vary its hop
+ # with beta gets asked), and the banner prints the source so a fallback can never be silent.
+ _core = getattr(self.backend, "core", None)
+ _hf = getattr(_core, "_hop_frames", None)
+ if callable(_hf):
+ self.mpc_hop_frames = float(_hf(self.beta))
+ else:
+ self.mpc_hop_frames = float(getattr(_core, "hop_frames", self.chunk))
+ if self.mode in _MPC_MODES:
+ if self.mpc_horizon <= 0:
+ raise ValueError(f"plan_mode={self.mode} needs plan_mpc_horizon > 0 (H in FRAMES, "
+ f"H = 1/(1-gamma)); got {self.mpc_horizon}")
+ self.depth = int(math.ceil(self.mpc_horizon / self.mpc_hop_frames))
+ _gh = 1.0 / (1.0 - self.gamma)
+ # The continuation past the first chunk is NOT the same object on the two world models, and
+ # the banner has to say which one ran: DINO-WM re-queries the hop head on the rolled latent,
+ # LeWM cannot (no hop head -- its latent is its own encoder's) and repeats the candidate.
+ # gen_q#288: LeWM DOES chain with the hop head now, on the current observation's pooled
+ # DINO state (its own latent has none). With no --hop it still repeats the candidate.
+ _cont = (("hop head on the CURRENT observation's pooled state, "
+ f"M={self.effective_particles()} roll-outs"
+ if self.backend.hop is not None else
+ "zero-order hold of the candidate chunk (no hop head loaded)")
+ if self.backend_name == "lewm" else
+ "the model's OWN sampled action channel past the chunk (DF, D2: free tail)"
+ if self.backend_name == "df" else "hop head on the rolled latent")
+ _src = "backend._hop_frames(beta)" if callable(
+ getattr(getattr(self.backend, "core", None), "_hop_frames", None)) else (
+ "backend.hop_frames" if hasattr(getattr(self.backend, "core", None), "hop_frames")
+ else "action chunk (fallback)")
+ sys.stderr.write(
+ f"[rsm_scorer] MPC: mode={self.mode} H={self.mpc_horizon} frames "
+ f"(gamma={self.gamma} -> 1/(1-gamma)={_gh:.1f}) hop_frames={self.mpc_hop_frames:.1f} "
+ f"[from {_src}, beta={self.beta}] "
+ f"-> K={self.depth} open-loop hops = {self.depth * self.mpc_hop_frames:.0f} frames "
+ f"rolled; continuation past chunk 1 = {_cont}\n")
+ sys.stderr.flush()
+ # the coin chain's knobs live on the BACKEND (that is where _q_chain_logit reads them). Set
+ # unconditionally so a backend can never carry a stale value from a previous scorer.
+ self.backend.chain_cap_override = self.chain_cap or None
+ self.backend.chain_tail_eps = self.chain_tail_eps
+ self.backend.chain_seed = self.chain_seed
+ self.backend.fold_openloop = self.fold_openloop
+ self.backend.fold_sample_clip = self.fold_sample_clip
+ self.backend.last_chain_stats = None
+
+ # ---- state ------------------------------------------------------------
+ @torch.no_grad()
+ def state_from_obs(self, obs_t):
+ """obs dict at the current frame -> SimpleNamespace(x [B,1545], tok [B,514,384] or None)."""
+ if self.state is None:
+ raise RuntimeError("scorer built without feat_stats; pass states directly")
+ if self.backend_name in TOKEN_BACKENDS:
+ tok, x = self.state.tokens(obs_t)
+ pr = self.state._proprio(obs_t, tok.shape[0])
+ return SimpleNamespace(x=x, tok=tok, pr=pr)
+ if self.backend_name == "lewm":
+ # PIXELS, through the SAME transform train_lewm.py used (lewm_data.frames_from_obs), plus
+ # the pooled DINO state so nothing else in the planner changes.
+ _rsm_modules()
+ img = importlib.import_module("lewm_data").frames_from_obs(
+ obs_t, cams=self.backend.cams, res=self.backend.res).to(self.device)
+ pr = self.state._proprio(obs_t, img.shape[0])
+ # DINO runs here ONLY when a hop head is loaded (gen_q#288). LeWM itself scores from
+ # pixels and never reads the pooled state, and the flagship discloses each scorer's search
+ # cost -- charging LeWM for a DINOv2 forward it does not use would overstate that cost, so
+ # a no-hop cell keeps x=None and the pre-#288 cost exactly. With a hop head the
+ # continuation actor IS a policy over the pooled 1545-d state, so the forward is genuinely
+ # part of this scorer's cost and is paid once per decision (not per candidate).
+ if self.backend.hop is None:
+ return SimpleNamespace(x=None, tok=None, pr=pr, img=img)
+ _tok, x = self.state.tokens(obs_t)
+ return SimpleNamespace(x=x, tok=None, pr=pr, img=img)
+ return SimpleNamespace(x=self.state(obs_t), tok=None, pr=None)
+
+ @staticmethod
+ def as_state(s):
+ if isinstance(s, torch.Tensor):
+ return SimpleNamespace(x=s, tok=None, pr=None)
+ if not hasattr(s, "pr"):
+ s.pr = None
+ return s
+
+ @staticmethod
+ def repeat_state(s, N):
+ """B states -> B*N states, repeat_interleave'd, for one state per candidate chunk.
+
+ Lives here, not in the caller, because the SCORER decides which fields its backend reads:
+ rsm_planner used to rebuild the namespace itself as (x, tok, pr) and silently dropped the
+ pixel backends' `img` (gen_q#268), so every LeWM eval cell died in _rows on a None input.
+ Repeating whatever vars(s) holds cannot go stale when a backend adds a field."""
+ s = RSMScorer.as_state(s)
+ if int(N) == 1:
+ return s
+ return type(s)(**{k: (v.repeat_interleave(int(N), 0) if torch.is_tensor(v) else v)
+ for k, v in vars(s).items()})
+
+ def _flat_chunk(self, A):
+ A = torch.as_tensor(A, dtype=torch.float32, device=self.device)
+ if A.dim() == 3:
+ if A.shape[1] < self.chunk:
+ raise RuntimeError(f"need {self.chunk} actions per chunk, got {A.shape[1]}")
+ A = A[:, :self.chunk].reshape(A.shape[0], -1)
+ if A.shape[1] != self.d_act:
+ raise RuntimeError(f"chunk is {A.shape[1]}-d, RSM expects {self.d_act}")
+ return A
+
+ def _inputs(self, s):
+ # Every branch names the field it needs and raises if the caller did not carry it. A missing
+ # field used to surface as `'NoneType' object has no attribute 'shape'` from _rows, three
+ # frames away from the caller that dropped it (gen_q#268: rsm_planner's st_rep rebuilt the
+ # namespace from a hardcoded (x, tok, pr) list and lost `img`), which is exactly the kind of
+ # silent degradation this pipeline keeps paying for.
+ if self.backend_name in TOKEN_BACKENDS:
+ return (self._need(s, "tok"), s.pr)
+ if self.backend_name == "lewm":
+ # gen_q#288: 3-tuple (frames, proprio, pooled_raw) when a hop head is loaded, so
+ # lewm_readout can sample the continuation actor; the historic 2-tuple otherwise, which is
+ # what lewm_readout._pooled_of reads as "no hop head on this cell".
+ if self.backend.hop is not None:
+ return (self._need(s, "img"), s.pr, self._need(s, "x"))
+ return (self._need(s, "img"), s.pr)
+ return self.backend.latent(self._need(s, "x")) if hasattr(self.backend, "latent") \
+ else self._need(s, "x")
+
+ def _need(self, s, field):
+ """The state field this backend scores from, or a RuntimeError naming backend AND field."""
+ v = getattr(s, field, None)
+ if v is None:
+ have = sorted(k for k, t in vars(s).items() if t is not None) if hasattr(s, "__dict__") else []
+ raise RuntimeError(
+ f"backend={self.backend_name} scores from state field '{field}', but it is None "
+ f"(state carries {have or 'nothing'}). The caller built the state without it -- see "
+ f"rsm_planner.plan_get_action's st_rep, which must repeat every field of "
+ f"RSMScorer.state_from_obs's output.")
+ return v
+
+ @staticmethod
+ def _rows(inp):
+ return inp[0].shape[0] if isinstance(inp, tuple) else inp.shape[0]
+
+ @staticmethod
+ def _expand(inp, N):
+ if isinstance(inp, tuple):
+ return tuple(None if t is None else t.expand(N, *t.shape[1:]) for t in inp)
+ return inp.expand(N, *inp.shape[1:])
+
+ @staticmethod
+ def _repeat(inp, M):
+ if isinstance(inp, tuple):
+ return tuple(None if t is None else t.repeat_interleave(M, 0) for t in inp)
+ return inp.repeat_interleave(M, 0)
+
+ @staticmethod
+ def _cat(a, b):
+ if isinstance(a, tuple):
+ return tuple(None if x is None else torch.cat([x, y], 0) for x, y in zip(a, b))
+ return torch.cat([a, b], 0)
+
+ @staticmethod
+ def _index(inp, idx):
+ if isinstance(inp, tuple):
+ return tuple(None if t is None else t[idx] for t in inp)
+ return inp[idx]
+
+ def effective_temperature(self):
+ """The T the sigmoid uses: the override if > 0, else the checkpoint's (calib.json or 1.0)."""
+ if self.temperature > 0:
+ return self.temperature
+ return float(getattr(self.backend, "temperature", 1.0))
+
+ # ---- E1 ----------------------------------------------------------------
+ @torch.no_grad()
+ # ---- hop accounting for the coin chain (gen_q#267) ---------------------------------------
+ # The cheapest proof the chain does what the maths says: the number of hops the walk ACTUALLY takes
+ # must match E[N] = p/(1-p) = the same quantity tab:discounts calls L* = (1-beta)/(1-gamma). Summed
+ # over every decision of a cell, then written into the eval JSON by the planner.
+ def _accum_chain_stats(self):
+ st = getattr(self.backend, "last_chain_stats", None)
+ if st is None:
+ return
+ self.backend.last_chain_stats = None # consume, so a fold decision cannot inherit it
+ a = getattr(self, "chain_hop_acc", None)
+ if a is None:
+ a = self.chain_hop_acc = {"decisions": 0, "hops_sum": 0.0, "hops_sq_sum": 0.0,
+ "capped_sum": 0.0, "expired_sum": 0.0, "levels_run": 0,
+ "cap_binding_decisions": 0, "hops_p90_sum": 0.0,
+ "levels_per_row_sum": 0.0,
+ "hops_median_sum": 0.0, "hops_mean_expired_sum": 0.0,
+ "hops_mean_expired_n": 0}
+ for k in ("mode", "beta", "gamma", "p_cont", "cap", "tail_eps", "tail_prob_at_cap",
+ "n_particles", "E_hops_expected", "E_beta_reads_expected",
+ "L_star_tab_discounts", "frame_offset_mean_expected", "absorbed_note"):
+ a[k] = st[k]
+ a["decisions"] += 1
+ a["hops_sum"] += st["hops_mean"]
+ a["hops_sq_sum"] += st["hops_mean"] ** 2
+ a["hops_median_sum"] += st["hops_median"]
+ a["hops_p90_sum"] += st["hops_p90"]
+ a["capped_sum"] += st["capped_frac"]
+ a["expired_sum"] += st["expired_frac"]
+ a["levels_run"] += st["levels_run"]
+ a["levels_per_row_sum"] += st["levels_per_row"]
+ a["cap_binding_decisions"] += int(st["cap_binding"])
+ if st["hops_mean_expired"] == st["hops_mean_expired"]: # not NaN
+ a["hops_mean_expired_sum"] += st["hops_mean_expired"]
+ a["hops_mean_expired_n"] += 1
+
+ def chain_hop_summary(self):
+ """Per-cell hop accounting, or None if no chain decision was scored. Goes into the eval JSON."""
+ a = getattr(self, "chain_hop_acc", None)
+ if not a or not a["decisions"]:
+ return None
+ d = float(a["decisions"])
+ s = {k: a[k] for k in ("mode", "beta", "gamma", "p_cont", "cap", "tail_eps",
+ "tail_prob_at_cap", "n_particles", "E_hops_expected",
+ "E_beta_reads_expected", "L_star_tab_discounts",
+ "frame_offset_mean_expected", "absorbed_note")}
+ s.update({
+ "decisions": int(a["decisions"]),
+ "hops_mean": a["hops_sum"] / d,
+ "hops_median": a["hops_median_sum"] / d,
+ "hops_p90": a["hops_p90_sum"] / d,
+ "hops_mean_expired": (a["hops_mean_expired_sum"] / a["hops_mean_expired_n"]
+ if a["hops_mean_expired_n"] else None),
+ "capped_frac": a["capped_sum"] / d,
+ "expired_frac": a["expired_sum"] / d,
+ "absorbed_frac": 0.0,
+ # Averaged from the PER-CALL value, which divides by rows = candidates x particles. The
+ # cell-level version used to divide the summed level count by decisions x particles only,
+ # dropping the 128 candidates, so it read ~670 ("levels per row") where the walk runs ~5:
+ # cells written before 2026-09-22 18:30Z carry that inflated value -- divide by 128.
+ "levels_per_row": a["levels_per_row_sum"] / d,
+ "levels_per_row_legacy_denominator": a["levels_run"] / max(a["decisions"] * a["n_particles"], 1),
+ "cap_binding_decisions": int(a["cap_binding_decisions"]),
+ # THE FLAG the loader reads: a cell whose cap binds is truncated and must not be quoted
+ # as a chain number without it.
+ # THE CELL-LEVEL RULE IS THE AGGREGATE ONE ONLY. It used to also fire on
+ # `cap_binding_decisions > 0`, i.e. on a single decision in which one particle of 16
+ # reached the cap -- which happens on ~1.4 % of decisions BY DESIGN at a 1e-3 per-particle
+ # tail, so every healthy chain cell was flagged as truncated. A flag that is always on
+ # carries no information and would have put a truncation warning on every row. The
+ # per-decision count is kept as a diagnostic beside it.
+ "cap_binding": bool(a["capped_sum"] / d > 1e-2
+ or a["hops_sum"] / d > 0.9 * max(a["cap"], 1)),
+ })
+ # the hop-accounting check itself: mean hops among EXPIRED particles must match E[N]. The
+ # OVERALL mean is the same number here (the reference chain has no absorbing event), so a
+ # mismatch is a real defect, not a membership-density artefact.
+ e = s["E_hops_expected"]
+ s["hops_rel_err"] = abs(s["hops_mean"] - e) / max(e, 1e-9)
+ return s
+
+ def score(self, state, A, seed=None, mode=None, depth=None, beta=None, rescore_top=None,
+ n_particles_rescore=None):
+ """Ranking array [N]: Q̄ for score_kind="prob", Q̄_logit for "logit", the per-particle
+ `lcb_quantile` quantile of Q for "conformal_lcb". All three are kept in `.last_q` / `.last_q_logit` /
+ `.last_q_lcb` (the logit is None for recursive / mc, the LCB None unless conformal). Two-stage
+ screening: every candidate with n_particles, then the top-K of the RANKING array rescored with M
+ particles and written back."""
+ s = self.as_state(state)
+ A = self._flat_chunk(A)
+ N = A.shape[0]
+ inp = self._inputs(s)
+ R = self._rows(inp)
+ if R == 1 and N > 1:
+ inp = self._expand(inp, N)
+ elif R != N:
+ raise RuntimeError(f"{R} states for {N} chunks")
+ mode = mode or self.mode
+ depth = depth or self.depth
+ beta = self.beta if beta is None else beta
+ K = self.rescore_top if rescore_top is None else int(rescore_top or 0)
+ M = self.n_particles_rescore if n_particles_rescore is None else int(n_particles_rescore or 0)
+ two_stage = bool(K and M and K < N)
+ conformal = self.score_kind == "conformal_lcb"
+ problog = self.score_kind == "prob_log"
+ kw = dict(mode=mode, depth=depth, beta=beta, gamma=self.gamma, flow_steps=self.flow_steps,
+ return_logit=True)
+ if conformal:
+ kw["return_lcb"] = self.lcb_quantile
+ if problog:
+ kw["return_problog"] = True
+ if self.backend_name != "mc":
+ kw["temperature"] = self.temperature if self.temperature > 0 else None
+ if self.backend_name in TOKEN_BACKENDS:
+ kw["crn_seed"] = None if (seed is None or int(seed) < 0) else int(seed)
+ if two_stage: # dwm_readout screens internally (top-K by q_logit)
+ kw["rescore_top"], kw["n_particles_rescore"] = K, M
+ def _unpack(out):
+ """(Q̄, Q̄_logit [, LCB] [, prob_log]) -> (q, ql, lcb, plg) with the absent ones None."""
+ o = list(out) if isinstance(out, tuple) else [out]
+ q_, ql_ = o.pop(0), (o.pop(0) if o else None)
+ lcb_ = o.pop(0) if (conformal and o) else None
+ plg_ = o.pop(0) if (problog and o) else None
+ return q_, ql_, lcb_, plg_
+
+ with seeded(seed, self.device):
+ q, ql, lcb, plg = _unpack(self.backend.q(inp, A, n_particles=self.n_particles, **kw))
+ q = q.float()
+ ql = None if ql is None else ql.float()
+ lcb = None if lcb is None else lcb.float()
+ plg = None if plg is None else plg.double()
+ rank = self._rank_of(q, ql, lcb, plg)
+ if two_stage and self.backend_name not in TOKEN_BACKENDS:
+ top = torch.topk(rank, K).indices
+ q2, ql2, lcb2, plg2 = _unpack(
+ self.backend.q(self._index(inp, top), A[top], n_particles=M, **kw))
+ q = q.clone(); q[top] = q2.float()
+ if ql is not None and ql2 is not None:
+ ql = ql.clone(); ql[top] = ql2.float()
+ if lcb is not None and lcb2 is not None:
+ lcb = lcb.clone(); lcb[top] = lcb2.float()
+ if plg is not None and plg2 is not None:
+ plg = plg.clone(); plg[top] = plg2.double()
+ rank = self._rank_of(q, ql, lcb, plg)
+ self.last_q, self.last_q_logit, self.last_q_lcb = q, ql, lcb
+ self.last_q_problog = plg
+ self._accum_chain_stats()
+ return rank
+
+ @torch.no_grad()
+ def score_trace(self, state, A, seed=None, mode=None, depth=None, beta=None):
+ """VISUALISATION ONLY (gen_q#270). Same call as `score()` for the mlp backend's d1/fold read-out,
+ but returns (rank [N], trace) where trace exposes what the fold already computes internally and
+ normally discards:
+
+ trace["z"] [L, N, P, D] fp16 the successor SAMPLES at each hop (z-scored state space)
+ trace["a"] [L, N, P, d_act] the chunk that produced each z (hop 0 = the candidate itself)
+ trace["lg"] [L, N, P] raw reward logits R(z)
+ trace["c"] [L, N, P] c_k = sigmoid(R(z)/T) -- the GREEN/RED membership
+ trace["q"] [L+1, N, P] the backward fold's partials; q[0].mean(1) == .last_q
+
+ It does NOT go through the two-stage rescreening path (rescore_top is ignored) so that the trace and
+ the returned rank describe ONE pass with `n_particles` particles; for the flagship cells
+ rescore_top=0 anyway, and `score()` itself is untouched. Every RNG draw is the fold's own, so with
+ the same `seed` the q values here equal `score()`'s bit for bit (tests/test_rsm_trace.py)."""
+ if self.backend_name != "mlp":
+ raise RuntimeError(f"score_trace needs the mlp backend (got {self.backend_name})")
+ s_ = self.as_state(state)
+ A = self._flat_chunk(A)
+ N = A.shape[0]
+ inp = self._inputs(s_)
+ R = self._rows(inp)
+ if R == 1 and N > 1:
+ inp = self._expand(inp, N)
+ elif R != N:
+ raise RuntimeError(f"{R} states for {N} chunks")
+ mode = mode or self.mode
+ depth = depth or self.depth
+ beta = self.beta if beta is None else beta
+ conformal = self.score_kind == "conformal_lcb"
+ problog = self.score_kind == "prob_log"
+ kw = dict(mode=mode, depth=depth, beta=beta, gamma=self.gamma, flow_steps=self.flow_steps,
+ return_logit=True, return_trace=True,
+ temperature=self.temperature if self.temperature > 0 else None)
+ if conformal:
+ kw["return_lcb"] = self.lcb_quantile
+ if problog:
+ kw["return_problog"] = True
+ with seeded(seed, self.device):
+ out = list(self.backend.q(inp, A, n_particles=self.n_particles, **kw))
+ trace = out.pop()
+ q, ql = out.pop(0).float(), (out.pop(0) if out else None)
+ ql = None if ql is None else ql.float()
+ lcb = out.pop(0).float() if (conformal and out) else None
+ plg = out.pop(0).double() if (problog and out) else None
+ self.last_q, self.last_q_logit, self.last_q_lcb, self.last_q_problog = q, ql, lcb, plg
+ return self._rank_of(q, ql, lcb, plg), trace
+
+ def _rank_of(self, q, ql, lcb, plg=None):
+ """the array the selection rule sees, per score_kind (falling back to QÌ„ when a backend has none)."""
+ if self.score_kind == "logit" and ql is not None:
+ return ql
+ if self.score_kind == "conformal_lcb" and lcb is not None:
+ return lcb
+ if self.score_kind == "prob_log" and plg is not None:
+ return plg
+ return q
+
+ # ---- E2 ----------------------------------------------------------------
+ @torch.no_grad()
+ def advantage(self, state, A, v_samples=16, v_expectile=0.5, seed=None):
+ """Q̄(x, A) and V̄_τ(x) = τ-expectile over M hop-head chunks of Q̄(x, a^(m)); all B×(1+M) rows are
+ scored in ONE batched call so the CRN noise is shared across the logged chunk and its baselines."""
+ s = self.as_state(state)
+ A = self._flat_chunk(A)
+ B, M = A.shape[0], int(v_samples)
+ if self.backend.hop is None:
+ raise RuntimeError("advantage needs a hop head (rsm_hop_ckpt) to draw baseline chunks")
+ inp = self._inputs(s)
+ if self._rows(inp) != B:
+ raise RuntimeError(f"{self._rows(inp)} states for {B} chunks")
+ kw = {}
+ if self.backend_name in TOKEN_BACKENDS:
+ kw["crn_seed"] = None if (seed is None or int(seed) < 0) else int(seed)
+ with seeded(seed, self.device):
+ eps = torch.randn(M, self.d_act, device=self.device).repeat(B, 1) # CRN over rows
+ x_rep = s.x.repeat_interleave(M, 0)
+ a_hop = self.backend.hop_sample(x_rep, eps) # [B*M, d_act]
+ a_all = torch.cat([A, a_hop], 0)
+ inp_all = self._cat(inp, self._repeat(inp, M))
+ q_all = self.backend.q(inp_all, a_all, mode=self.mode, depth=self.depth, beta=self.beta,
+ gamma=self.gamma, n_particles=self.n_particles, flow_steps=self.flow_steps, **kw)
+ q = q_all[:B].float()
+ qm = q_all[B:].float().view(B, M)
+ v = expectile(qm, v_expectile)
+ return q, v, qm
+
+ def effective_horizon(self):
+ _, _, is_ope = _rsm_modules()
+ if self.mode == "recursive" and self.backend_name not in TOKEN_BACKENDS:
+ return is_ope.effective_horizon(self.beta, self.gamma, self.depth)
+ L = 1 if self.mode == "d1" else self.depth
+ if self.mode in _MPC_MODES:
+ hf = float(getattr(self, "mpc_hop_frames", self.chunk))
+ return {"mean_hops": float(L), "effective_frames": L * hf, "gamma_nominal": self.gamma,
+ "hop_frames": hf, "mpc_horizon_frames": self.mpc_horizon,
+ "mpc_horizon_from_gamma": 1.0 / (1.0 - self.gamma)}
+ # A DINO-WM hop is ONE ACTION CHUNK (the step it was trained on), not 1/(1-beta) frames: it
+ # has no beta. Reporting the beta horizon for it would overstate its reach by ~2.5x at
+ # beta=0.95 and is exactly the kind of mismatch the flagship table has to get right.
+ if self.backend_name in ("dinowm", "lewm"):
+ hf = float(getattr(getattr(self.backend, "core", None), "hop_frames", self.chunk))
+ return {"mean_hops": float(L), "effective_frames": L * hf, "gamma_nominal": self.gamma,
+ "hop_frames": hf}
+ return {"mean_hops": float(L), "effective_frames": L / (1.0 - self.beta), "gamma_nominal": self.gamma}
+
+ def _hop_varies_with_beta(self):
+ """Probe the backend's own hop at two betas. A critic that ignores beta (DINO-WM's
+ deterministic latent step, LeWM's fixed action chunk) returns the same number twice."""
+ hf = getattr(getattr(self.backend, "core", None), "_hop_frames", None)
+ if not callable(hf):
+ return False
+ try:
+ return abs(float(hf(0.90)) - float(hf(0.995))) > 1e-9
+ except Exception:
+ return False
+
+ def effective_particles(self):
+ """How many DISTINCT roll-outs this cell's Q average is over, asked of the BACKEND'S CORE.
+
+ A backend whose core does not answer is taken at its word (mlp, dwm, df, mc all average exactly
+ `n_particles` chains). dinowm / lewm answer 1 at depth 1 -- no continuation to sample, so the
+ roll really is deterministic there -- and `n_particles` above it (gen_q#288)."""
+ core = getattr(self.backend, "core", None)
+ f = getattr(core, "n_eff_particles", None)
+ if f is None:
+ return int(self.n_particles)
+ if self.backend_name == "lewm":
+ return int(f(self.n_particles, self.depth, self.mode,
+ None if self.backend.hop is None else True))
+ return int(f(self.n_particles, self.depth, self.mode))
+
+ def describe(self):
+ state = None
+ if self.state is not None:
+ state = {"dim": self.state.d, "sd_floor": self.state.sd_floor, "z_clip": self.state.z_clip,
+ "img_layout": self.state.img_layout, "cams": list(self.state.cams),
+ "proprio_keys": list(self.state.proprio_keys)}
+ return {"backend": self.backend_name, "mode": self.mode, "depth": self.depth, "beta": self.beta,
+ "state": state,
+ "gamma": self.gamma, "n_particles": self.n_particles,
+ # gen_q#288 -- THE MEASURED PARTICLE COUNT, not the requested one. dinowm / lewm used
+ # to collapse any request to a single roll-out, so 855 + 630 published cells recorded
+ # `n_particles: 16` and averaged ONE chain. verdict_table's arm key reads this field
+ # (absent => M1, which is what those cells were), so a repaired cell cannot pool with
+ # them. Same self-verifying trick as the `temperature` field above.
+ "effective_particles": self.effective_particles(),
+ "flow_steps": self.flow_steps,
+ "chunk": self.chunk, "adim": self.adim, "hop": self.backend.hop is not None,
+ "score_kind": self.score_kind, "fold_openloop": self.fold_openloop,
+ "fold_sample_clip": self.fold_sample_clip,
+ "rescore_top": self.rescore_top,
+ "n_particles_rescore": self.n_particles_rescore, "temperature_override": self.temperature,
+ "lcb_quantile": self.lcb_quantile if self.score_kind == "conformal_lcb" else None,
+ "temperature": self.effective_temperature(),
+ "horizon": self.effective_horizon(),
+ # coin chain (gen_q#267): None for every non-chain cell, so an archived describe() is
+ # unchanged and the loader can tell a chain cell from a fold cell by this key alone.
+ "chain": (None if self.mode not in ("chain", "chain_rb") else {
+ "p_cont": chain_continuation_p(self.beta, self.gamma),
+ "cap": self.chain_cap or chain_cap_fn(self.beta, self.gamma, self.chain_tail_eps),
+ "cap_source": "override" if self.chain_cap else "computed from the 1e-3 tail",
+ "tail_eps": self.chain_tail_eps,
+ "E_hops_expected": (lambda p: p / (1 - p))(chain_continuation_p(self.beta, self.gamma)),
+ "reference": "ogbench_genq/rsm.py:113 rec_p=(gamma-beta)/(gamma*(1-beta)); :532 chain_prob"}),
+ # gen_q#273: None for every non-MPC cell, so an archived describe() is unchanged.
+ "mpc": (None if self.mode not in _MPC_MODES else {
+ "horizon_frames": self.mpc_horizon,
+ "horizon_from_gamma": 1.0 / (1.0 - self.gamma),
+ "hop_frames": self.mpc_hop_frames,
+ "chunks_rolled": self.depth,
+ "frames_rolled": self.depth * self.mpc_hop_frames,
+ "readout": ("terminal latent" if self.mode == "mpc" else
+ "gamma-discounted sum over the roll-out, normalised by sum_k gamma**(h k)"),
+ # gen_q#288. Both world models now chain with the SAME stochastic hop head; what
+ # differs is the STATE it is conditioned on (DINO-WM: the rolled latent's pooled
+ # vector; LeWM: the current observation's, because a LeWM embedding has no pooled
+ # DINO vector). describe() must never claim a hop head ran when none is loaded.
+ "continuation": ("zero-order hold of the candidate chunk (no hop head loaded)"
+ if self.backend.hop is None and self.backend_name == "lewm" else
+ "hop head (runs//hop/gauss/policy_r1.pt) past chunk 1"),
+ "continuation_state": ("rolled latent" if self.backend_name != "lewm" else
+ "current observation (LeWM's latent has no pooled DINO "
+ "vector; see lewm_readout deviation 2)"),
+ "particles": self.effective_particles(),
+ # measured, not assumed: does this critic's own hop move with beta at all?
+ # False on DINO-WM and LeWM (constant 8), True on the RSM/DWM occupancy flow.
+ "beta_affects_hop": self._hop_varies_with_beta()}),
+ "chain_hops": self.chain_hop_summary()}
+
+
+# --------------------------------------------------------------------------- #
+# test helpers: random checkpoints in the real blob formats
+# --------------------------------------------------------------------------- #
+def save_random_rsm_ckpt(path, d_in=STATE_DIM, chunk=8, adim=7, flow_width=64, flow_depth=2, seed=0):
+ """Randomly initialised identity-encoder MLP successor in train_rsm.py's blob format."""
+ model, _, _ = _rsm_modules()
+ torch.manual_seed(seed)
+ d_act = chunk * adim
+ enc = model.IdentityEncoder(d_in)
+ rew = model.RewardHead(d_in, 1)
+ flow = model.OccFlow(d_in, d_act, 1, width=flow_width, depth=flow_depth)
+ blob = {"enc": enc.state_dict(), "enc_t": enc.state_dict(), "rew": rew.state_dict(),
+ "flow": flow.state_dict(), "rms": torch.ones(d_in), "n_pr": 0, "tasks": ["task"],
+ "d_act": d_act, "step": 0, "enc_kind": "identity", "d_in": d_in, "d_lat": d_in,
+ "config": {"enc": "identity", "d_z": d_in, "enc_width": 1024, "flow_width": flow_width,
+ "flow_depth": flow_depth, "chunk": chunk, "beta_lo": 0.9, "beta_hi": 0.995}}
+ torch.save(blob, path)
+ return path
+
+
+def save_random_hop_ckpt(path, d_in=STATE_DIM, chunk=8, adim=7, family="gauss", seed=0):
+ model, _, _ = _rsm_modules()
+ torch.manual_seed(seed)
+ d_act = chunk * adim
+ if family == "gauss":
+ pol = model.BCHead(d_in, d_act, 1)
+ elif family == "flow":
+ pol = model.FlowPolicy(d_in, d_act, 1)
+ else:
+ pol = model.ConcatFlowPolicy(d_in, d_act, 1, width=64, depth=2)
+ torch.save({"pol": pol.state_dict(), "round": 1,
+ "config": {"policy_family": family, "chunk": chunk, "policy_features": "raw",
+ "feat_scale": "zscore", "pol_width": 64, "pol_depth": 2}}, path)
+ return path
+
+
+def save_feat_stats(path, d=STATE_DIM, seed=0):
+ rng = np.random.default_rng(seed)
+ np.savez(path, mu=rng.normal(size=d).astype(np.float32),
+ sd=np.maximum(rng.uniform(0.5, 2.0, size=d), 1e-3).astype(np.float32), dim=d, n=1000)
+ return path
diff --git a/code_src/rise_robomimic/robomimic/algo/td3_bc.py b/code_src/rise_robomimic/robomimic/algo/td3_bc.py
new file mode 100644
index 0000000000000000000000000000000000000000..e324c54a1614c1c01b3efdb1def9c8f6f11b2c70
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/algo/td3_bc.py
@@ -0,0 +1,567 @@
+"""
+Implementation of TD3-BC.
+Based on https://github.com/sfujim/TD3_BC
+(Paper - https://arxiv.org/abs/1812.02900).
+
+Note that several parts are exactly the same as the BCQ implementation,
+such as @_create_critics, @process_batch_for_training, and
+@_train_critic_on_batch. They are replicated here (instead of subclassing
+from the BCQ algo class) to be explicit and have implementation details
+self-contained in this file.
+"""
+from collections import OrderedDict
+
+import torch
+import torch.nn as nn
+import torch.nn.functional as F
+
+import robomimic.models.obs_nets as ObsNets
+import robomimic.models.policy_nets as PolicyNets
+import robomimic.models.value_nets as ValueNets
+import robomimic.models.vae_nets as VAENets
+import robomimic.utils.tensor_utils as TensorUtils
+import robomimic.utils.torch_utils as TorchUtils
+import robomimic.utils.obs_utils as ObsUtils
+import robomimic.utils.loss_utils as LossUtils
+
+from robomimic.algo import register_algo_factory_func, PolicyAlgo, ValueAlgo
+
+
+@register_algo_factory_func("td3_bc")
+def algo_config_to_class(algo_config):
+ """
+ Maps algo config to the TD3_BC algo class to instantiate, along with additional algo kwargs.
+
+ Args:
+ algo_config (Config instance): algo config
+
+ Returns:
+ algo_class: subclass of Algo
+ algo_kwargs (dict): dictionary of additional kwargs to pass to algorithm
+ """
+ # only one variant of TD3_BC for now
+ return TD3_BC, {}
+
+
+class TD3_BC(PolicyAlgo, ValueAlgo):
+ """
+ Default TD3_BC training, based on https://arxiv.org/abs/2106.06860 and
+ https://github.com/sfujim/TD3_BC.
+ """
+ def __init__(self, **kwargs):
+ PolicyAlgo.__init__(self, **kwargs)
+
+ # save the discount factor - it may be overriden later
+ self.set_discount(self.algo_config.discount)
+
+ # initialize actor update counter. This is used to train the actor at a lower freq than critic
+ self.actor_update_counter = 0
+
+ def _create_networks(self):
+ """
+ Creates networks and places them into @self.nets.
+ """
+ self.nets = nn.ModuleDict()
+
+ self._create_critics()
+ self._create_actor()
+
+ # sync target networks at beginning of training
+ with torch.no_grad():
+ for critic_ind in range(len(self.nets["critic"])):
+ TorchUtils.hard_update(
+ source=self.nets["critic"][critic_ind],
+ target=self.nets["critic_target"][critic_ind],
+ )
+
+ TorchUtils.hard_update(
+ source=self.nets["actor"],
+ target=self.nets["actor_target"],
+ )
+
+ self.nets = self.nets.float().to(self.device)
+
+ def _create_critics(self):
+ """
+ Called in @_create_networks to make critic networks.
+
+ Exactly the same as BCQ.
+ """
+ critic_class = ValueNets.ActionValueNetwork
+ critic_args = dict(
+ obs_shapes=self.obs_shapes,
+ ac_dim=self.ac_dim,
+ mlp_layer_dims=self.algo_config.critic.layer_dims,
+ value_bounds=self.algo_config.critic.value_bounds,
+ goal_shapes=self.goal_shapes,
+ encoder_kwargs=ObsUtils.obs_encoder_kwargs_from_config(self.obs_config.encoder),
+ )
+
+ # Q network ensemble and target ensemble
+ self.nets["critic"] = nn.ModuleList()
+ self.nets["critic_target"] = nn.ModuleList()
+ for _ in range(self.algo_config.critic.ensemble.n):
+ critic = critic_class(**critic_args)
+ self.nets["critic"].append(critic)
+
+ critic_target = critic_class(**critic_args)
+ self.nets["critic_target"].append(critic_target)
+
+ def _create_actor(self):
+ """
+ Called in @_create_networks to make actor network.
+ """
+ actor_class = PolicyNets.ActorNetwork
+ actor_args = dict(
+ obs_shapes=self.obs_shapes,
+ goal_shapes=self.goal_shapes,
+ ac_dim=self.ac_dim,
+ mlp_layer_dims=self.algo_config.actor.layer_dims,
+ encoder_kwargs=ObsUtils.obs_encoder_kwargs_from_config(self.obs_config.encoder),
+ )
+
+ self.nets["actor"] = actor_class(**actor_args)
+ self.nets["actor_target"] = actor_class(**actor_args)
+
+ def _check_epoch(self, net_name, epoch):
+ """
+ Helper function to check whether backprop should happen this epoch.
+
+ Args:
+ net_name (str): name of network in @self.nets and @self.optim_params
+ epoch (int): epoch number
+ """
+ epoch_start_check = (self.optim_params[net_name]["start_epoch"] == -1) or (epoch >= self.optim_params[net_name]["start_epoch"])
+ epoch_end_check = (self.optim_params[net_name]["end_epoch"] == -1) or (epoch < self.optim_params[net_name]["end_epoch"])
+ return (epoch_start_check and epoch_end_check)
+
+ def set_discount(self, discount):
+ """
+ Useful function to modify discount factor if necessary (e.g. for n-step returns).
+ """
+ self.discount = discount
+
+ def process_batch_for_training(self, batch):
+ """
+ Processes input batch from a data loader to filter out
+ relevant information and prepare the batch for training.
+
+ Exactly the same as BCQ.
+
+ Args:
+ batch (dict): dictionary with torch.Tensors sampled
+ from a data loader
+
+ Returns:
+ input_batch (dict): processed and filtered batch that
+ will be used for training
+ """
+ input_batch = dict()
+
+ # n-step returns (default is 1)
+ n_step = self.algo_config.n_step
+ assert batch["actions"].shape[1] >= n_step
+
+ # remove temporal batches for all
+ input_batch["obs"] = {k: batch["obs"][k][:, 0, :] for k in batch["obs"]}
+ input_batch["next_obs"] = {k: batch["next_obs"][k][:, n_step - 1, :] for k in batch["next_obs"]}
+ input_batch["goal_obs"] = batch.get("goal_obs", None) # goals may not be present
+ input_batch["actions"] = batch["actions"][:, 0, :]
+
+ # note: ensure scalar signals (rewards, done) retain last dimension of 1 to be compatible with model outputs
+
+ # single timestep reward is discounted sum of intermediate rewards in sequence
+ reward_seq = batch["rewards"][:, :n_step]
+ discounts = torch.pow(self.algo_config.discount, torch.arange(n_step).float()).unsqueeze(0)
+ input_batch["rewards"] = (reward_seq * discounts).sum(dim=1).unsqueeze(1)
+
+ # discount rate will be gamma^N for computing n-step returns
+ new_discount = (self.algo_config.discount ** n_step)
+ self.set_discount(new_discount)
+
+ # consider this n-step seqeunce done if any intermediate dones are present
+ done_seq = batch["dones"][:, :n_step]
+ input_batch["dones"] = (done_seq.sum(dim=1) > 0).float().unsqueeze(1)
+
+ if self.algo_config.infinite_horizon:
+ # scale terminal rewards by 1 / (1 - gamma) for infinite horizon MDPs
+ done_inds = input_batch["dones"].round().long().nonzero(as_tuple=False)[:, 0]
+ if done_inds.shape[0] > 0:
+ input_batch["rewards"][done_inds] = input_batch["rewards"][done_inds] * (1. / (1. - self.discount))
+
+ # we move to device first before float conversion because image observation modalities will be uint8 -
+ # this minimizes the amount of data transferred to GPU
+ return TensorUtils.to_float(TensorUtils.to_device(input_batch, self.device))
+
+ def _train_critic_on_batch(self, batch, epoch, no_backprop=False):
+ """
+ A modular helper function that can be overridden in case
+ subclasses would like to modify training behavior for the
+ critics.
+
+ Exactly the same as BCQ (except for removal of @action_sampler_outputs and @critic_outputs)
+
+ Args:
+ batch (dict): dictionary with torch.Tensors sampled
+ from a data loader and filtered by @process_batch_for_training
+
+ epoch (int): epoch number - required by some Algos that need
+ to perform staged training and early stopping
+
+ no_backprop (bool): if True, don't perform any learning updates.
+
+ Returns:
+ info (dict): dictionary of relevant inputs, outputs, and losses
+ that might be relevant for logging
+ """
+ info = OrderedDict()
+
+ # batch variables
+ s_batch = batch["obs"]
+ a_batch = batch["actions"]
+ r_batch = batch["rewards"]
+ ns_batch = batch["next_obs"]
+ goal_s_batch = batch["goal_obs"]
+
+ # 1 if not done, 0 otherwise
+ done_mask_batch = 1. - batch["dones"]
+ info["done_masks"] = done_mask_batch
+
+ # Bellman backup for Q-targets
+ q_targets = self._get_target_values(
+ next_states=ns_batch,
+ goal_states=goal_s_batch,
+ rewards=r_batch,
+ dones=done_mask_batch,
+ )
+ info["critic/q_targets"] = q_targets
+
+ # Train all critics using this set of targets for regression
+ for critic_ind, critic in enumerate(self.nets["critic"]):
+ critic_loss = self._compute_critic_loss(
+ critic=critic,
+ states=s_batch,
+ actions=a_batch,
+ goal_states=goal_s_batch,
+ q_targets=q_targets,
+ )
+ info["critic/critic{}_loss".format(critic_ind + 1)] = critic_loss
+
+ if not no_backprop:
+ critic_grad_norms = TorchUtils.backprop_for_loss(
+ net=self.nets["critic"][critic_ind],
+ optim=self.optimizers["critic"][critic_ind],
+ loss=critic_loss,
+ max_grad_norm=self.algo_config.critic.max_gradient_norm,
+ )
+ info["critic/critic{}_grad_norms".format(critic_ind + 1)] = critic_grad_norms
+
+ return info
+
+ def _train_actor_on_batch(self, batch, epoch, no_backprop=False):
+ """
+ A modular helper function that can be overridden in case
+ subclasses would like to modify training behavior for the
+ actor.
+
+ Args:
+ batch (dict): dictionary with torch.Tensors sampled
+ from a data loader and filtered by @process_batch_for_training
+
+ epoch (int): epoch number - required by some Algos that need
+ to perform staged training and early stopping
+
+ no_backprop (bool): if True, don't perform any learning updates.
+
+ Returns:
+ info (dict): dictionary of relevant inputs, outputs, and losses
+ that might be relevant for logging
+ """
+ info = OrderedDict()
+
+ # Actor loss (update with mixture of DDPG loss and BC loss)
+ s_batch = batch["obs"]
+ a_batch = batch["actions"]
+ goal_s_batch = batch["goal_obs"]
+
+ # lambda mixture weight is combination of hyperparameter (alpha) and Q-value normalization
+ actor_actions = self.nets["actor"](s_batch, goal_s_batch)
+ Q_values = self.nets["critic"][0](s_batch, actor_actions, goal_s_batch)
+ lam = self.algo_config.alpha / Q_values.abs().mean().detach()
+ actor_loss = -lam * Q_values.mean() + nn.MSELoss()(actor_actions, a_batch)
+ info["actor/loss"] = actor_loss
+
+ if not no_backprop:
+ actor_grad_norms = TorchUtils.backprop_for_loss(
+ net=self.nets["actor"],
+ optim=self.optimizers["actor"],
+ loss=actor_loss,
+ )
+ info["actor/grad_norms"] = actor_grad_norms
+
+ return info
+
+ def _get_target_values(self, next_states, goal_states, rewards, dones):
+ """
+ Helper function to get target values for training Q-function with TD-loss.
+
+ Args:
+ next_states (dict): batch of next observations
+ goal_states (dict): if not None, batch of goal observations
+ rewards (torch.Tensor): batch of rewards - should be shape (B, 1)
+ dones (torch.Tensor): batch of done signals - should be shape (B, 1)
+
+ Returns:
+ q_targets (torch.Tensor): target Q-values to use for TD loss
+ """
+
+ with torch.no_grad():
+ # get next actions via target actor and noise
+ next_target_actions = self.nets["actor_target"](next_states, goal_states)
+ noise = (
+ torch.randn_like(next_target_actions) * self.algo_config.actor.noise_std
+ ).clamp(-self.algo_config.actor.noise_clip, self.algo_config.actor.noise_clip)
+ next_actions = (next_target_actions + noise).clamp(-1.0, 1.0)
+
+ # TD3 trick to combine max and min over all Q-ensemble estimates into single target estimates
+ all_value_targets = self.nets["critic_target"][0](next_states, next_actions, goal_states).reshape(-1, 1)
+ max_value_targets = all_value_targets
+ min_value_targets = all_value_targets
+ for critic_target in self.nets["critic_target"][1:]:
+ all_value_targets = critic_target(next_states, next_actions, goal_states).reshape(-1, 1)
+ max_value_targets = torch.max(max_value_targets, all_value_targets)
+ min_value_targets = torch.min(min_value_targets, all_value_targets)
+ value_targets = self.algo_config.critic.ensemble.weight * min_value_targets + \
+ (1. - self.algo_config.critic.ensemble.weight) * max_value_targets
+ q_targets = rewards + dones * self.discount * value_targets
+
+ return q_targets
+
+ def _compute_critic_loss(self, critic, states, actions, goal_states, q_targets):
+ """
+ Helper function to compute loss between estimated Q-values and target Q-values.
+
+ Nearly the same as BCQ (return type slightly different).
+
+ Args:
+ critic (torch.nn.Module): critic network
+ states (dict): batch of observations
+ actions (torch.Tensor): batch of actions
+ goal_states (dict): if not None, batch of goal observations
+ q_targets (torch.Tensor): batch of target q-values for the TD loss
+
+ Returns:
+ critic_loss (torch.Tensor): critic loss
+ """
+ q_estimated = critic(states, actions, goal_states)
+ if self.algo_config.critic.use_huber:
+ critic_loss = nn.SmoothL1Loss()(q_estimated, q_targets)
+ else:
+ critic_loss = nn.MSELoss()(q_estimated, q_targets)
+ return critic_loss
+
+ def train_on_batch(self, batch, epoch, validate=False):
+ """
+ Training on a single batch of data.
+
+ Args:
+ batch (dict): dictionary with torch.Tensors sampled
+ from a data loader and filtered by @process_batch_for_training
+
+ epoch (int): epoch number - required by some Algos that need
+ to perform staged training and early stopping
+
+ validate (bool): if True, don't perform any learning updates.
+
+ Returns:
+ info (dict): dictionary of relevant inputs, outputs, and losses
+ that might be relevant for logging
+ """
+ with TorchUtils.maybe_no_grad(no_grad=validate):
+ info = PolicyAlgo.train_on_batch(self, batch, epoch, validate=validate)
+
+ # Critic training
+ no_critic_backprop = validate or (not self._check_epoch(net_name="critic", epoch=epoch))
+ with TorchUtils.maybe_no_grad(no_grad=no_critic_backprop):
+ critic_info = self._train_critic_on_batch(
+ batch=batch,
+ epoch=epoch,
+ no_backprop=no_critic_backprop,
+ )
+ info.update(critic_info)
+
+ # update actor and target networks at lower frequency
+ if not no_critic_backprop:
+ # update counter only on critic training gradient steps
+ self.actor_update_counter += 1
+ do_actor_update = (self.actor_update_counter % self.algo_config.actor.update_freq == 0)
+
+ # Actor training
+ no_actor_backprop = validate or (not self._check_epoch(net_name="actor", epoch=epoch))
+ no_actor_backprop = no_actor_backprop or (not do_actor_update)
+ with TorchUtils.maybe_no_grad(no_grad=no_actor_backprop):
+ actor_info = self._train_actor_on_batch(
+ batch=batch,
+ epoch=epoch,
+ no_backprop=no_actor_backprop,
+ )
+ info.update(actor_info)
+
+ if not no_actor_backprop:
+ # to match original implementation, only update target networks on
+ # actor gradient steps
+ with torch.no_grad():
+ # update the target critic networks
+ for critic_ind in range(len(self.nets["critic"])):
+ TorchUtils.soft_update(
+ source=self.nets["critic"][critic_ind],
+ target=self.nets["critic_target"][critic_ind],
+ tau=self.algo_config.target_tau,
+ )
+
+ # update target actor network
+ TorchUtils.soft_update(
+ source=self.nets["actor"],
+ target=self.nets["actor_target"],
+ tau=self.algo_config.target_tau,
+ )
+
+ return info
+
+ def log_info(self, info):
+ """
+ Process info dictionary from @train_on_batch to summarize
+ information to pass to tensorboard for logging.
+
+ Args:
+ info (dict): dictionary of info
+
+ Returns:
+ loss_log (dict): name -> summary statistic
+ """
+ loss_log = OrderedDict()
+
+ # record current optimizer learning rates
+ for k in self.optimizers:
+ keys = [k]
+ optims = [self.optimizers[k]]
+ if k == "critic":
+ # account for critic having one optimizer per ensemble member
+ keys = ["{}{}".format(k, critic_ind) for critic_ind in range(len(self.nets["critic"]))]
+ optims = self.optimizers[k]
+ for kp, optimizer in zip(keys, optims):
+ for i, param_group in enumerate(optimizer.param_groups):
+ loss_log["Optimizer/{}{}_lr".format(kp, i)] = param_group["lr"]
+
+ # extract relevant logs for critic, and actor
+ loss_log["Loss"] = 0.
+ for loss_logger in [self._log_critic_info, self._log_actor_info]:
+ this_log = loss_logger(info)
+ if "Loss" in this_log:
+ # manually merge total loss
+ loss_log["Loss"] += this_log["Loss"]
+ del this_log["Loss"]
+ loss_log.update(this_log)
+
+ return loss_log
+
+ def _log_critic_info(self, info):
+ """
+ Helper function to extract critic-relevant information for logging.
+ """
+ loss_log = OrderedDict()
+ if "done_masks" in info:
+ loss_log["Critic/Done_Mask_Percentage"] = 100. * torch.mean(info["done_masks"]).item()
+ if "critic/q_targets" in info:
+ loss_log["Critic/Q_Targets"] = info["critic/q_targets"].mean().item()
+ loss_log["Loss"] = 0.
+ for critic_ind in range(len(self.nets["critic"])):
+ loss_log["Critic/Critic{}_Loss".format(critic_ind + 1)] = info["critic/critic{}_loss".format(critic_ind + 1)].item()
+ if "critic/critic{}_grad_norms".format(critic_ind + 1) in info:
+ loss_log["Critic/Critic{}_Grad_Norms".format(critic_ind + 1)] = info["critic/critic{}_grad_norms".format(critic_ind + 1)]
+ loss_log["Loss"] += loss_log["Critic/Critic{}_Loss".format(critic_ind + 1)]
+ return loss_log
+
+ def _log_actor_info(self, info):
+ """
+ Helper function to extract actor-relevant information for logging.
+ """
+ loss_log = OrderedDict()
+ loss_log["Actor/Loss"] = info["actor/loss"].item()
+ if "actor/grad_norms" in info:
+ loss_log["Actor/Grad_Norms"] = info["actor/grad_norms"]
+ loss_log["Loss"] = loss_log["Actor/Loss"]
+ return loss_log
+
+ def set_train(self):
+ """
+ Prepare networks for evaluation. Update from super class to make sure
+ target networks stay in evaluation mode all the time.
+ """
+ self.nets.train()
+
+ # target networks always in eval
+ for critic_ind in range(len(self.nets["critic_target"])):
+ self.nets["critic_target"][critic_ind].eval()
+
+ self.nets["actor_target"].eval()
+
+ def on_epoch_end(self, epoch):
+ """
+ Called at the end of each epoch.
+ """
+
+ # LR scheduling updates
+ for lr_sc in self.lr_schedulers["critic"]:
+ if lr_sc is not None:
+ lr_sc.step()
+
+ if self.lr_schedulers["actor"] is not None:
+ self.lr_schedulers["actor"].step()
+
+ def get_action(self, obs_dict, goal_dict=None):
+ """
+ Get policy action outputs.
+
+ Args:
+ obs_dict (dict): current observation
+ goal_dict (dict): (optional) goal
+
+ Returns:
+ action (torch.Tensor): action tensor
+ """
+ assert not self.nets.training
+
+ return self.nets["actor"](obs_dict=obs_dict, goal_dict=goal_dict)
+
+ def get_state_value(self, obs_dict, goal_dict=None):
+ """
+ Get state value outputs.
+
+ Args:
+ obs_dict (dict): current observation
+ goal_dict (dict): (optional) goal
+
+ Returns:
+ value (torch.Tensor): value tensor
+ """
+ assert not self.nets.training
+
+ actions = self.nets["actor"](obs_dict=obs_dict, goal_dict=goal_dict)
+ return self.nets["critic"][0](obs_dict, actions, goal_dict)
+
+ def get_state_action_value(self, obs_dict, actions, goal_dict=None):
+ """
+ Get state-action value outputs.
+
+ Args:
+ obs_dict (dict): current observation
+ actions (torch.Tensor): action
+ goal_dict (dict): (optional) goal
+
+ Returns:
+ value (torch.Tensor): value tensor
+ """
+ assert not self.nets.training
+
+ return self.nets["critic"][0](obs_dict, actions, goal_dict)
diff --git a/code_src/rise_robomimic/robomimic/algo/wm_native_cem.py b/code_src/rise_robomimic/robomimic/algo/wm_native_cem.py
new file mode 100644
index 0000000000000000000000000000000000000000..9ad113726f7c8a642deb3f1d03a8f45b9ea7f9c0
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/algo/wm_native_cem.py
@@ -0,0 +1,392 @@
+"""DINO-WM / LeWM with their OWN published planner: CEM over the full open-loop action sequence.
+
+gen_q#289 (worker WM_NATIVE), the appendix row that answers "you didn't run the world models the way
+their authors did". This file is **additive and self-contained**: it imports `rsm_scorer.RSMScorer`
+READ-ONLY (only to build the observation state exactly the way every other column builds it) and
+touches nothing in `rsm_planner.py` / `rsm_scorer.py`. The shared-candidate protocol of the main
+table -- N=128 proposer draws, ranked -- is unreachable from here, and so is every cell on disk.
+
+WHAT THE PUBLISHED PLANNERS DO (verified at source 2026-09-25, not from memory; neither repo is
+vendored in this tree, so the settings were read off the upstream repo and the paper)
+---------------------------------------------------------------------------------------------------
+DINO-WM gaoyuezhou/dino_wm@main:conf/planner/mpc_cem.yaml
+ horizon 5 | num_samples 300 | topk 30 | var_scale 1 | opt_steps 30 | n_taken_actions 5
+ planning/cem.py: mu <- zeros (or the prior actions, zero-padded); sigma <- var_scale * ones;
+ per iteration mu = elites.mean(0), sigma = elites.std(0); NO momentum, NO smoothing, NO action
+ clipping; the planner returns the FINAL MU, not the best sample.
+LeWM arXiv 2603.19312, planning section, quoted:
+ horizon "5 steps, which corresponds to 25 environment timesteps due to the use of a frame skip of
+ 5" | "300 candidate action sequences" | "30 iterations in PushT and 10 iterations in the other
+ environments" | "top 30 trajectories are retained" | "initial sampling variance is set to 1" |
+ "entire optimized action sequence is executed before replanning".
+Both: deterministic predictor, ONE roll-out per sampled sequence, terminal goal-matching cost.
+
+WHAT WE CHANGE, AND WHY -- three items, all declared on #289
+---------------------------------------------------------------------------------------------------
+1. THE COST. RISE has no goal images, so the terminal goal distance is replaced by our learned reward
+ head, objective = the gamma-discounted sum of r_hat over the planned roll-out, normalised by the
+ weight sum so it stays a probability in [0, 1]. That is bit-for-bit the `mpc_disc` read-out the
+ flagship world-model columns already use (dwm_readout._q_once), so the native row and the shared
+ row differ in the SEARCH and not in the read-out. (Owner ruling: summing rewards over the
+ trajectory is standard.)
+2. THE ACTION GRANULARITY, and the LOOKAHEAD it does NOT buy equally. One model step here is one
+ 8-frame action CHUNK -- that is the action granularity both checkpoints were trained to step over
+ -- so a 5-step plan COMMITS 40 environment frames for both families (n_taken=5 chunks) and the CEM
+ search space is 5 x 8 x 7 = 280-d against ~10-20-d in the published tasks at the same 300 samples.
+ A far sparser search relative to dimension; stated, not hidden.
+ The PREDICTOR's advance per model step, however, is family-dependent, and an earlier version of
+ this comment wrongly claimed 40 frames of lookahead for both (corrected 2026-09-26, run 33, after
+ the finding was confirmed from the trainers by gen_q#288):
+ * DINO-WM: trained on (t -> t+chunk) targets (train_rsm_dwm._onestep_future: fut = t + d.chunk), so
+ `_score_dinowm`'s 5 steps DO look 40 frames ahead -- exactly the window it commits. Correct.
+ * LeWM: trained NEXT-FRAME (lewm_model.N_PREDS = 1; train_lewm.py:174 `tgt = emb[:, N_PREDS:]` over
+ CONSECUTIVE rows, lewm_data.sample: `fr[j] = buf[e][j0:j0+T]`), so `_score_lewm`'s 5 `step_emb`
+ calls look only 5 FRAMES ahead while the same 40 are committed, and the inherited gamma^(8k)
+ weights (self.w, from the shared read-out) discount 8 frames per step where 1 elapses.
+ This is NOT why the row reads 0%: CEM reaches its objective's ceiling (J_cem = 1.0000 pooled) and
+ the same rollout policy with CEM OFF (`-PASS`) scores 1.3-44.7% by task. It IS a real caveat on
+ the LeWM half and it is now stated in the appendix prose (scripts/wm_native_text.py) too.
+ NOT FIXED HERE ON PURPOSE: raising LeWM's horizon or changing self.w would re-define an arm that is
+ already measured and published (21 CEM decisions, 84 magnitude states, 6300 episodes). The arm key
+ carries H, so a deeper LeWM cell would be a NEW arm, not a correction of this one.
+3. HISTORY, and it is ASYMMETRIC because our two checkpoints differ.
+ * LeWM was trained with CTX = 3 (lewm_model.py:40) and the SHARED scorer had to fill its context by
+ repeating the single current frame (lewm_readout.py:109, its declared deviation 1), because
+ rsm_planner hands a scorer one frame. The native route owns its own ring buffer, so **LeWM
+ finally gets three REAL frames**. This is the one thing the native row can do that the shared
+ row structurally cannot. CAVEAT (measured, not assumed): those three frames are CHUNK-SPACED,
+ 8 apart, while LeWM's training rows are consecutive (see 2 above); our own n=252 probe found
+ 8-apart to be the worst of the three constructions (median L2 1.28 vs consecutive 1.03 and
+ repeat-current 1.14). So "real history" here means real frames, not the trained spacing.
+ * DINO-WM CANNOT: dwm_model.DWM.forward(tok_now, pr_now, a, ...) takes ONE frame. Our predictor
+ was trained history-1; three frames would need a fresh 100k-step training. So the DINO-WM native
+ row is history 1, declared, and the brief's "3 frames for both models" is not achievable here.
+
+NOT IMPLEMENTED ON PURPOSE: a stochastic / multi-continuation evaluation of a shared candidate set.
+That is sibling stream WM_MCBUNDLE (gen_q#288) and this file must never grow into it.
+"""
+from __future__ import annotations
+
+import json as _json
+import math
+import os
+import time
+from types import SimpleNamespace
+
+import numpy as np
+import torch
+
+from robomimic.algo.rsm_scorer import RSMScorer
+
+# The published defaults, keyed by family. `opt_steps` is the ONLY one that differs between them
+# (LeWM uses 30 in PushT and 10 elsewhere; our tasks are "elsewhere").
+PUBLISHED = {
+ "dinowm": dict(horizon=5, num_samples=300, topk=30, var_scale=1.0, opt_steps=30, n_taken=5),
+ "lewm": dict(horizon=5, num_samples=300, topk=30, var_scale=1.0, opt_steps=10, n_taken=5),
+}
+
+
+def arm_key(family, horizon, num_samples, opt_steps, topk, n_taken, warm=False, clip=None,
+ passthrough=False):
+ """The cell's arm key. It STARTS WITH `CEM` so it can never pool with a shared-candidate arm, and
+ it carries every setting that changes the search, so two different searches cannot collide."""
+ k = f"CEM-H{int(horizon)}-S{int(num_samples)}-I{int(opt_steps)}-T{int(topk)}-X{int(n_taken)}"
+ if clip is not None:
+ # `C05` = clipped to +-0.5. A DIFFERENT ARM, never folded into the as-published one: both
+ # papers explicitly do not clip (dino_wm/planning/cem.py), so a clipped cell is a variant.
+ k += "-C" + f"{float(clip):g}".replace(".", "p") # 0.5 -> "C0p5"
+ k += "-WARM" if warm else ""
+ # `-PASS`: the PIPELINE CONTROL, not a planner at all. The proposer's own chunk is executed
+ # through this exact rollout policy and CEM never runs, so a non-zero success rate here proves
+ # the native route can execute a good action sequence and an all-zero appendix row is the
+ # planner's result rather than my wiring. The `CEM` prefix is kept ONLY so the key still cannot
+ # pool with a shared-candidate arm; the suffix is what a reader must go by.
+ return k + ("-PASS" if passthrough else "")
+
+
+class NativeCEMPlanner:
+ """CEM over the full open-loop action sequence, with the model's own deterministic roll-out.
+
+ plan(obs_t) -> actions [n_taken * chunk, adim] (numpy, one env). The caller executes ALL of them
+ and calls plan() again -- the published receding-horizon protocol (`n_taken_actions: 5`).
+ """
+
+ def __init__(self, family, ckpt, feat_stats, device="cuda", *, horizon=None, num_samples=None,
+ opt_steps=None, topk=None, var_scale=None, n_taken=None, gamma=0.99, seed=0,
+ micro=150, img_layout="chw", warm_start=None, clip=None):
+ if family not in PUBLISHED:
+ raise ValueError(f"family must be one of {sorted(PUBLISHED)}, got {family!r}")
+ d = dict(PUBLISHED[family])
+ self.family = family
+ self.horizon = int(horizon if horizon is not None else d["horizon"])
+ self.num_samples = int(num_samples if num_samples is not None else d["num_samples"])
+ self.opt_steps = int(opt_steps if opt_steps is not None else d["opt_steps"])
+ self.topk = int(topk if topk is not None else d["topk"])
+ self.var_scale = float(var_scale if var_scale is not None else d["var_scale"])
+ self.n_taken = int(n_taken if n_taken is not None else d["n_taken"])
+ if not 1 <= self.n_taken <= self.horizon:
+ raise ValueError(f"n_taken must be in [1, horizon={self.horizon}], got {self.n_taken}")
+ if not 1 <= self.topk <= self.num_samples:
+ raise ValueError(f"topk must be in [1, num_samples], got {self.topk}")
+ self.gamma = float(gamma)
+ self.micro = int(micro)
+ self.device = torch.device(device)
+ self.warm_start = warm_start # optional callable(obs_t, S) -> [S, H, d_act]
+ # OPTIONAL VARIANT, off by default so the as-published cell is bit-identical to run 2's.
+ # `clip=0.5` bounds the search to the DATA'S OWN ACTION RANGE: robomimic normalises actions
+ # min-max to [-0.5, 0.5] (rollout_policy.unnormalize_actions:29), so the published var_scale=1
+ # puts ~96% of every sampled dimension outside the range any demonstration ever used, and the
+ # run-3 diagnostic measured returned |mu|_inf up to 9.0 = 18x the data range. Clipping is
+ # the ONE knob our action parameterisation forces; it is its own arm (`-C0p5`), never the
+ # as-published row.
+ self.clip = None if clip is None else float(clip)
+
+ # RSMScorer is used ONLY as the observation encoder, so the native route sees exactly the
+ # state every other column sees. `mode`/`depth`/`beta` are never consulted: we never call
+ # scorer.score(), only scorer.state_from_obs(). Built with mode='d1' so nothing in its
+ # constructor takes an MPC or chain code path.
+ backend = "dinowm" if family == "dinowm" else "lewm"
+ self.scorer = RSMScorer(backend=backend, ckpt=ckpt, feat_stats=feat_stats, mode="d1",
+ depth=1, device=str(self.device), img_layout=img_layout,
+ dwm_module="dinowm_readout")
+ self.core = self.scorer.backend.core
+ # Ask the SCORER, not the core: `chunk` lives on the backend for the dwm/dinowm family
+ # (DWMBackend reads it off core.config) and on the core for LeWM, so core.chunk exists on
+ # exactly one of the two. RSMScorer.{chunk,adim,d_act} is the one place both are resolved,
+ # and it is the same triple every shared-candidate column uses -- so the native route cannot
+ # disagree with the shared route about what one model step is.
+ self.d_act = int(self.scorer.d_act) # chunk * adim = 56
+ self.chunk = int(self.scorer.chunk) # 8 frames
+ self.adim = int(self.scorer.adim) # 7
+ # likewise mpc_hop_frames is the scorer's own `_hop_frames(beta)`-or-`hop_frames` lookup,
+ # which prints its source in the MPC banner. Both world models here answer 8.
+ self.hop_frames = float(self.scorer.mpc_hop_frames)
+ self.T = float(getattr(self.core, "temperature", 1.0) or 1.0)
+ # the mpc_disc weights, computed ONCE: gamma ** (hop_frames * k), normalised.
+ w = torch.tensor([self.gamma ** (self.hop_frames * k) for k in range(self.horizon)],
+ dtype=torch.float32, device=self.device)
+ self.w = w / w.sum()
+
+ self.g = torch.Generator(device=self.device)
+ self.seed = int(seed)
+ self.stats = []
+ # DIAGNOSTIC ONLY (run 3, gen_q#289). `WMNAT_DIAG=` instruments the FIRST k decisions of
+ # every episode: the per-iteration J trace, ||mu||, and the J of the all-zero sequence for
+ # scale. Off unless the env var is set, and it only PRINTS -- no cell's numbers, JSON or
+ # control flow change, so it is safe to have on disk while the production wave runs.
+ self.diag_n = int(os.environ.get("WMNAT_DIAG", "0") or 0)
+ self._diag_left = 0
+ self.reset()
+
+ # -- episode state ------------------------------------------------------------------------
+ def reset(self):
+ """New episode: reseed CEM and drop the frame/action history.
+
+ The generator is reseeded PER EPISODE rather than per decision so the 300x30 draws of one
+ episode are one stream (a per-decision reseed would make every decision of every episode use
+ the identical noise, which is not what either paper does)."""
+ self.g.manual_seed(self.seed)
+ self._queue = [] # chunks of the current plan still to execute
+ self._last_executed = None # the chunk that produced the frame now entering the history
+ self._frames = None # LeWM: [ctx, C, H, W] uint8 ring buffer of REAL frames
+ self._acts = None # LeWM: [ctx-1, d_act] the chunks actually executed at those frames
+ self.stats = []
+ self._diag_left = int(self.diag_n)
+
+ # -- the roll-out -------------------------------------------------------------------------
+ @torch.no_grad()
+ def _score_dinowm(self, st, seq):
+ """seq [S, H, d_act] -> J [S]. Deterministic latent roll-out, one roll-out per sequence.
+
+ Everything stays in the normaliser's space, which is where both _step and the reward head
+ live (dwm_readout.DWMCritic._prep / _q_once), so this is the same arithmetic the mpc_disc
+ cells run -- only the actions differ per step instead of coming from a hop head."""
+ c = self.core
+ S = seq.shape[0]
+ tz = c.norm.tok(torch.as_tensor(st.tok).to(self.device))
+ pz = (c.norm.pr(torch.as_tensor(st.pr).to(self.device).float().view(1, c.n_pr))
+ if c.n_pr else torch.zeros(1, 0, device=self.device))
+ tzr = tz.expand(S, *tz.shape[1:]).contiguous()
+ pzr = pz.expand(S, *pz.shape[1:]).contiguous()
+ bq = torch.zeros(S, device=self.device) # inert on DINO-WM (dinowm_readout._step)
+ J = torch.zeros(S, device=self.device)
+ for k in range(self.horizon):
+ ar = seq[:, k].contiguous()
+ tzr, pzr = c._step(tzr, pzr, ar, bq, S, 1, None, 8, self.micro)
+ with c.autocast():
+ lg = c.rew(tzr, pzr).float()
+ J = J + self.w[k] * torch.sigmoid(lg / self.T)
+ return torch.nan_to_num(J, nan=0.0)
+
+ @torch.no_grad()
+ def _score_lewm(self, st, seq):
+ """seq [S, H, d_act] -> J [S], with LeWM's REAL 3-frame history.
+
+ `self._frames` holds the last `ctx` frames actually observed and `self._acts` the chunks
+ actually executed at the first ctx-1 of them; the action at the LAST context slot is the
+ candidate's first chunk, which is what `LeWM.step_emb(emb[:, :ctx], act[:, :ctx])` was
+ trained on (lewm_model.py:192). After each model step the predicted embedding and the next
+ candidate chunk are appended, so the roll-out is open-loop in the model's own latent."""
+ c = self.core
+ S = seq.shape[0]
+ ctx = int(c.ctx)
+ with c.autocast():
+ z_hist = c.model.embed(self._frames.unsqueeze(0)) # [1, ctx, D]
+ z_hist = z_hist.float().expand(S, *z_hist.shape[1:]).contiguous()
+ a_hist = torch.cat([self._acts.unsqueeze(0).expand(S, ctx - 1, self.d_act),
+ seq[:, 0:1]], 1).contiguous() # [S, ctx, d_act]
+ J = torch.zeros(S, device=self.device)
+ for k in range(self.horizon):
+ with c.autocast():
+ z = c.model.step_emb(z_hist, a_hist)
+ lg = c.probe(z).float()
+ J = J + self.w[k] * torch.sigmoid(lg / self.T)
+ if k == self.horizon - 1:
+ break
+ z_hist = torch.cat([z_hist[:, 1:], z.float().unsqueeze(1)], 1)
+ a_hist = torch.cat([a_hist[:, 1:], seq[:, k + 1:k + 2]], 1)
+ return torch.nan_to_num(J, nan=0.0)
+
+ def _score(self, st, seq):
+ """Micro-batched over samples: 300 x 514 tokens is the same memory problem the shared scorer
+ has, and `micro` is purely a memory knob -- rows are independent and the CEM draws are made
+ once, up front, so the returned J is invariant to it."""
+ out = []
+ m = max(int(self.micro), 1)
+ fn = self._score_dinowm if self.family == "dinowm" else self._score_lewm
+ for i in range(0, seq.shape[0], m):
+ out.append(fn(st, seq[i:i + m]))
+ return torch.cat(out, 0)
+
+ # -- the planner --------------------------------------------------------------------------
+ @torch.no_grad()
+ def act(self, obs_t):
+ """obs_t: the CURRENT frame as a dict of [1, ...] tensors -> the next chunk [chunk, adim].
+
+ Called ONCE PER 8-FRAME CHUNK, and re-optimises only every `n_taken` calls -- the published
+ receding-horizon protocol (`n_taken_actions: 5` = execute the whole optimised sequence, then
+ replan), with the plan's remaining chunks served from a queue in between.
+
+ Why not return all `n_taken * chunk` actions in one call and let the rollout loop queue them:
+ because then this object would only SEE a frame every 40 environment frames, so the context
+ would be 40 apart instead of one chunk (8 frames) apart -- a silently different model input.
+ Being called every chunk costs nothing (the CEM runs on 1 call in `n_taken`) and keeps the
+ history at the chunk spacing the arm is defined at. NOTE (corrected run 33): 8-apart is NOT
+ LeWM's trained spacing -- train_lewm targets emb[:, 1:] over CONSECUTIVE rows -- so this
+ buys real frames at the chunk spacing, not at the spacing the predictor was fit on.
+ """
+ st = self.scorer.state_from_obs(obs_t)
+ if self.family == "lewm":
+ self._push_frame(st.img)
+ if not self._queue:
+ self._queue = list(self._cem(st, obs_t))
+ a = self._queue.pop(0)
+ self._last_executed = a
+ return a.reshape(self.chunk, self.adim).float().cpu().numpy()
+
+ @torch.no_grad()
+ def _cem(self, st, obs_t):
+ """One CEM optimisation at state `st` -> the first `n_taken` chunks of the final mu."""
+ t0 = time.time()
+ H, S, A = self.horizon, self.num_samples, self.d_act
+ mu = torch.zeros(H, A, device=self.device)
+ sigma = torch.full((H, A), self.var_scale, device=self.device)
+ if self.warm_start is not None:
+ # the OPTIONAL second variant (#289): a TD-MPC2-style policy prior. Published DINO-WM
+ # supports exactly this -- cem.py seeds mu from supplied prior actions -- so it is the
+ # same code path with a non-zero mu, never a different algorithm.
+ prior = torch.as_tensor(self.warm_start(obs_t, S)).to(self.device).float()
+ mu = prior.reshape(-1, H, A).mean(0)
+
+ diag = self._diag_left > 0
+ trace = []
+ j_best = float("nan")
+ for it in range(self.opt_steps):
+ eps = torch.randn(S, H, A, device=self.device, generator=self.g)
+ seq = mu.unsqueeze(0) + sigma.unsqueeze(0) * eps # NO clipping (as published)
+ if self.clip is not None:
+ seq = seq.clamp(-self.clip, self.clip) # the `-C0p5` variant only
+ J = self._score(st, seq)
+ idx = torch.topk(J, self.topk).indices
+ elites = seq[idx]
+ if diag:
+ # iteration 0 is the UNOPTIMISED N(0, var_scale) draw, so trace[0] IS the random
+ # baseline and the last entry is what CEM actually bought over it. No extra scoring.
+ trace.append(dict(it=it, j_max=float(J.max()), j_mean=float(J.mean()),
+ j_std=float(J.std()), j_elite=float(J[idx].mean()),
+ mu_absmax=float(mu.abs().max()), sig_mean=float(sigma.mean())))
+ mu = elites.mean(0)
+ sigma = elites.std(0)
+ j_best = float(J.max().item())
+ if self.clip is not None:
+ # the elite MEAN of clipped samples is inside the box already, but clamp the returned
+ # point too so the executed action can never leave the range the arm claims.
+ mu = mu.clamp(-self.clip, self.clip)
+ if diag:
+ self._diag_left -= 1
+ # J of the returned point (the final mu) and of the all-zero sequence -- 2 extra rows.
+ j_mu = float(self._score(st, mu.unsqueeze(0))[0])
+ j_zero = float(self._score(st, torch.zeros(1, H, A, device=self.device))[0])
+ print("[wm_cem_diag] " + _json.dumps(dict(
+ family=self.family, j_random_max=trace[0]["j_max"], j_random_mean=trace[0]["j_mean"],
+ j_final_max=trace[-1]["j_max"], j_final_mean=trace[-1]["j_mean"],
+ j_of_returned_mu=j_mu, j_of_zero_action=j_zero,
+ mu_absmax=float(mu.abs().max()), mu_l2=float(mu.norm()),
+ sigma_mean_final=float(sigma.mean()), trace=trace), default=float), flush=True)
+ self.stats.append(dict(t_plan_s=time.time() - t0, j_best=j_best,
+ sigma_mean=float(sigma.mean().item())))
+ return [mu[k] for k in range(self.n_taken)]
+
+ # -- LeWM's real history ------------------------------------------------------------------
+ def _push_frame(self, img):
+ """img [1, C, res, res] from RSMScorer.state_from_obs (lewm_data.frames_from_obs).
+
+ At the first decision of an episode there is no history: the buffer is filled by repeating
+ the first frame with ZERO past actions. That is the same cold-start every receding-horizon
+ controller has, it lasts one decision, and it is stated rather than hidden."""
+ c = self.core
+ ctx = int(c.ctx)
+ f = torch.as_tensor(img).to(self.device)[0]
+ if f.dtype.is_floating_point:
+ # the SAME transform lewm_readout._prep applies: the planner's frames are float in [0,1]
+ # and LeWM.embed was trained on uint8. Doing it here (once per frame) rather than at
+ # score time keeps the ring buffer in the model's own input dtype.
+ f = (f.clamp(0, 1) * 255.0).round().to(torch.uint8)
+ if self._frames is None:
+ self._frames = f.unsqueeze(0).repeat(ctx, *([1] * f.dim()))
+ self._acts = torch.zeros(ctx - 1, self.d_act, device=self.device)
+ return
+ self._frames = torch.cat([self._frames[1:], f.unsqueeze(0)], 0)
+ # the chunk executed at the frame that just left the "current" slot
+ last = self._last_executed
+ a = last if last is not None else torch.zeros(self.d_act, device=self.device)
+ self._acts = torch.cat([self._acts[1:], a.unsqueeze(0)], 0)
+
+ # -- provenance ---------------------------------------------------------------------------
+ def describe(self):
+ d = dict(planner="native_cem", family=self.family, horizon=self.horizon,
+ num_samples=self.num_samples, opt_steps=self.opt_steps, topk=self.topk,
+ var_scale=self.var_scale, n_taken=self.n_taken, gamma=self.gamma,
+ hop_frames=self.hop_frames, chunk=self.chunk, adim=self.adim, d_act=self.d_act,
+ frames_per_plan=self.n_taken * self.chunk, frames_per_call=self.chunk, seed=self.seed,
+ temperature=self.T, clipping=self.clip, returns="final_mu",
+ objective="mpc_disc: sum_k gamma**(hop_frames*k) sigmoid(R(z_k)) / sum_k w_k",
+ warm_start=self.warm_start is not None,
+ arm=arm_key(self.family, self.horizon, self.num_samples, self.opt_steps,
+ self.topk, self.n_taken, self.warm_start is not None, self.clip))
+ d["history"] = int(getattr(self.core, "ctx", 1))
+ d["history_real"] = (self.family == "lewm")
+ try:
+ d["scorer"] = self.scorer.describe()
+ except Exception as e: # a description must never break an eval
+ d["scorer"] = {"error": repr(e)}
+ return d
+
+ def pop_stats(self):
+ s, self.stats = self.stats, []
+ if not s:
+ return {}
+ return dict(decisions=len(s),
+ t_plan_s=float(sum(x["t_plan_s"] for x in s)),
+ j_best_mean=float(np.mean([x["j_best"] for x in s])),
+ sigma_mean=float(np.mean([x["sigma_mean"] for x in s])))
diff --git a/code_src/rise_robomimic/robomimic/config/__init__.py b/code_src/rise_robomimic/robomimic/config/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..eca0f01bcf18384c03273cefb3a3c6e993617ae3
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/config/__init__.py
@@ -0,0 +1,16 @@
+from robomimic.config.config import Config
+from robomimic.config.base_config import config_factory, get_all_registered_configs
+
+# note: these imports are needed to register these classes in the global config registry
+from robomimic.config.bc_config import BCConfig
+from robomimic.config.bcq_config import BCQConfig
+from robomimic.config.cql_config import CQLConfig
+from robomimic.config.iql_config import IQLConfig
+from robomimic.config.gl_config import GLConfig
+from robomimic.config.hbc_config import HBCConfig
+from robomimic.config.iris_config import IRISConfig
+from robomimic.config.td3_bc_config import TD3_BCConfig
+from robomimic.config.idql_config import IDQLConfig
+from robomimic.config.idql_qsm_config import IDQL_QSMConfig
+from robomimic.config.iql_diffusion_config import IQLDiffusionConfig
+from robomimic.config.discriminator_config import DiscriminatorConfig
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/config/base_config.py b/code_src/rise_robomimic/robomimic/config/base_config.py
new file mode 100644
index 0000000000000000000000000000000000000000..5992146aacdb48bd35bee237981e8f8c7a6473c0
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/config/base_config.py
@@ -0,0 +1,329 @@
+"""
+The base config class that is used for all algorithm configs in this repository.
+Subclasses get registered into a global dictionary, making it easy to instantiate
+the correct config class given the algorithm name.
+"""
+
+import six # preserve metaclass compatibility between python 2 and 3
+from copy import deepcopy
+
+import robomimic
+from robomimic.config.config import Config
+
+# global dictionary for remembering name - class mappings
+REGISTERED_CONFIGS = {}
+
+
+def get_all_registered_configs():
+ """
+ Give access to dictionary of all registered configs for external use.
+ """
+ return deepcopy(REGISTERED_CONFIGS)
+
+
+def config_factory(algo_name, dic=None):
+ """
+ Creates an instance of a config from the algo name. Optionally pass
+ a dictionary to instantiate the config from the dictionary.
+ """
+ if algo_name not in REGISTERED_CONFIGS:
+ raise Exception("Config for algo name {} not found. Make sure it is a registered config among: {}".format(
+ algo_name, ', '.join(REGISTERED_CONFIGS)))
+ return REGISTERED_CONFIGS[algo_name](dict_to_load=dic)
+
+
+class ConfigMeta(type):
+ """
+ Define a metaclass for constructing a config class.
+ It registers configs into the global registry.
+ """
+ def __new__(meta, name, bases, class_dict):
+ cls = super(ConfigMeta, meta).__new__(meta, name, bases, class_dict)
+ if cls.__name__ != "BaseConfig":
+ REGISTERED_CONFIGS[cls.ALGO_NAME] = cls
+ return cls
+
+
+@six.add_metaclass(ConfigMeta)
+class BaseConfig(Config):
+ def __init__(self, dict_to_load=None):
+ if dict_to_load is not None:
+ super(BaseConfig, self).__init__(dict_to_load)
+ return
+
+ super(BaseConfig, self).__init__()
+
+ # store algo name class property in the config (must be implemented by subclasses)
+ self.algo_name = type(self).ALGO_NAME
+
+ self.experiment_config()
+ self.train_config()
+ self.algo_config()
+ self.observation_config()
+ self.meta_config()
+
+ # After Config init, new keys cannot be added to the config, except under nested
+ # attributes that have called @do_not_lock_keys
+ self.lock_keys()
+
+ @property
+ @classmethod
+ def ALGO_NAME(cls):
+ # must be specified by subclasses
+ raise NotImplementedError
+
+ def experiment_config(self):
+ """
+ This function populates the `config.experiment` attribute of the config,
+ which has several experiment settings such as the name of the training run,
+ whether to do logging, whether to save models (and how often), whether to render
+ videos, and whether to do rollouts (and how often). This class has a default
+ implementation that usually doesn't need to be overriden.
+ """
+
+ self.experiment.name = "test" # name of experiment used to make log files
+ self.experiment.validate = False # whether to do validation or not
+ self.experiment.logging.terminal_output_to_txt = True # whether to log stdout to txt file
+ self.experiment.logging.log_tb = True # enable tensorboard logging
+ self.experiment.logging.log_wandb = False # enable wandb logging
+ self.experiment.logging.wandb_proj_name = "debug" # project name if using wandb
+
+
+ ## save config - if and when to save model checkpoints ##
+ self.experiment.save.enabled = True # whether model saving should be enabled or disabled
+ self.experiment.save.every_n_seconds = None # save model every n seconds (set to None to disable)
+ self.experiment.save.every_n_epochs = 50 # save model every n epochs (set to None to disable)
+ self.experiment.save.epochs = [] # save model on these specific epochs
+ self.experiment.save.on_best_validation = False # save models that achieve best validation score
+ self.experiment.save.on_best_rollout_return = False # save models that achieve best rollout return
+ self.experiment.save.on_best_rollout_success_rate = True # save models that achieve best success rate
+
+ # epoch definitions - if not None, set an epoch to be this many gradient steps, else the full dataset size will be used
+ self.experiment.epoch_every_n_steps = 100 # number of gradient steps in train epoch (None for full dataset pass)
+ self.experiment.validation_epoch_every_n_steps = 10 # number of gradient steps in valid epoch (None for full dataset pass)
+
+ # envs to evaluate model on (assuming rollouts are enabled), to override the metadata stored in dataset
+ self.experiment.env = None # no need to set this (unless you want to override)
+ self.experiment.additional_envs = None # additional environments that should get evaluated
+
+
+ ## rendering config ##
+ self.experiment.render = False # render on-screen or not
+ self.experiment.render_video = True # render evaluation rollouts to videos
+ self.experiment.keep_all_videos = False # save all videos, instead of only saving those for saved model checkpoints
+ self.experiment.video_skip = 5 # render video frame every n environment steps during rollout
+
+
+ ## evaluation rollout config ##
+ self.experiment.rollout.enabled = True # enable evaluation rollouts
+ self.experiment.rollout.n = 50 # number of rollouts per evaluation
+ self.experiment.rollout.horizon = 400 # maximum number of env steps per rollout
+ self.experiment.rollout.rate = 50 # do rollouts every @rate epochs
+ self.experiment.rollout.warmstart = 0 # number of epochs to wait before starting rollouts
+ self.experiment.rollout.terminate_on_success = True # end rollout early after task success
+
+ def train_config(self):
+ """
+ This function populates the `config.train` attribute of the config, which
+ has several settings related to the training process, such as the dataset
+ to use for training, and how the data loader should load the data. This
+ class has a default implementation that usually doesn't need to be overriden.
+ """
+
+ # Path to hdf5 dataset to use for training
+ self.train.data = None
+
+ # Write all results to this directory. A new folder with the timestamp will be created
+ # in this directory, and it will contain three subfolders - "log", "models", and "videos".
+ # The "log" directory will contain tensorboard and stdout txt logs. The "models" directory
+ # will contain saved model checkpoints. The "videos" directory contains evaluation rollout
+ # videos.
+ self.train.output_dir = "../{}_trained_models".format(self.algo_name)
+
+
+ ## dataset loader config ##
+
+ # num workers for loading data - generally set to 0 for low-dim datasets, and 2 for image datasets
+ self.train.num_data_workers = 0
+
+ # One of ["all", "low_dim", or None]. Set to "all" to cache entire hdf5 in memory - this is
+ # by far the fastest for data loading. Set to "low_dim" to cache all non-image data. Set
+ # to None to use no caching - in this case, every batch sample is retrieved via file i/o.
+ # You should almost never set this to None, even for large image datasets.
+ self.train.hdf5_cache_mode = "all"
+
+ # used for parallel data loading
+ self.train.hdf5_use_swmr = True
+
+ # whether to load "next_obs" group from hdf5 - only needed for batch / offline RL algorithms
+ self.train.hdf5_load_next_obs = True
+
+ # if true, normalize observations at train and test time, using the global mean and standard deviation
+ # of each observation in each dimension, computed across the training set. See SequenceDataset.normalize_obs
+ # in utils/dataset.py for more information.
+ self.train.hdf5_normalize_obs = False
+
+ # if provided, use the list of demo keys under the hdf5 group "mask/@hdf5_filter_key" for training, instead
+ # of the full dataset. This provides a convenient way to train on only a subset of the trajectories in a dataset.
+ self.train.hdf5_filter_key = None
+
+ # if provided, use the list of demo keys under the hdf5 group "mask/@hdf5_validation_filter_key" for validation.
+ # Must be provided if @experiment.validate is True.
+ self.train.hdf5_validation_filter_key = None
+
+ # length of experience sequence to fetch from the dataset
+ # and whether to pad the beginning / end of the sequence at boundaries of trajectory in dataset
+ self.train.seq_length = 1
+ self.train.pad_seq_length = True
+ self.train.frame_stack = 1
+ self.train.pad_frame_stack = True
+
+ # keys from hdf5 to load into each batch, besides "obs" and "next_obs". If algorithms
+ # require additional keys from each trajectory in the hdf5, they should be specified here.
+ self.train.dataset_keys = (
+ "actions",
+ "rewards",
+ "dones",
+ )
+
+ # one of [None, "last"] - set to "last" to include goal observations in each batch
+ self.train.goal_mode = None
+
+ self.train.augment_nearby_states = False
+ self.train.distance_threshold = 0.0
+ self.train.num_neighbors = 10
+ self.train.advanced_augmentation = False
+ self.train.augment_init_cutoff_thresh = 50
+ self.train.augment_init_cutoff_thresh_expert = 20
+ self.train.gripper_key = None
+ self.train.augment_play = True
+ self.train.mask_augmentation = False
+ self.train.proprio_keys = None
+ # rsm_rise gen_q#265 (actor sweep): expert:play sampling mixture. None = natural mixture (released
+ # behaviour, uniform over sequences); r = expert:play sequences drawn in the ratio r:1 in expectation
+ # (SequenceDataset.sequence_weights). Recorded in the run's config.json like every other train key.
+ self.train.expert_play_ratio = None
+ # rsm_rise gen_q#265 wave 2: True rewrites every demo's `dones` to 0 except the last frame (=1) at load
+ # time (SequenceDataset.get_dataset_for_ep). The released files carry the task-success flag as `dones`
+ # (threading: 1 over the last 3-14 frames of every expert demo; two_piece: no dones at all), which cuts
+ # a provenance critic's bootstrap short of the goal. False = released behaviour.
+ self.train.done_mode_terminal_only = False
+
+ ## learning config ##
+ self.train.cuda = True # use GPU or not
+ self.train.batch_size = 100 # batch size
+ self.train.num_epochs = 2000 # number of training epochs
+ self.train.seed = 1 # seed for training (for reproducibility)
+
+ def algo_config(self):
+ """
+ This function populates the `config.algo` attribute of the config, and is given to the
+ `Algo` subclass (see `algo/algo.py`) for each algorithm through the `algo_config`
+ argument to the constructor. Any parameter that an algorithm needs to determine its
+ training and test-time behavior should be populated here. This function should be
+ implemented by every subclass.
+ """
+ pass
+
+ def observation_config(self):
+ """
+ This function populates the `config.observation` attribute of the config, and is given
+ to the `Algo` subclass (see `algo/algo.py`) for each algorithm through the `obs_config`
+ argument to the constructor. This portion of the config is used to specify what
+ observation modalities should be used by the networks for training, and how the
+ observation modalities should be encoded by the networks. While this class has a
+ default implementation that usually doesn't need to be overriden, certain algorithm
+ configs may choose to, in order to have seperate configs for different networks
+ in the algorithm.
+ """
+
+ # observation modalities
+ self.observation.modalities.obs.low_dim = [ # specify low-dim observations for agent
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object",
+ ]
+ self.observation.modalities.obs.rgb = [] # specify rgb image observations for agent
+ self.observation.modalities.obs.depth = []
+ self.observation.modalities.obs.scan = []
+ self.observation.modalities.goal.low_dim = [] # specify low-dim goal observations to condition agent on
+ self.observation.modalities.goal.rgb = [] # specify rgb image goal observations to condition agent on
+ self.observation.modalities.goal.depth = []
+ self.observation.modalities.goal.scan = []
+ self.observation.modalities.obs.do_not_lock_keys()
+ self.observation.modalities.goal.do_not_lock_keys()
+
+ # observation encoder architectures (per obs modality)
+ # This applies to all networks that take observation dicts as input
+
+ # =============== Low Dim default encoder (no encoder) ===============
+ self.observation.encoder.low_dim.core_class = None
+ self.observation.encoder.low_dim.core_kwargs = Config() # No kwargs by default
+ self.observation.encoder.low_dim.core_kwargs.do_not_lock_keys()
+
+ # Low Dim: Obs Randomizer settings
+ self.observation.encoder.low_dim.obs_randomizer_class = None
+ self.observation.encoder.low_dim.obs_randomizer_kwargs = Config() # No kwargs by default
+ self.observation.encoder.low_dim.obs_randomizer_kwargs.do_not_lock_keys()
+
+ # =============== RGB default encoder (ResNet backbone + linear layer output) ===============
+ self.observation.encoder.rgb.core_class = "VisualCore" # Default VisualCore class combines backbone (like ResNet-18) with pooling operation (like spatial softmax)
+ self.observation.encoder.rgb.core_kwargs = Config() # See models/obs_core.py for important kwargs to set and defaults used
+ self.observation.encoder.rgb.core_kwargs.do_not_lock_keys()
+
+ # RGB: Obs Randomizer settings
+ self.observation.encoder.rgb.obs_randomizer_class = None # Can set to 'CropRandomizer' to use crop randomization
+ self.observation.encoder.rgb.obs_randomizer_kwargs = Config() # See models/obs_core.py for important kwargs to set and defaults used
+ self.observation.encoder.rgb.obs_randomizer_kwargs.do_not_lock_keys()
+
+ # Allow for other custom modalities to be specified
+ self.observation.encoder.do_not_lock_keys()
+
+ # =============== Depth default encoder (same as rgb) ===============
+ self.observation.encoder.depth = deepcopy(self.observation.encoder.rgb)
+
+ # =============== Scan default encoder (Conv1d backbone + linear layer output) ===============
+ self.observation.encoder.scan = deepcopy(self.observation.encoder.rgb)
+
+ # Scan: Modify the core class + kwargs, otherwise, is same as rgb encoder
+ self.observation.encoder.scan.core_class = "ScanCore" # Default ScanCore class uses Conv1D to process this modality
+ self.observation.encoder.scan.core_kwargs = Config() # See models/obs_core.py for important kwargs to set and defaults used
+ self.observation.encoder.scan.core_kwargs.do_not_lock_keys()
+
+ def meta_config(self):
+ """
+ This function populates the `config.meta` attribute of the config. This portion of the config
+ is used to specify job information primarily for hyperparameter sweeps.
+ It contains hyperparameter keys and values, which are populated automatically
+ by the hyperparameter config generator (see `utils/hyperparam_utils.py`).
+ These values are read by the wandb logger (see `utils/log_utils.py`) to set job tags.
+ """
+
+ self.meta.hp_base_config_file = None # base config file in hyperparam sweep
+ self.meta.hp_keys = [] # relevant keys (swept) in hyperparam sweep
+ self.meta.hp_values = [] # values corresponding to keys in hyperparam sweep
+
+ @property
+ def use_goals(self):
+ # whether the agent is goal-conditioned
+ return len([obs_key for modality in self.observation.modalities.goal.values() for obs_key in modality]) > 0
+
+ @property
+ def all_obs_keys(self):
+ """
+ This grabs the union of observation keys over all modalities (e.g.: low_dim, rgb, depth, etc.) and over all
+ modality groups (e.g: obs, goal, subgoal, etc...)
+
+ Returns:
+ n-array: all observation keys used for this model
+ """
+ # pool all modalities
+ return sorted(tuple(set([
+ obs_key for group in [
+ self.observation.modalities.obs.values(),
+ self.observation.modalities.goal.values()
+ ]
+ for modality in group
+ for obs_key in modality
+ ])))
diff --git a/code_src/rise_robomimic/robomimic/config/bc_config.py b/code_src/rise_robomimic/robomimic/config/bc_config.py
new file mode 100644
index 0000000000000000000000000000000000000000..1f701c685e9deb7755729d446ff272ba52a5ccc1
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/config/bc_config.py
@@ -0,0 +1,106 @@
+"""
+Config for BC algorithm.
+"""
+
+from robomimic.config.base_config import BaseConfig
+
+
+class BCConfig(BaseConfig):
+ ALGO_NAME = "bc"
+
+ def train_config(self):
+ """
+ BC algorithms don't need "next_obs" from hdf5 - so save on storage and compute by disabling it.
+ """
+ super(BCConfig, self).train_config()
+ self.train.hdf5_load_next_obs = False
+
+ def algo_config(self):
+ """
+ This function populates the `config.algo` attribute of the config, and is given to the
+ `Algo` subclass (see `algo/algo.py`) for each algorithm through the `algo_config`
+ argument to the constructor. Any parameter that an algorithm needs to determine its
+ training and test-time behavior should be populated here.
+ """
+
+ # optimization parameters
+ self.algo.optim_params.policy.optimizer_type = "adam"
+ self.algo.optim_params.policy.learning_rate.initial = 1e-4 # policy learning rate
+ self.algo.optim_params.policy.learning_rate.decay_factor = 0.1 # factor to decay LR by (if epoch schedule non-empty)
+ self.algo.optim_params.policy.learning_rate.epoch_schedule = [] # epochs where LR decay occurs
+ self.algo.optim_params.policy.learning_rate.scheduler_type = "multistep" # learning rate scheduler ("multistep", "linear", etc)
+ self.algo.optim_params.policy.regularization.L2 = 0.00 # L2 regularization strength
+
+ # loss weights
+ self.algo.loss.l2_weight = 1.0 # L2 loss weight
+ self.algo.loss.l1_weight = 0.0 # L1 loss weight
+ self.algo.loss.cos_weight = 0.0 # cosine loss weight
+
+ # MLP network architecture (layers after observation encoder and RNN, if present)
+ self.algo.actor_layer_dims = (1024, 1024)
+
+ # stochastic Gaussian policy settings
+ self.algo.gaussian.enabled = False # whether to train a Gaussian policy
+ self.algo.gaussian.fixed_std = False # whether to train std output or keep it constant
+ self.algo.gaussian.init_std = 0.1 # initial standard deviation (or constant)
+ self.algo.gaussian.min_std = 0.01 # minimum std output from network
+ self.algo.gaussian.std_activation = "softplus" # activation to use for std output from policy net
+ self.algo.gaussian.low_noise_eval = True # low-std at test-time
+
+ # stochastic GMM policy settings
+ self.algo.gmm.enabled = False # whether to train a GMM policy
+ self.algo.gmm.num_modes = 5 # number of GMM modes
+ self.algo.gmm.min_std = 0.0001 # minimum std output from network
+ self.algo.gmm.std_activation = "softplus" # activation to use for std output from policy net
+ self.algo.gmm.low_noise_eval = True # low-std at test-time
+
+ # stochastic VAE policy settings
+ self.algo.vae.enabled = False # whether to train a VAE policy
+ self.algo.vae.latent_dim = 14 # VAE latent dimnsion - set to twice the dimensionality of action space
+ self.algo.vae.latent_clip = None # clip latent space when decoding (set to None to disable)
+ self.algo.vae.kl_weight = 1. # beta-VAE weight to scale KL loss relative to reconstruction loss in ELBO
+
+ # VAE decoder settings
+ self.algo.vae.decoder.is_conditioned = True # whether decoder should condition on observation
+ self.algo.vae.decoder.reconstruction_sum_across_elements = False # sum instead of mean for reconstruction loss
+
+ # VAE prior settings
+ self.algo.vae.prior.learn = False # learn Gaussian / GMM prior instead of N(0, 1)
+ self.algo.vae.prior.is_conditioned = False # whether to condition prior on observations
+ self.algo.vae.prior.use_gmm = False # whether to use GMM prior
+ self.algo.vae.prior.gmm_num_modes = 10 # number of GMM modes
+ self.algo.vae.prior.gmm_learn_weights = False # whether to learn GMM weights
+ self.algo.vae.prior.use_categorical = False # whether to use categorical prior
+ self.algo.vae.prior.categorical_dim = 10 # the number of categorical classes for each latent dimension
+ self.algo.vae.prior.categorical_gumbel_softmax_hard = False # use hard selection in forward pass
+ self.algo.vae.prior.categorical_init_temp = 1.0 # initial gumbel-softmax temp
+ self.algo.vae.prior.categorical_temp_anneal_step = 0.001 # linear temp annealing rate
+ self.algo.vae.prior.categorical_min_temp = 0.3 # lowest gumbel-softmax temp
+
+ self.algo.vae.encoder_layer_dims = (300, 400) # encoder MLP layer dimensions
+ self.algo.vae.decoder_layer_dims = (300, 400) # decoder MLP layer dimensions
+ self.algo.vae.prior_layer_dims = (300, 400) # prior MLP layer dimensions (if learning conditioned prior)
+
+ # RNN policy settings
+ self.algo.rnn.enabled = False # whether to train RNN policy
+ self.algo.rnn.horizon = 10 # unroll length for RNN - should usually match train.seq_length
+ self.algo.rnn.hidden_dim = 400 # hidden dimension size
+ self.algo.rnn.rnn_type = "LSTM" # rnn type - one of "LSTM" or "GRU"
+ self.algo.rnn.num_layers = 2 # number of RNN layers that are stacked
+ self.algo.rnn.open_loop = False # if True, action predictions are only based on a single observation (not sequence)
+ self.algo.rnn.kwargs.bidirectional = False # rnn kwargs
+ self.algo.rnn.kwargs.do_not_lock_keys()
+
+ # Transformer policy settings
+ self.algo.transformer.enabled = False # whether to train transformer policy
+ self.algo.transformer.context_length = 10 # length of (s, a) seqeunces to feed to transformer - should usually match train.frame_stack
+ self.algo.transformer.embed_dim = 512 # dimension for embeddings used by transformer
+ self.algo.transformer.num_layers = 6 # number of transformer blocks to stack
+ self.algo.transformer.num_heads = 8 # number of attention heads for each transformer block (should divide embed_dim evenly)
+ self.algo.transformer.emb_dropout = 0.1 # dropout probability for embedding inputs in transformer
+ self.algo.transformer.attn_dropout = 0.1 # dropout probability for attention outputs for each transformer block
+ self.algo.transformer.block_output_dropout = 0.1 # dropout probability for final outputs for each transformer block
+ self.algo.transformer.sinusoidal_embedding = False # if True, use standard positional encodings (sin/cos)
+ self.algo.transformer.activation = "gelu" # activation function for MLP in Transformer Block
+ self.algo.transformer.supervise_all_steps = False # if true, supervise all intermediate actions, otherwise only final one
+ self.algo.transformer.nn_parameter_for_timesteps = True # if true, use nn.Parameter otherwise use nn.Embedding
diff --git a/code_src/rise_robomimic/robomimic/config/bcq_config.py b/code_src/rise_robomimic/robomimic/config/bcq_config.py
new file mode 100644
index 0000000000000000000000000000000000000000..e28f5ba5668aa2e5e6d9ca2187953a4e05b56a7d
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/config/bcq_config.py
@@ -0,0 +1,83 @@
+"""
+Config for BCQ algorithm.
+"""
+
+from robomimic.config.base_config import BaseConfig
+from robomimic.config.bc_config import BCConfig
+
+
+class BCQConfig(BaseConfig):
+ ALGO_NAME = "bcq"
+
+ def algo_config(self):
+ """
+ This function populates the `config.algo` attribute of the config, and is given to the
+ `Algo` subclass (see `algo/algo.py`) for each algorithm through the `algo_config`
+ argument to the constructor. Any parameter that an algorithm needs to determine its
+ training and test-time behavior should be populated here.
+ """
+
+ # optimization parameters
+ self.algo.optim_params.critic.learning_rate.initial = 1e-3 # critic learning rate
+ self.algo.optim_params.critic.learning_rate.decay_factor = 0.1 # factor to decay LR by (if epoch schedule non-empty)
+ self.algo.optim_params.critic.learning_rate.epoch_schedule = [] # epochs where LR decay occurs
+ self.algo.optim_params.critic.regularization.L2 = 0.00 # L2 regularization strength
+ self.algo.optim_params.critic.start_epoch = -1 # number of epochs before starting critic training (-1 means start right away)
+ self.algo.optim_params.critic.end_epoch = -1 # number of epochs before ending critic training (-1 means start right away)
+
+ self.algo.optim_params.action_sampler.learning_rate.initial = 1e-3 # action sampler learning rate
+ self.algo.optim_params.action_sampler.learning_rate.decay_factor = 0.1 # factor to decay LR by (if epoch schedule non-empty)
+ self.algo.optim_params.action_sampler.learning_rate.epoch_schedule = [] # epochs where LR decay occurs
+ self.algo.optim_params.action_sampler.regularization.L2 = 0.00 # L2 regularization strength
+ self.algo.optim_params.action_sampler.start_epoch = -1 # number of epochs before starting action sampler training (-1 means start right away)
+ self.algo.optim_params.action_sampler.end_epoch = -1 # number of epochs before ending action sampler training (-1 means start right away)
+
+ self.algo.optim_params.actor.learning_rate.initial = 1e-3 # actor learning rate
+ self.algo.optim_params.actor.learning_rate.decay_factor = 0.1 # factor to decay LR by (if epoch schedule non-empty)
+ self.algo.optim_params.actor.learning_rate.epoch_schedule = [] # epochs where LR decay occurs
+ self.algo.optim_params.actor.regularization.L2 = 0.00 # L2 regularization strength
+ self.algo.optim_params.actor.start_epoch = -1 # number of epochs before starting actor training (-1 means start right away)
+ self.algo.optim_params.actor.end_epoch = -1 # number of epochs before ending actor training (-1 means start right away)
+
+ # target network related parameters
+ self.algo.discount = 0.99 # discount factor to use
+ self.algo.n_step = 1 # for using n-step returns in TD-updates
+ self.algo.target_tau = 0.005 # update rate for target networks
+ self.algo.infinite_horizon = False # if True, scale terminal rewards by 1 / (1 - discount) to treat as infinite horizon
+
+ # ================== Critic Network Config ===================
+ self.algo.critic.use_huber = False # Huber Loss instead of L2 for critic
+ self.algo.critic.max_gradient_norm = None # L2 gradient clipping for critic (None to use no clipping)
+ self.algo.critic.value_bounds = None # optional 2-tuple to ensure lower and upper bound on value estimates
+ self.algo.critic.num_action_samples = 10 # number of actions to sample per training batch to get target critic value
+ self.algo.critic.num_action_samples_rollout = 100 # number of actions to sample per environment step
+
+ # critic ensemble parameters (TD3 trick)
+ self.algo.critic.ensemble.n = 2 # number of Q networks in the ensemble
+ self.algo.critic.ensemble.weight = 0.75 # weighting for mixing min and max for target Q value
+
+ # distributional critic
+ self.algo.critic.distributional.enabled = False # train distributional critic (C51)
+ self.algo.critic.distributional.num_atoms = 51 # number of values in categorical distribution
+
+ self.algo.critic.layer_dims = (300, 400) # size of critic MLP
+
+ # ================== Action Sampler Config ===================
+ self.algo.action_sampler = BCConfig().algo
+ # use VAE by default
+ self.algo.action_sampler.vae.enabled = True
+ # remove unused parts of BCConfig algo config
+ del self.algo.action_sampler.optim_params # since action sampler optim params specified at top-level
+ del self.algo.action_sampler.loss
+ del self.algo.action_sampler.gaussian
+ del self.algo.action_sampler.rnn
+ del self.algo.action_sampler.transformer
+
+ # Number of epochs before freezing encoder (-1 for no freezing). Only applies to cVAE-based action samplers.
+ with self.algo.action_sampler.unlocked():
+ self.algo.action_sampler.freeze_encoder_epoch = -1
+
+ # ================== Actor Network Config ===================
+ self.algo.actor.enabled = False # whether to use the actor perturbation network
+ self.algo.actor.perturbation_scale = 0.05 # size of learned action perturbations
+ self.algo.actor.layer_dims = (300, 400) # size of actor MLP
diff --git a/code_src/rise_robomimic/robomimic/config/config.py b/code_src/rise_robomimic/robomimic/config/config.py
new file mode 100644
index 0000000000000000000000000000000000000000..74da6535b385f91aa5c34e20af731ba2e3d06ecb
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/config/config.py
@@ -0,0 +1,322 @@
+"""
+Basic config class - provides a convenient way to work with nested
+dictionaries (by exposing keys as attributes) and to save / load from jsons.
+
+Based on addict: https://github.com/mewwts/addict
+"""
+
+import json
+import copy
+import contextlib
+from copy import deepcopy
+
+
+class Config(dict):
+
+ def __init__(__self, *args, **kwargs):
+ object.__setattr__(__self, '__key_locked', False) # disallow adding new keys
+ object.__setattr__(__self, '__all_locked', False) # disallow both key and value update
+ object.__setattr__(__self, '__do_not_lock_keys', False) # cannot be key-locked
+ object.__setattr__(__self, '__parent', kwargs.pop('__parent', None))
+ object.__setattr__(__self, '__key', kwargs.pop('__key', None))
+ for arg in args:
+ if not arg:
+ continue
+ elif isinstance(arg, dict):
+ for key, val in arg.items():
+ __self[key] = __self._hook(val)
+ elif isinstance(arg, tuple) and (not isinstance(arg[0], tuple)):
+ __self[arg[0]] = __self._hook(arg[1])
+ else:
+ for key, val in iter(arg):
+ __self[key] = __self._hook(val)
+
+ for key, val in kwargs.items():
+ __self[key] = __self._hook(val)
+
+ def lock(self):
+ """
+ Lock the config. Afterwards, new keys cannot be added to the
+ config, and the values of existing keys cannot be modified.
+ """
+ object.__setattr__(self, '__all_locked', True)
+ if self.key_lockable:
+ object.__setattr__(self, '__key_locked', True)
+
+ for k in self:
+ if isinstance(self[k], Config):
+ self[k].lock()
+
+ def unlock(self):
+ """
+ Unlock the config. Afterwards, new keys can be added to the
+ config, and the values of existing keys can be modified.
+ """
+ object.__setattr__(self, '__all_locked', False)
+ object.__setattr__(self, '__key_locked', False)
+
+ for k in self:
+ if isinstance(self[k], Config):
+ self[k].unlock()
+
+ def _get_lock_state_recursive(self):
+ """
+ Internal helper function to get the lock state of all sub-configs recursively.
+ """
+ lock_state = {"__all_locked": self.is_locked, "__key_locked": self.is_key_locked}
+ for k in self:
+ if isinstance(self[k], Config):
+ assert k not in ["__all_locked", "__key_locked"]
+ lock_state[k] = self[k]._get_lock_state_recursive()
+ return lock_state
+
+ def _set_lock_state_recursive(self, lock_state):
+ """
+ Internal helper function to set the lock state of all sub-configs recursively.
+ """
+ lock_state = deepcopy(lock_state)
+ object.__setattr__(self, '__all_locked', lock_state.pop("__all_locked"))
+ object.__setattr__(self, '__key_locked', lock_state.pop("__key_locked"))
+ for k in lock_state:
+ if isinstance(self[k], Config):
+ self[k]._set_lock_state_recursive(lock_state[k])
+
+ def _get_lock_state(self):
+ """
+ Retrieves the lock state of this config.
+
+ Returns:
+ lock_state (dict): a dictionary with an "all_locked" key that is True
+ if both key and value updates are locked and False otherwise, and
+ a "key_locked" key that is True if only key updates are locked (value
+ updates still allowed) and False otherwise
+ """
+ return {
+ "all_locked": self.is_locked,
+ "key_locked": self.is_key_locked
+ }
+
+ def _set_lock_state(self, lock_state):
+ """
+ Sets the lock state for this config.
+
+ Args:
+ lock_state (dict): a dictionary with an "all_locked" key that is True
+ if both key and value updates should be locked and False otherwise, and
+ a "key_locked" key that is True if only key updates should be locked (value
+ updates still allowed) and False otherwise
+ """
+ if lock_state["all_locked"]:
+ self.lock()
+ if lock_state["key_locked"]:
+ self.lock_keys()
+
+ @contextlib.contextmanager
+ def unlocked(self):
+ """
+ A context scope for modifying a Config object. Within the scope,
+ both keys and values can be updated. Upon leaving the scope,
+ the initial level of locking is restored.
+ """
+ lock_state = self._get_lock_state()
+ self.unlock()
+ yield
+ self._set_lock_state(lock_state)
+
+ @contextlib.contextmanager
+ def values_unlocked(self):
+ """
+ A context scope for modifying a Config object. Within the scope,
+ only values can be updated (new keys cannot be created). Upon
+ leaving the scope, the initial level of locking is restored.
+ """
+ lock_state = self._get_lock_state()
+ self.unlock()
+ self.lock_keys()
+ yield
+ self._set_lock_state(lock_state)
+
+ def lock_keys(self):
+ """
+ Lock this config so that new keys cannot be added.
+ """
+ if not self.key_lockable:
+ return
+ object.__setattr__(self, '__key_locked', True)
+ for k in self:
+ if isinstance(self[k], Config):
+ self[k].lock_keys()
+
+ def unlock_keys(self):
+ """
+ Unlock this config so that new keys can be added.
+ """
+ object.__setattr__(self, '__key_locked', False)
+ for k in self:
+ if isinstance(self[k], Config):
+ self[k].unlock_keys()
+
+ @property
+ def is_locked(self):
+ """
+ Returns True if the config is locked (no key or value updates allowed).
+ """
+ return object.__getattribute__(self, '__all_locked')
+
+ @property
+ def is_key_locked(self):
+ """
+ Returns True if the config is key-locked (no key updates allowed).
+ """
+ return object.__getattribute__(self, '__key_locked')
+
+ def do_not_lock_keys(self):
+ """
+ Calling this function on this config indicates that key updates should be
+ allowed even when this config is key-locked (but not when it is completely
+ locked). This is convenient for attributes that contain kwargs, where there
+ might be a variable type and number of arguments contained in the sub-config.
+ """
+ object.__setattr__(self, '__do_not_lock_keys', True)
+
+ @property
+ def key_lockable(self):
+ """
+ Returns true if this config is key-lockable (new keys cannot be inserted in a
+ key-locked lock level).
+ """
+ return not object.__getattribute__(self, '__do_not_lock_keys')
+
+ def __setattr__(self, name, value):
+ if self.is_locked:
+ raise RuntimeError("This config has been locked - cannot set attribute '{}' to {}".format(name, value))
+
+ if hasattr(Config, name):
+ raise AttributeError("'Dict' object attribute "
+ "'{0}' is read-only".format(name))
+ elif not hasattr(self, name) and self.is_key_locked:
+ raise RuntimeError("This config is key-locked - cannot add key '{}'".format(name))
+ else:
+ self[name] = value
+
+ def __setitem__(self, name, value):
+ super(Config, self).__setitem__(name, value)
+ p = object.__getattribute__(self, '__parent')
+ key = object.__getattribute__(self, '__key')
+ if p is not None:
+ p[key] = self
+
+ def __add__(self, other):
+ if not self.keys():
+ return other
+ else:
+ self_type = type(self).__name__
+ other_type = type(other).__name__
+ msg = "unsupported operand type(s) for +: '{}' and '{}'"
+ raise TypeError(msg.format(self_type, other_type))
+
+ @classmethod
+ def _hook(cls, item):
+ if isinstance(item, dict):
+ # We return Config instance instead of cls instance to ensure all sub-configs are not a top-level class
+ return Config(item)
+ elif isinstance(item, (list, tuple)):
+ return type(item)(Config._hook(elem) for elem in item)
+ return item
+
+ def __getattr__(self, item):
+ return self.__getitem__(item)
+
+ def __repr__(self):
+ json_string = json.dumps(self.to_dict(), indent=4)
+ return json_string
+
+ def __getitem__(self, name):
+ if name not in self:
+ if object.__getattribute__(self, '__all_locked') or object.__getattribute__(self, '__key_locked'):
+ raise RuntimeError("This config has been locked and '{}' is not in this config".format(name))
+ return Config(__parent=self, __key=name)
+ return super(Config, self).__getitem__(name)
+
+ def __delattr__(self, name):
+ del self[name]
+
+ def to_dict(self):
+ base = {}
+ for key, value in self.items():
+ if isinstance(value, type(self)):
+ base[key] = value.to_dict()
+ elif isinstance(value, (list, tuple)):
+ base[key] = type(value)(
+ item.to_dict() if isinstance(item, type(self)) else
+ item for item in value)
+ else:
+ base[key] = value
+ return base
+
+ def copy(self):
+ return copy.copy(self)
+
+ def deepcopy(self):
+ return copy.deepcopy(self)
+
+ def __deepcopy__(self, memo):
+ other = self.__class__()
+ memo[id(self)] = other
+ for key, value in self.items():
+ other[copy.deepcopy(key, memo)] = copy.deepcopy(value, memo)
+ return other
+
+ def update(self, *args, **kwargs):
+ """
+ Update this config using another config or nested dictionary.
+ """
+ if self.is_locked:
+ raise RuntimeError('Cannot update - this config has been locked')
+ other = {}
+ if args:
+ if len(args) > 1:
+ raise TypeError()
+ other.update(args[0])
+ other.update(kwargs)
+ for k, v in other.items():
+ if self.is_key_locked and k not in self:
+ raise RuntimeError("Cannot update - this config has been key-locked and key '{}' does not exist".format(k))
+ if (not isinstance(self[k], dict)) or (not isinstance(v, dict)):
+ self[k] = v
+ else:
+ self[k].update(v)
+
+ def __getnewargs__(self):
+ return tuple(self.items())
+
+ def __getstate__(self):
+ return self
+
+ def __setstate__(self, state):
+ self.update(state)
+
+ def setdefault(self, key, default=None):
+ if key in self:
+ return self[key]
+ else:
+ self[key] = default
+ return default
+
+ def dump(self, filename=None):
+ """
+ Dumps the config to a json.
+
+ Args:
+ filename (str): if not None, save to json file.
+
+ Returns:
+ json_string (str): json string representation of
+ this config
+ """
+ json_string = json.dumps(self.to_dict(), indent=4)
+ if filename is not None:
+ f = open(filename, "w")
+ f.write(json_string)
+ f.close()
+ return json_string
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/config/cql_config.py b/code_src/rise_robomimic/robomimic/config/cql_config.py
new file mode 100644
index 0000000000000000000000000000000000000000..26fea048fe49d2d2d03f888eedab6754f37c8dcc
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/config/cql_config.py
@@ -0,0 +1,82 @@
+"""
+Config for CQL algorithm.
+"""
+
+from robomimic.config.base_config import BaseConfig
+
+
+class CQLConfig(BaseConfig):
+ ALGO_NAME = "cql"
+
+ def train_config(self):
+ """
+ Update from superclass to change default batch size.
+ """
+ super(CQLConfig, self).train_config()
+
+ # increase batch size to 1024 (found to work better for most manipulation experiments)
+ self.train.batch_size = 1024
+
+ def algo_config(self):
+ """
+ This function populates the `config.algo` attribute of the config, and is given to the
+ `Algo` subclass (see `algo/algo.py`) for each algorithm through the `algo_config`
+ argument to the constructor. Any parameter that an algorithm needs to determine its
+ training and test-time behavior should be populated here.
+ """
+
+ # optimization parameters
+ self.algo.optim_params.critic.learning_rate.initial = 1e-3 # critic learning rate
+ self.algo.optim_params.critic.learning_rate.decay_factor = 0.0 # factor to decay LR by (if epoch schedule non-empty)
+ self.algo.optim_params.critic.learning_rate.epoch_schedule = [] # epochs where LR decay occurs
+ self.algo.optim_params.critic.regularization.L2 = 0.00 # L2 regularization strength
+
+ self.algo.optim_params.actor.learning_rate.initial = 3e-4 # actor learning rate
+ self.algo.optim_params.actor.learning_rate.decay_factor = 0.0 # factor to decay LR by (if epoch schedule non-empty)
+ self.algo.optim_params.actor.learning_rate.epoch_schedule = [] # epochs where LR decay occurs
+ self.algo.optim_params.actor.regularization.L2 = 0.00 # L2 regularization strength
+
+ # target network related parameters
+ self.algo.discount = 0.99 # discount factor to use
+ self.algo.n_step = 1 # for using n-step returns in TD-updates
+ self.algo.target_tau = 0.005 # update rate for target networks
+
+ # ================== Actor Network Config ===================
+ self.algo.actor.bc_start_steps = 0 # uses BC policy loss for first n-training steps
+ self.algo.actor.target_entropy = "default" # None is fixed entropy, otherwise is automatically tuned to match target. Can specify "default" as well for default tuning target
+ self.algo.actor.max_gradient_norm = None # L2 gradient clipping for actor
+
+ # Actor network settings
+ self.algo.actor.net.type = "gaussian" # Options are currently only "gaussian" (no support for GMM yet)
+
+ # Actor network settings - shared
+ self.algo.actor.net.common.std_activation = "exp" # Activation to use for std output from policy net
+ self.algo.actor.net.common.use_tanh = True # Whether to use tanh at output of actor network
+ self.algo.actor.net.common.low_noise_eval = True # Whether to use deterministic action sampling at eval stage
+
+ # Actor network settings - gaussian
+ self.algo.actor.net.gaussian.init_last_fc_weight = 0.001 # If set, will override the initialization of the final fc layer to be uniformly sampled limited by this value
+ self.algo.actor.net.gaussian.init_std = 0.3 # Relative scaling factor for std from policy net
+ self.algo.actor.net.gaussian.fixed_std = False # Whether to learn std dev or not
+
+ self.algo.actor.layer_dims = (300, 400) # actor MLP layer dimensions
+
+ # ================== Critic Network Config ===================
+ self.algo.critic.use_huber = False # Huber Loss instead of L2 for critic
+ self.algo.critic.max_gradient_norm = None # L2 gradient clipping for critic (None to use no clipping)
+
+ self.algo.critic.value_bounds = None # optional 2-tuple to ensure lower and upper bound on value estimates
+
+ self.algo.critic.num_action_samples = 1 # number of actions to sample per training batch to get target critic value; use maximum Q value from n random sampled actions when doing TD error backup
+
+ # cql settings for critic
+ self.algo.critic.cql_weight = 1.0 # weighting for cql component of critic loss (only used if target_q_gap is < 0 or None)
+ self.algo.critic.deterministic_backup = True # if not set, subtract weighted logprob of action when doing backup
+ self.algo.critic.min_q_weight = 1.0 # min q weight (scaling factor) to apply
+ self.algo.critic.target_q_gap = 5.0 # if set, sets the diff threshold at which Q-values will be penalized more (note: this overrides cql weight above!) Use None or a negative value if not set
+ self.algo.critic.num_random_actions = 10 # Number of random actions to sample when calculating CQL loss
+
+ # critic ensemble parameters (TD3 trick)
+ self.algo.critic.ensemble.n = 2 # number of Q networks in the ensemble
+
+ self.algo.critic.layer_dims = (300, 400) # critic MLP layer dimensions
diff --git a/code_src/rise_robomimic/robomimic/config/default_templates/bc_transformer.json b/code_src/rise_robomimic/robomimic/config/default_templates/bc_transformer.json
new file mode 100644
index 0000000000000000000000000000000000000000..ed59f175b532c1cd61e8c4efefba1d985e8eaa31
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/config/default_templates/bc_transformer.json
@@ -0,0 +1,171 @@
+{
+ "algo_name": "bc",
+ "experiment": {
+ "name": "test",
+ "validate": false,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": null,
+ "output_dir": "../bc_transformer_trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": false,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": null,
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 10,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 100,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adamw",
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [100],
+ "scheduler_type": "linear"
+ },
+ "regularization": {
+ "L2": 0.01
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [],
+ "gaussian": {
+ "enabled": false
+ },
+ "gmm": {
+ "enabled": true,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": false
+ },
+ "rnn": {
+ "enabled": false
+ },
+ "transformer": {
+ "enabled": true,
+ "supervise_all_steps": false,
+ "num_layers": 6,
+ "embed_dim": 512,
+ "num_heads": 8
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {
+ "feature_dimension": 64,
+ "backbone_class": "ResNet18Conv",
+ "backbone_kwargs": {
+ "pretrained": false,
+ "input_coord_conv": false
+ },
+ "pool_class": "SpatialSoftmax",
+ "pool_kwargs": {
+ "num_kp": 32,
+ "learnable_temperature": false,
+ "temperature": 1.0,
+ "noise_std": 0.0
+ }
+ },
+ "obs_randomizer_class": "CropRandomizer",
+ "obs_randomizer_kwargs": {
+ "crop_height": 76,
+ "crop_width": 76,
+ "num_crops": 1,
+ "pos_enc": false
+ }
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ }
+}
diff --git a/code_src/rise_robomimic/robomimic/config/discriminator_config.py b/code_src/rise_robomimic/robomimic/config/discriminator_config.py
new file mode 100644
index 0000000000000000000000000000000000000000..f65c3d3ac61f26a0cce6b2303f87c222f269befa
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/config/discriminator_config.py
@@ -0,0 +1,45 @@
+"""
+Config for Discriminator algorithm.
+"""
+
+from robomimic.config.base_config import BaseConfig
+
+
+class DiscriminatorConfig(BaseConfig):
+ ALGO_NAME = "discriminator"
+
+ def experiment_config(self):
+ super().experiment_config()
+
+ self.experiment.save.every_n_epochs = 2 # save model every n epochs (set to None to disable)
+
+ def train_config(self):
+ """
+ BC algorithms don't need "next_obs" from hdf5 - so save on storage and compute by disabling it.
+ """
+ super(DiscriminatorConfig, self).train_config()
+ self.train.hdf5_load_next_obs = False
+
+ def algo_config(self):
+ """
+ This function populates the `config.algo` attribute of the config, and is given to the
+ `Algo` subclass (see `algo/algo.py`) for each algorithm through the `algo_config`
+ argument to the constructor. Any parameter that an algorithm needs to determine its
+ training and test-time behavior should be populated here.
+ """
+
+ # optimization parameters
+ self.algo.optim_params.policy.optimizer_type = "adam"
+ self.algo.optim_params.policy.learning_rate.initial = 1e-4 # policy learning rate
+ self.algo.optim_params.policy.learning_rate.decay_factor = 0.1 # factor to decay LR by (if epoch schedule non-empty)
+ self.algo.optim_params.policy.learning_rate.epoch_schedule = [] # epochs where LR decay occurs
+ self.algo.optim_params.policy.learning_rate.scheduler_type = "multistep" # learning rate scheduler ("multistep", "linear", etc)
+ self.algo.optim_params.policy.regularization.L2 = 0.00 # L2 regularization strength
+
+ # loss weights
+ self.algo.loss.l2_weight = 1.0 # L2 loss weight
+ self.algo.loss.l1_weight = 0.0 # L1 loss weight
+ self.algo.loss.cos_weight = 0.0 # cosine loss weight
+
+ # MLP network architecture (layers after observation encoder and RNN, if present)
+ self.algo.discriminator_layer_dims = (1024, 1024)
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/config/gl_config.py b/code_src/rise_robomimic/robomimic/config/gl_config.py
new file mode 100644
index 0000000000000000000000000000000000000000..939103e65dd5f7519fb7be2c9fa1928d5b430bf2
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/config/gl_config.py
@@ -0,0 +1,89 @@
+"""
+Config for Goal Learning (sub-algorithm used by hierarchical models like HBC and IRIS).
+This class of model predicts (or samples) subgoal observations given a current observation.
+"""
+
+from robomimic.config.base_config import BaseConfig
+
+
+class GLConfig(BaseConfig):
+ ALGO_NAME = "gl"
+
+ def algo_config(self):
+ """
+ This function populates the `config.algo` attribute of the config, and is given to the
+ `Algo` subclass (see `algo/algo.py`) for each algorithm through the `algo_config`
+ argument to the constructor. Any parameter that an algorithm needs to determine its
+ training and test-time behavior should be populated here.
+ """
+
+ # optimization parameters
+ self.algo.optim_params.goal_network.learning_rate.initial = 1e-4 # goal network learning rate
+ self.algo.optim_params.goal_network.learning_rate.decay_factor = 0.1 # factor to decay LR by (if epoch schedule non-empty)
+ self.algo.optim_params.goal_network.learning_rate.epoch_schedule = [] # epochs where LR decay occurs
+ self.algo.optim_params.goal_network.regularization.L2 = 0.00
+
+ # subgoal definition: observation that is @subgoal_horizon number of timesteps in future from current observation
+ self.algo.subgoal_horizon = 10
+
+ # MLP size for deterministic goal network (unused if VAE is enabled)
+ self.algo.ae.planner_layer_dims = (300, 400)
+
+ # ================== VAE config ==================
+ self.algo.vae.enabled = True # set to true to use VAE network
+ self.algo.vae.latent_dim = 16 # VAE latent dimension
+ self.algo.vae.latent_clip = None # clip latent space when decoding (set to None to disable)
+ self.algo.vae.kl_weight = 1. # beta-VAE weight to scale KL loss relative to reconstruction loss in ELBO
+
+ # VAE decoder settings
+ self.algo.vae.decoder.is_conditioned = True # whether decoder should condition on observation
+ self.algo.vae.decoder.reconstruction_sum_across_elements = False # sum instead of mean for reconstruction loss
+
+ # VAE prior settings
+ self.algo.vae.prior.learn = False # learn Gaussian / GMM prior instead of N(0, 1)
+ self.algo.vae.prior.is_conditioned = False # whether to condition prior on observations
+ self.algo.vae.prior.use_gmm = False # whether to use GMM prior
+ self.algo.vae.prior.gmm_num_modes = 10 # number of GMM modes
+ self.algo.vae.prior.gmm_learn_weights = False # whether to learn GMM weights
+ self.algo.vae.prior.use_categorical = False # whether to use categorical prior
+ self.algo.vae.prior.categorical_dim = 10 # the number of categorical classes for each latent dimension
+ self.algo.vae.prior.categorical_gumbel_softmax_hard = False # use hard selection in forward pass
+ self.algo.vae.prior.categorical_init_temp = 1.0 # initial gumbel-softmax temp
+ self.algo.vae.prior.categorical_temp_anneal_step = 0.001 # linear temp annealing rate
+ self.algo.vae.prior.categorical_min_temp = 0.3 # lowest gumbel-softmax temp
+
+ self.algo.vae.encoder_layer_dims = (300, 400) # encoder MLP layer dimensions
+ self.algo.vae.decoder_layer_dims = (300, 400) # decoder MLP layer dimensions
+ self.algo.vae.prior_layer_dims = (300, 400) # prior MLP layer dimensions (if learning conditioned prior)
+
+ def observation_config(self):
+ """
+ Update from superclass to specify subgoal modalities.
+ """
+ super(GLConfig, self).observation_config()
+ self.observation.modalities.subgoal.low_dim = [ # specify low-dim subgoal observations for agent to predict
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object",
+ ]
+ self.observation.modalities.subgoal.rgb = [] # specify rgb image subgoal observations for agent to predict
+ self.observation.modalities.subgoal.depth = []
+ self.observation.modalities.subgoal.scan = []
+ self.observation.modalities.subgoal.do_not_lock_keys()
+
+ @property
+ def all_obs_keys(self):
+ """
+ Update from superclass to include subgoals.
+ """
+ # pool all modalities
+ return sorted(tuple(set([
+ obs_key for group in [
+ self.observation.modalities.obs.values(),
+ self.observation.modalities.goal.values(),
+ self.observation.modalities.subgoal.values(),
+ ]
+ for modality in group
+ for obs_key in modality
+ ])))
diff --git a/code_src/rise_robomimic/robomimic/config/hbc_config.py b/code_src/rise_robomimic/robomimic/config/hbc_config.py
new file mode 100644
index 0000000000000000000000000000000000000000..ae65c9b85fc168dc65666392fd334810b622ab04
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/config/hbc_config.py
@@ -0,0 +1,96 @@
+"""
+Config for HBC algorithm.
+"""
+
+from robomimic.config.base_config import BaseConfig
+from robomimic.config.gl_config import GLConfig
+from robomimic.config.bc_config import BCConfig
+
+
+class HBCConfig(BaseConfig):
+ ALGO_NAME = "hbc"
+
+ def train_config(self):
+ """
+ Update from superclass to change default sequence length to load from dataset.
+ """
+ super(HBCConfig, self).train_config()
+ self.train.seq_length = 10 # length of experience sequence to fetch from the buffer
+
+ def algo_config(self):
+ """
+ This function populates the `config.algo` attribute of the config, and is given to the
+ `Algo` subclass (see `algo/algo.py`) for each algorithm through the `algo_config`
+ argument to the constructor. Any parameter that an algorithm needs to determine its
+ training and test-time behavior should be populated here.
+ """
+
+ # One of ["separate", "cascade"]. In "separate" mode (default),
+ # the planner and actor are trained independently and then the planner subgoal predictions are
+ # used to condition the actor at test-time. In "cascade" mode, the actor is trained directly
+ # on planner subgoal predictions. In "actor_only" mode, only the actor is trained, and in
+ # "planner_only" mode, only the planner is trained.
+ self.algo.mode = "separate"
+ self.algo.actor_use_random_subgoals = False # whether to sample subgoal index from [1, subgoal_horizon]
+ self.algo.subgoal_update_interval = 10 # how frequently the subgoal should be updated at test-time
+
+
+ # ================== Latent Subgoal Config ==================
+ self.algo.latent_subgoal.enabled = False # if True, use VAE latent space as subgoals for actor, instead of reconstructions
+
+ # prior correction trick for actor and value training: instead of using encoder for
+ # transforming subgoals to latent subgoals, generate prior samples and choose
+ # the closest one to the encoder output
+ self.algo.latent_subgoal.prior_correction.enabled = False
+ self.algo.latent_subgoal.prior_correction.num_samples = 100
+
+ # ================== Planner Config ==================
+ self.algo.planner = GLConfig().algo # config for goal learning
+ # set subgoal horizon explicitly
+ self.algo.planner.subgoal_horizon = 10
+ # ensure VAE is used
+ self.algo.planner.vae.enabled = True
+
+ # ================== Actor Config ===================
+ self.algo.actor = BCConfig().algo
+ # use RNN
+ self.algo.actor.rnn.enabled = True
+ self.algo.actor.rnn.horizon = 10
+ # remove unused parts of BCConfig algo config
+ del self.algo.actor.gaussian
+ del self.algo.actor.gmm
+ del self.algo.actor.vae
+
+ def observation_config(self):
+ """
+ Update from superclass so that planner and actor each get their own observation config.
+ """
+ self.observation.planner = GLConfig().observation
+ self.observation.actor = BCConfig().observation
+
+ @property
+ def use_goals(self):
+ """
+ Update from superclass - planner goal modalities determine goal-conditioning
+ """
+ return len(
+ self.observation.planner.modalities.goal.low_dim +
+ self.observation.planner.modalities.goal.rgb) > 0
+
+ @property
+ def all_obs_keys(self):
+ """
+ Update from superclass to include modalities from planner and actor.
+ """
+ # pool all modalities
+ return sorted(tuple(set([
+ obs_key for group in [
+ self.observation.planner.modalities.obs.values(),
+ self.observation.planner.modalities.goal.values(),
+ self.observation.planner.modalities.subgoal.values(),
+ self.observation.actor.modalities.obs.values(),
+ self.observation.actor.modalities.goal.values(),
+ ]
+ for modality in group
+ for obs_key in modality
+ ])))
diff --git a/code_src/rise_robomimic/robomimic/config/idql_config.py b/code_src/rise_robomimic/robomimic/config/idql_config.py
new file mode 100644
index 0000000000000000000000000000000000000000..3345492dcaaeecf08d4ea78b42087cea495a6039
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/config/idql_config.py
@@ -0,0 +1,178 @@
+"""
+Config for IQL Diffusion algorithm.
+"""
+
+from robomimic.config.base_config import BaseConfig
+
+
+class IDQLConfig(BaseConfig):
+ ALGO_NAME = "idql"
+
+ def algo_config(self):
+ """
+ This function populates the `config.algo` attribute of the config, and is given to the
+ `Algo` subclass (see `algo/algo.py`) for each algorithm through the `algo_config`
+ argument to the constructor. Any parameter that an algorithm needs to determine its
+ training and test-time behavior should be populated here.
+ """
+ super(IDQLConfig, self).algo_config()
+
+ # optimization parameters
+ self.algo.optim_params.critic.learning_rate.initial = 1e-4 # critic learning rate
+ self.algo.optim_params.critic.learning_rate.decay_factor = 0.0 # factor to decay LR by (if epoch schedule non-empty)
+ self.algo.optim_params.critic.learning_rate.epoch_schedule = [] # epochs where LR decay occurs
+ self.algo.optim_params.critic.regularization.L2 = 0.00 # L2 regularization strength
+
+ self.algo.optim_params.vf.learning_rate.initial = 1e-4 # vf learning rate
+ self.algo.optim_params.vf.learning_rate.decay_factor = 0.0 # factor to decay LR by (if epoch schedule non-empty)
+ self.algo.optim_params.vf.learning_rate.epoch_schedule = [] # epochs where LR decay occurs
+ self.algo.optim_params.vf.regularization.L2 = 0.00 # L2 regularization strength
+
+ self.algo.optim_params.policy.learning_rate.initial = 1e-4 # policy learning rate
+ self.algo.optim_params.policy.learning_rate.decay_factor = 0.0 # factor to decay LR by (if epoch schedule non-empty)
+ self.algo.optim_params.policy.learning_rate.epoch_schedule = [] # epochs where LR decay occurs
+ self.algo.optim_params.policy.regularization.L2 = 0.00 # L2 regularization strength
+ self.algo.optim_params.policy.freeze_until_epoch = None # don't train policy until this epoch
+
+ self.algo.multi_step_method = 'one_step'
+ self.algo.use_bc = False
+
+ # unet params
+ self.algo.unet.enabled = True
+ self.algo.unet.diffusion_step_embed_dim = 256
+ self.algo.unet.down_dims = [256,512,1024]
+ self.algo.unet.kernel_size = 5
+ self.algo.unet.n_groups = 8
+
+ # EMA parameters
+ self.algo.ema.enabled = True
+ self.algo.ema.power = 0.75
+
+ self.algo.horizon.observation_horizon = 1
+ self.algo.horizon.action_horizon = 1
+ self.algo.horizon.prediction_horizon = 1
+
+ # Noise Scheduler
+ ## DDPM
+ self.algo.ddpm.enabled = True
+ self.algo.ddpm.num_train_timesteps = 100
+ self.algo.ddpm.num_inference_timesteps = 100
+ self.algo.ddpm.beta_schedule = 'squaredcos_cap_v2'
+ self.algo.ddpm.clip_sample = True
+ self.algo.ddpm.prediction_type = 'epsilon'
+
+ ## DDIM
+ self.algo.ddim.enabled = False
+ self.algo.ddim.num_train_timesteps = 100
+ self.algo.ddim.num_inference_timesteps = 10
+ self.algo.ddim.beta_schedule = 'squaredcos_cap_v2'
+ self.algo.ddim.clip_sample = True
+ self.algo.ddim.set_alpha_to_one = True
+ self.algo.ddim.steps_offset = 0
+ self.algo.ddim.prediction_type = 'epsilon'
+
+ # target network related parameters
+ self.algo.discount = 0.99 # discount factor to use
+ self.algo.target_tau = 0.01 # update rate for target networks
+
+ # ================== Critic Network Config ===================
+ # critic ensemble parameters
+ self.algo.critic.ensemble.n = 2 # number of Q networks in the ensemble
+ self.algo.critic.layer_dims = (300, 400) # critic MLP layer dimensions
+ self.algo.critic.use_huber = False # Huber Loss instead of L2 for critic
+ self.algo.critic.max_gradient_norm = None # L2 gradient clipping for actor
+
+ # ================== Adv Config ==============================
+ self.algo.adv.clip_adv_value = None # whether to clip raw advantage estimates
+ self.algo.adv.beta = 1.0 # temperature for operator
+ self.algo.adv.use_final_clip = True # whether to clip final weight calculations
+ self.algo.awr_actor = False
+ self.algo.critic_on_augmented = False # rsm_rise gen_q#265 wave 2: opt-in critic/V update on kNN-augmented rows (released: skipped) # rsm_rise gen_q#265: opt-in AWR actor loss (released: plain BC)
+
+ # ---- rsm_rise BASE_TOPUP (gen_q#287) FAST CRITIC PATH, 2026-09-26 -----------------------------
+ # The flagship's `critic:dino` column needs ONLY the IQL critic: the action proposer is the fixed
+ # published PIXEL actor loaded from a different checkpoint, so the diffusion actor co-trained in
+ # this run is never read by any cell. `critic_only=True` skips the actor loss AND its update
+ # (the expensive half of a step) and leaves Q/V bit-for-bit as they were: _compute_critic_loss /
+ # _update_critic (idql.py) never read the actor, and the actor's advantage weights are .detach()ed,
+ # so removing the actor cannot change a single critic gradient.
+ self.algo.critic_only = False
+ # `critic_skip_even_epochs=True` reproduces the RELEASED critic update SCHEDULE on a run whose
+ # kNN action augmentation is OFF. With augmentation ON the released recipe alternates epochs and
+ # `critic_skip = using_augmented and not critic_on_augmented` (idql.py) means the critic updates on
+ # the ODD epochs only -- 2500 of 5000 epochs x 100 steps = 250k critic updates. A precomputed-feature
+ # (path-(D)) run cannot build the augmentation pool (its distance space is images), so augmentation
+ # must be off; without this flag the critic would get 500k updates, i.e. TWICE the released recipe,
+ # under a name claiming to reproduce it. With it, the update count matches exactly AND the
+ # checkpoint still lands at epoch 5000, which the table loader requires (critic epoch == proposer
+ # epoch, verdict_table.py).
+ self.algo.critic_skip_even_epochs = False
+
+ self.algo.vf_quantile = 0.9 # quantile factor in quantile regression
+
+ self.algo.bottleneck_policy = False
+ self.algo.bottleneck_value = False
+ self.algo.q_bottleneck_beta = 0.2
+ self.algo.policy_bottleneck_beta = 0.2
+ self.algo.spectral_norm_policy = False
+ self.algo.spectral_norm_value = False
+
+ self.algo.lipschitz = False
+ self.algo.lipschitz_constant = 3.0
+ self.algo.lipschitz_weight = 0.005
+ self.algo.lipschitz_slack = False
+ self.algo.lipschitz_denoiser = False
+
+ # rsm_rise Stage 3 (robomimic/algo/rsm_planner.py, rsm_scorer.py). Defaults = released behaviour.
+ self.algo.plan_n = None # best-of-N over the diffusion sampler; None/1 = released path
+ self.algo.plan_rule = "argmax" # argmax | softmax | topk_uniform | random | permuted | argmin
+ self.algo.plan_temp = 0.2 # softmax temperature on Qbar
+ self.algo.plan_topk = 8 # topk_uniform: k
+ self.algo.plan_chunk = 8 # actions of the executed window the RSM scores
+ self.algo.plan_particles = 16 # successor particles per candidate
+ self.algo.plan_mode = "fold" # d1 | fold | recursive
+ self.algo.plan_depth = 2 # hops L
+ self.algo.plan_beta = 0.95 # hop beta
+ self.algo.plan_gamma = 0.99 # fold discount / recursion restart gamma
+ # gen_q#273 added plan_mpc_horizon to sim_pipeline's PLANNER_KEYS (iql_diffusion.py:147), which
+ # copies it into json_config['algo'], but the key was never declared here -- so config_factory's
+ # key-locked config rejected it and EVERY new idql / iql_diffusion training died at startup in
+ # ~23 s with "Cannot update ... key 'plan_mpc_horizon' does not exist" (REWARD_MATRIX jobs
+ # 1885210/1885211, all 8 cells). Declared here with the SAME default as the training-side field
+ # (0 = off), so this restores released behaviour and changes nothing for any existing cell.
+ self.algo.plan_mpc_horizon = 0 # world-model MPC horizon H in FRAMES (0 = off)
+ self.algo.plan_flow_steps = 8 # Euler steps of the successor ODE
+ self.algo.plan_seed = -1 # >=0: fixed CRN seed per step and selection RNG
+ self.algo.rsm_backend = "mlp" # mlp | dwm | mc | iql
+ self.algo.rsm_ckpt = "" # RSM checkpoint (iql: an S0A .pth or "" for own critic)
+ self.algo.rsm_hop_ckpt = "" # Stage-2 hop head (bc_arm.py policy_r1.pt)
+ self.algo.rsm_feat_stats = "" # Stage-1 cache feat_stats.npz
+ self.algo.rsm_img_layout = "chw" # chw (scripts/relabel_dino.py) | rise_t (RISE offline relabel)
+ self.algo.rsm_dwm_module = "dwm_readout"
+ self.algo.plan_score = "prob" # prob (mean sigmoid, released) | logit (mean raw logit over particles)
+ # | prob_log (prob folded in log space: same quantity, total order)
+ self.algo.plan_rescore_top = 0 # two-stage screening: rescore the top-K of the ranking (0 = off)
+ self.algo.plan_particles_rescore = 0 # ... with M particles (0 = off)
+ self.algo.plan_temperature = 0.0 # 0: checkpoint calib.json T (else 1.0); > 0 overrides the sigmoid T
+ self.algo.plan_lcb_quantile = 0.1 # plan_score=conformal_lcb: particle quantile that ranks (0.1 = 10th pct)
+ self.algo.plan_sample_batch = 0 # >0: DDPM-sample the candidates in slices of this many rows (0 = off)
+ self.algo.plan_max_rows = 0 # >0: scorer row-slice width (cand x particles); 0 = rsm_scorer.MAX_ROWS
+ # coin-terminated beta chain (gen_q#267). plan_mode=chain walks a Bernoulli(p) number of
+ # beta-hops, p = (gamma-beta)/(gamma*(1-beta)) [ogbench_genq/rsm.py:113], and reads membership
+ # ONCE at the frozen node; the composed frame offset is then EXACTLY Geom(1-gamma).
+ # plan_chain_cap=0 => computed from plan_chain_tail_eps (the 1e-3 truncation tail). The cap is
+ # a truncation GUARD, never a tuning knob -- plan_depth is ignored in chain mode.
+ self.algo.plan_chain_cap = 0 # 0 = compute from the tail; >0 = explicit cap (sweep only)
+ self.algo.plan_chain_tail_eps = 1e-3 # P(walk longer than cap) <= this
+ self.algo.plan_chain_seed = -1 # <0 = follow the cell's eval seed
+ self.algo.rsm_adv_v_expectile = 0.5 # E2: tau of the expectile baseline
+ self.algo.rsm_adv_v_samples = 16 # E2: hop-head chunks M for the baseline
+ self.algo.rsm_adv_scale = "td" # E2: td | std
+ self.algo.rsm_adv_permute = False # S3H6 control
+
+ self.algo.critic.late_fusion_key = None
+ self.algo.critic.late_fusion_layer_index = 1
+ self.algo.critic.obs_multiplier_key = None
+ self.algo.critic.obs_multiplier = 1
+
+ self.algo.action_augmentation = False
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/config/idql_qsm_config.py b/code_src/rise_robomimic/robomimic/config/idql_qsm_config.py
new file mode 100644
index 0000000000000000000000000000000000000000..868a3f95e38cb1043c946a6d1c89d9824810fe03
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/config/idql_qsm_config.py
@@ -0,0 +1,92 @@
+"""
+Config for IQL Diffusion algorithm.
+"""
+
+from robomimic.config.base_config import BaseConfig
+
+
+class IDQL_QSMConfig(BaseConfig):
+ ALGO_NAME = "idql_qsm"
+
+ def algo_config(self):
+ """
+ This function populates the `config.algo` attribute of the config, and is given to the
+ `Algo` subclass (see `algo/algo.py`) for each algorithm through the `algo_config`
+ argument to the constructor. Any parameter that an algorithm needs to determine its
+ training and test-time behavior should be populated here.
+ """
+ super(IDQL_QSMConfig, self).algo_config()
+
+ # optimization parameters
+ self.algo.optim_params.critic.learning_rate.initial = 1e-4 # critic learning rate
+ self.algo.optim_params.critic.learning_rate.decay_factor = 0.0 # factor to decay LR by (if epoch schedule non-empty)
+ self.algo.optim_params.critic.learning_rate.epoch_schedule = [] # epochs where LR decay occurs
+ self.algo.optim_params.critic.regularization.L2 = 0.00 # L2 regularization strength
+
+ self.algo.optim_params.vf.learning_rate.initial = 1e-4 # vf learning rate
+ self.algo.optim_params.vf.learning_rate.decay_factor = 0.0 # factor to decay LR by (if epoch schedule non-empty)
+ self.algo.optim_params.vf.learning_rate.epoch_schedule = [] # epochs where LR decay occurs
+ self.algo.optim_params.vf.regularization.L2 = 0.00 # L2 regularization strength
+
+ self.algo.optim_params.policy.learning_rate.initial = 1e-4 # policy learning rate
+ self.algo.optim_params.policy.learning_rate.decay_factor = 0.0 # factor to decay LR by (if epoch schedule non-empty)
+ self.algo.optim_params.policy.learning_rate.epoch_schedule = [] # epochs where LR decay occurs
+ self.algo.optim_params.policy.regularization.L2 = 0.00 # L2 regularization strength
+ self.algo.optim_params.policy.freeze_until_epoch = None # don't train policy until this epoch
+
+ self.algo.multi_step_method = 'one_step'
+ self.algo.use_bc = False
+
+ self.algo.alpha_q = 50
+
+ # unet params
+ self.algo.unet.enabled = True
+ self.algo.unet.diffusion_step_embed_dim = 256
+ self.algo.unet.down_dims = [256,512,1024]
+ self.algo.unet.kernel_size = 5
+ self.algo.unet.n_groups = 8
+
+ # EMA parameters
+ self.algo.ema.enabled = True
+ self.algo.ema.power = 0.75
+
+ self.algo.horizon.observation_horizon = 1
+ self.algo.horizon.action_horizon = 1
+ self.algo.horizon.prediction_horizon = 1
+
+ # Noise Scheduler
+ ## DDPM
+ self.algo.ddpm.enabled = True
+ self.algo.ddpm.num_train_timesteps = 100
+ self.algo.ddpm.num_inference_timesteps = 100
+ self.algo.ddpm.beta_schedule = 'squaredcos_cap_v2'
+ self.algo.ddpm.clip_sample = True
+ self.algo.ddpm.prediction_type = 'epsilon'
+
+ ## DDIM
+ self.algo.ddim.enabled = False
+ self.algo.ddim.num_train_timesteps = 100
+ self.algo.ddim.num_inference_timesteps = 10
+ self.algo.ddim.beta_schedule = 'squaredcos_cap_v2'
+ self.algo.ddim.clip_sample = True
+ self.algo.ddim.set_alpha_to_one = True
+ self.algo.ddim.steps_offset = 0
+ self.algo.ddim.prediction_type = 'epsilon'
+
+ # target network related parameters
+ self.algo.discount = 0.99 # discount factor to use
+ self.algo.target_tau = 0.01 # update rate for target networks
+
+ # ================== Critic Network Config ===================
+ # critic ensemble parameters
+ self.algo.critic.ensemble.n = 2 # number of Q networks in the ensemble
+ self.algo.critic.layer_dims = (300, 400) # critic MLP layer dimensions
+ self.algo.critic.use_huber = False # Huber Loss instead of L2 for critic
+ self.algo.critic.max_gradient_norm = None # L2 gradient clipping for actor
+
+ # ================== Adv Config ==============================
+ self.algo.adv.clip_adv_value = None # whether to clip raw advantage estimates
+ self.algo.adv.beta = 1.0 # temperature for operator
+ self.algo.adv.use_final_clip = True # whether to clip final weight calculations
+
+ self.algo.vf_quantile = 0.9 # quantile factor in quantile regression
diff --git a/code_src/rise_robomimic/robomimic/config/iql_config.py b/code_src/rise_robomimic/robomimic/config/iql_config.py
new file mode 100644
index 0000000000000000000000000000000000000000..bd603d1aa0183639971b16747c5020afa6d04fe3
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/config/iql_config.py
@@ -0,0 +1,73 @@
+"""
+Config for IQL algorithm.
+"""
+
+from robomimic.config.base_config import BaseConfig
+
+
+class IQLConfig(BaseConfig):
+ ALGO_NAME = "iql"
+
+ def algo_config(self):
+ """
+ This function populates the `config.algo` attribute of the config, and is given to the
+ `Algo` subclass (see `algo/algo.py`) for each algorithm through the `algo_config`
+ argument to the constructor. Any parameter that an algorithm needs to determine its
+ training and test-time behavior should be populated here.
+ """
+ super(IQLConfig, self).algo_config()
+
+ # optimization parameters
+ self.algo.optim_params.critic.learning_rate.initial = 1e-4 # critic learning rate
+ self.algo.optim_params.critic.learning_rate.decay_factor = 0.0 # factor to decay LR by (if epoch schedule non-empty)
+ self.algo.optim_params.critic.learning_rate.epoch_schedule = [] # epochs where LR decay occurs
+ self.algo.optim_params.critic.regularization.L2 = 0.00 # L2 regularization strength
+
+ self.algo.optim_params.vf.learning_rate.initial = 1e-4 # vf learning rate
+ self.algo.optim_params.vf.learning_rate.decay_factor = 0.0 # factor to decay LR by (if epoch schedule non-empty)
+ self.algo.optim_params.vf.learning_rate.epoch_schedule = [] # epochs where LR decay occurs
+ self.algo.optim_params.vf.regularization.L2 = 0.00 # L2 regularization strength
+
+ self.algo.optim_params.actor.learning_rate.initial = 1e-4 # actor learning rate
+ self.algo.optim_params.actor.learning_rate.decay_factor = 0.0 # factor to decay LR by (if epoch schedule non-empty)
+ self.algo.optim_params.actor.learning_rate.epoch_schedule = [] # epochs where LR decay occurs
+ self.algo.optim_params.actor.regularization.L2 = 0.00 # L2 regularization strength
+
+ # target network related parameters
+ self.algo.discount = 0.99 # discount factor to use
+ self.algo.target_tau = 0.01 # update rate for target networks
+
+ # ================== Actor Network Config ===================
+ # Actor network settings
+ self.algo.actor.net.type = "gaussian" # Options are currently ["gaussian", "gmm"]
+
+ # Actor network settings - shared
+ self.algo.actor.net.common.std_activation = "softplus" # Activation to use for std output from policy net
+ self.algo.actor.net.common.low_noise_eval = True # Whether to use deterministic action sampling at eval stage
+ self.algo.actor.net.common.use_tanh = False # Whether to use tanh at output of actor network
+
+ # Actor network settings - gaussian
+ self.algo.actor.net.gaussian.init_last_fc_weight = 0.001 # If set, will override the initialization of the final fc layer to be uniformly sampled limited by this value
+ self.algo.actor.net.gaussian.init_std = 0.3 # Relative scaling factor for std from policy net
+ self.algo.actor.net.gaussian.fixed_std = False # Whether to learn std dev or not
+
+ self.algo.actor.net.gmm.num_modes = 5 # number of GMM modes
+ self.algo.actor.net.gmm.min_std = 0.0001 # minimum std output from network
+
+ self.algo.actor.layer_dims = (300, 400) # actor MLP layer dimensions
+
+ self.algo.actor.max_gradient_norm = None # L2 gradient clipping for actor
+
+ # ================== Critic Network Config ===================
+ # critic ensemble parameters
+ self.algo.critic.ensemble.n = 2 # number of Q networks in the ensemble
+ self.algo.critic.layer_dims = (300, 400) # critic MLP layer dimensions
+ self.algo.critic.use_huber = False # Huber Loss instead of L2 for critic
+ self.algo.critic.max_gradient_norm = None # L2 gradient clipping for actor
+
+ # ================== Adv Config ==============================
+ self.algo.adv.clip_adv_value = None # whether to clip raw advantage estimates
+ self.algo.adv.beta = 1.0 # temperature for operator
+ self.algo.adv.use_final_clip = True # whether to clip final weight calculations
+
+ self.algo.vf_quantile = 0.9 # quantile factor in quantile regression
diff --git a/code_src/rise_robomimic/robomimic/config/iql_diffusion_config.py b/code_src/rise_robomimic/robomimic/config/iql_diffusion_config.py
new file mode 100644
index 0000000000000000000000000000000000000000..e40db672b3a1be59b975eb93e608a2a46c6f09a4
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/config/iql_diffusion_config.py
@@ -0,0 +1,165 @@
+"""
+Config for IQL Diffusion algorithm.
+"""
+
+from robomimic.config.base_config import BaseConfig
+
+
+class IQLDiffusionConfig(BaseConfig):
+ ALGO_NAME = "iql_diffusion"
+
+ def algo_config(self):
+ """
+ This function populates the `config.algo` attribute of the config, and is given to the
+ `Algo` subclass (see `algo/algo.py`) for each algorithm through the `algo_config`
+ argument to the constructor. Any parameter that an algorithm needs to determine its
+ training and test-time behavior should be populated here.
+ """
+ super(IQLDiffusionConfig, self).algo_config()
+
+ # optimization parameters
+ self.algo.optim_params.critic.learning_rate.initial = 1e-4 # critic learning rate
+ self.algo.optim_params.critic.learning_rate.decay_factor = 0.0 # factor to decay LR by (if epoch schedule non-empty)
+ self.algo.optim_params.critic.learning_rate.epoch_schedule = [] # epochs where LR decay occurs
+ self.algo.optim_params.critic.regularization.L2 = 0.00 # L2 regularization strength
+
+ self.algo.optim_params.vf.learning_rate.initial = 1e-4 # vf learning rate
+ self.algo.optim_params.vf.learning_rate.decay_factor = 0.0 # factor to decay LR by (if epoch schedule non-empty)
+ self.algo.optim_params.vf.learning_rate.epoch_schedule = [] # epochs where LR decay occurs
+ self.algo.optim_params.vf.regularization.L2 = 0.00 # L2 regularization strength
+
+ self.algo.optim_params.policy.learning_rate.initial = 1e-4 # policy learning rate
+ self.algo.optim_params.policy.learning_rate.decay_factor = 0.0 # factor to decay LR by (if epoch schedule non-empty)
+ self.algo.optim_params.policy.learning_rate.epoch_schedule = [] # epochs where LR decay occurs
+ self.algo.optim_params.policy.regularization.L2 = 0.00 # L2 regularization strength
+ self.algo.optim_params.policy.freeze_until_epoch = None # don't train policy until this epoch
+
+ self.algo.multi_step_method = 'one_step'
+ self.algo.use_bc = False
+
+ # unet params
+ self.algo.unet.enabled = True
+ self.algo.unet.diffusion_step_embed_dim = 256
+ self.algo.unet.down_dims = [256,512,1024]
+ self.algo.unet.kernel_size = 5
+ self.algo.unet.n_groups = 8
+
+ # EMA parameters
+ self.algo.ema.enabled = True
+ self.algo.ema.power = 0.75
+
+ self.algo.horizon.observation_horizon = 1
+ self.algo.horizon.action_horizon = 1
+ self.algo.horizon.prediction_horizon = 1
+
+ # Noise Scheduler
+ ## DDPM
+ self.algo.ddpm.enabled = True
+ self.algo.ddpm.num_train_timesteps = 100
+ self.algo.ddpm.num_inference_timesteps = 100
+ self.algo.ddpm.beta_schedule = 'squaredcos_cap_v2'
+ self.algo.ddpm.clip_sample = True
+ self.algo.ddpm.prediction_type = 'epsilon'
+
+ ## DDIM
+ self.algo.ddim.enabled = False
+ self.algo.ddim.num_train_timesteps = 100
+ self.algo.ddim.num_inference_timesteps = 10
+ self.algo.ddim.beta_schedule = 'squaredcos_cap_v2'
+ self.algo.ddim.clip_sample = True
+ self.algo.ddim.set_alpha_to_one = True
+ self.algo.ddim.steps_offset = 0
+ self.algo.ddim.prediction_type = 'epsilon'
+
+ # target network related parameters
+ self.algo.discount = 0.99 # discount factor to use
+ self.algo.target_tau = 0.01 # update rate for target networks
+
+ # ================== Critic Network Config ===================
+ # critic ensemble parameters
+ self.algo.critic.ensemble.n = 2 # number of Q networks in the ensemble
+ self.algo.critic.layer_dims = (300, 400) # critic MLP layer dimensions
+ self.algo.critic.use_huber = False # Huber Loss instead of L2 for critic
+ self.algo.critic.max_gradient_norm = None # L2 gradient clipping for actor
+
+ # ================== Adv Config ==============================
+ self.algo.adv.clip_adv_value = None # whether to clip raw advantage estimates
+ self.algo.adv.beta = 1.0 # temperature for operator
+ self.algo.adv.use_final_clip = True # whether to clip final weight calculations
+
+ self.algo.vf_quantile = 0.5 # IQL expectile of V. 0.5 == mean regression == the
+
+ # BEHAVIOURAL value of the data policy, which is what a RANKING baseline needs: the
+
+ # candidates being ranked are draws from that same policy, so an optimistic upper
+
+ # expectile rescales every candidate's implied advantage by an amount that depends on
+
+ # the local action distribution rather than on the action (owner, 2026-09-23).
+
+ # WAS 0.9: every checkpoint trained before 2026-09-23 -- including the real
+
+ # rise_actor_rsm_real_* and every flagship S0Aidql cell -- carries the optimistic head,
+
+ # so those numbers are optimistic-expectile numbers and must not be pooled with 0.5 ones.
+
+ self.algo.bottleneck_policy = False
+ self.algo.bottleneck_value = False
+ self.algo.q_bottleneck_beta = 0.2
+ self.algo.policy_bottleneck_beta = 0.2
+
+ self.algo.spectral_norm_policy = False
+ self.algo.spectral_norm_value = False
+
+ self.algo.lipschitz = False
+ self.algo.lipschitz_constant = 3.0
+ self.algo.lipschitz_weight = 0.005
+ self.algo.lipschitz_slack = False
+ self.algo.lipschitz_denoiser = False
+
+ # rsm_rise Stage 3 (robomimic/algo/rsm_planner.py, rsm_scorer.py). Defaults = released behaviour.
+ self.algo.plan_n = None # best-of-N over the diffusion sampler; None/1 = released path
+ self.algo.plan_rule = "argmax" # argmax | softmax | topk_uniform | random | permuted | argmin
+ self.algo.plan_temp = 0.2 # softmax temperature on Qbar
+ self.algo.plan_topk = 8 # topk_uniform: k
+ self.algo.plan_chunk = 8 # actions of the executed window the RSM scores
+ self.algo.plan_particles = 16 # successor particles per candidate
+ self.algo.plan_mode = "fold" # d1 | fold | recursive
+ self.algo.plan_depth = 2 # hops L
+ self.algo.plan_beta = 0.95 # hop beta
+ self.algo.plan_gamma = 0.99 # fold discount / recursion restart gamma
+ # gen_q#273 added plan_mpc_horizon to sim_pipeline's PLANNER_KEYS (iql_diffusion.py:147), which
+ # copies it into json_config['algo'], but the key was never declared here -- so config_factory's
+ # key-locked config rejected it and EVERY new idql / iql_diffusion training died at startup in
+ # ~23 s with "Cannot update ... key 'plan_mpc_horizon' does not exist" (REWARD_MATRIX jobs
+ # 1885210/1885211, all 8 cells). Declared here with the SAME default as the training-side field
+ # (0 = off), so this restores released behaviour and changes nothing for any existing cell.
+ self.algo.plan_mpc_horizon = 0 # world-model MPC horizon H in FRAMES (0 = off)
+ self.algo.plan_flow_steps = 8 # Euler steps of the successor ODE
+ self.algo.plan_seed = -1 # >=0: fixed CRN seed per step and selection RNG
+ self.algo.rsm_backend = "mlp" # mlp | dwm | mc | iql
+ self.algo.rsm_ckpt = "" # RSM checkpoint (iql: an S0A .pth or "" for own critic)
+ self.algo.rsm_hop_ckpt = "" # Stage-2 hop head (bc_arm.py policy_r1.pt)
+ self.algo.rsm_feat_stats = "" # Stage-1 cache feat_stats.npz
+ self.algo.rsm_img_layout = "chw" # chw (scripts/relabel_dino.py) | rise_t (RISE offline relabel)
+ self.algo.rsm_dwm_module = "dwm_readout"
+ self.algo.plan_score = "prob" # prob (mean sigmoid, released) | logit (mean raw logit over particles)
+ # | prob_log (prob folded in log space: same quantity, total order)
+ self.algo.plan_rescore_top = 0 # two-stage screening: rescore the top-K of the ranking (0 = off)
+ self.algo.plan_particles_rescore = 0 # ... with M particles (0 = off)
+ self.algo.plan_temperature = 0.0 # 0: checkpoint calib.json T (else 1.0); > 0 overrides the sigmoid T
+ self.algo.plan_lcb_quantile = 0.1 # plan_score=conformal_lcb: particle quantile that ranks (0.1 = 10th pct)
+ self.algo.plan_sample_batch = 0 # >0: DDPM-sample the candidates in slices of this many rows (0 = off)
+ self.algo.plan_max_rows = 0 # >0: scorer row-slice width (cand x particles); 0 = rsm_scorer.MAX_ROWS
+ # coin-terminated beta chain (gen_q#267). plan_mode=chain walks a Bernoulli(p) number of
+ # beta-hops, p = (gamma-beta)/(gamma*(1-beta)) [ogbench_genq/rsm.py:113], and reads membership
+ # ONCE at the frozen node; the composed frame offset is then EXACTLY Geom(1-gamma).
+ # plan_chain_cap=0 => computed from plan_chain_tail_eps (the 1e-3 truncation tail). The cap is
+ # a truncation GUARD, never a tuning knob -- plan_depth is ignored in chain mode.
+ self.algo.plan_chain_cap = 0 # 0 = compute from the tail; >0 = explicit cap (sweep only)
+ self.algo.plan_chain_tail_eps = 1e-3 # P(walk longer than cap) <= this
+ self.algo.plan_chain_seed = -1 # <0 = follow the cell's eval seed
+ self.algo.rsm_adv_v_expectile = 0.5 # E2: tau of the expectile baseline
+ self.algo.rsm_adv_v_samples = 16 # E2: hop-head chunks M for the baseline
+ self.algo.rsm_adv_scale = "td" # E2: td | std
+ self.algo.rsm_adv_permute = False # S3H6 control
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/config/iris_config.py b/code_src/rise_robomimic/robomimic/config/iris_config.py
new file mode 100644
index 0000000000000000000000000000000000000000..c03328cead61f1a977d76bb4b684613586c2a08c
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/config/iris_config.py
@@ -0,0 +1,99 @@
+"""
+Config for IRIS algorithm.
+"""
+
+from robomimic.config.bcq_config import BCQConfig
+from robomimic.config.gl_config import GLConfig
+from robomimic.config.bc_config import BCConfig
+from robomimic.config.hbc_config import HBCConfig
+
+
+class IRISConfig(HBCConfig):
+ ALGO_NAME = "iris"
+
+ def algo_config(self):
+ """
+ This function populates the `config.algo` attribute of the config, and is given to the
+ `Algo` subclass (see `algo/algo.py`) for each algorithm through the `algo_config`
+ argument to the constructor. Any parameter that an algorithm needs to determine its
+ training and test-time behavior should be populated here.
+ """
+
+ # One of ["separate", "cascade"]. In "separate" mode (default),
+ # the planner and actor are trained independently and then the planner subgoal predictions are
+ # used to condition the actor at test-time. In "cascade" mode, the actor is trained directly
+ # on planner subgoal predictions. In "actor_only" mode, only the actor is trained, and in
+ # "planner_only" mode, only the planner is trained.
+ self.algo.mode = "separate"
+
+ self.algo.actor_use_random_subgoals = False # whether to sample subgoal index from [1, subgoal_horizon]
+ self.algo.subgoal_update_interval = 10 # how frequently the subgoal should be updated at test-time (usually matches train.seq_length)
+
+ # ================== Latent Subgoal Config ==================
+
+ # NOTE: latent subgoals are not supported by IRIS, but superclass expects this config
+ self.algo.latent_subgoal.enabled = False
+ self.algo.latent_subgoal.prior_correction.enabled = False
+ self.algo.latent_subgoal.prior_correction.num_samples = 100
+
+ # ================== Planner Config ==================
+
+ # The ValuePlanner planner component is a Goal Learning VAE model
+ self.algo.value_planner.planner = GLConfig().algo # config for goal learning
+ # set subgoal horizon explicitly
+ self.algo.value_planner.planner.subgoal_horizon = 10
+ # ensure VAE is used
+ self.algo.value_planner.planner.vae.enabled = True
+
+ # The ValuePlanner value component is a BCQ model
+ self.algo.value_planner.value = BCQConfig().algo
+ self.algo.value_planner.value.actor.enabled = False # ensure no BCQ actor
+ # number of subgoal samples to use for value planner
+ self.algo.value_planner.num_samples = 100
+
+ # ================== Actor Config ===================
+ self.algo.actor = BCConfig().algo
+ # use RNN
+ self.algo.actor.rnn.enabled = True
+ self.algo.actor.rnn.horizon = 10
+ # remove unused parts of BCConfig algo config
+ del self.algo.actor.gaussian
+ del self.algo.actor.gmm
+ del self.algo.actor.vae
+
+ def observation_config(self):
+ """
+ Update from superclass so that value planner and actor each get their own obs config.
+ """
+ self.observation.value_planner.planner = GLConfig().observation
+ self.observation.value_planner.value = BCQConfig().observation
+ self.observation.actor = BCConfig().observation
+
+ @property
+ def use_goals(self):
+ """
+ Update from superclass - value planner goal modalities determine goal-conditioning.
+ """
+ return len(
+ self.observation.value_planner.planner.modalities.goal.low_dim +
+ self.observation.value_planner.planner.modalities.goal.rgb) > 0
+
+ @property
+ def all_obs_keys(self):
+ """
+ Update from superclass to include modalities from value planner and actor.
+ """
+ # pool all modalities
+ return sorted(tuple(set([
+ obs_key for group in [
+ self.observation.value_planner.planner.modalities.obs.values(),
+ self.observation.value_planner.planner.modalities.goal.values(),
+ self.observation.value_planner.planner.modalities.subgoal.values(),
+ self.observation.value_planner.value.modalities.obs.values(),
+ self.observation.value_planner.value.modalities.goal.values(),
+ self.observation.actor.modalities.obs.values(),
+ self.observation.actor.modalities.goal.values(),
+ ]
+ for modality in group
+ for obs_key in modality
+ ])))
diff --git a/code_src/rise_robomimic/robomimic/config/td3_bc_config.py b/code_src/rise_robomimic/robomimic/config/td3_bc_config.py
new file mode 100644
index 0000000000000000000000000000000000000000..036a2591a91b4a4f5da4e2415dd035117e587900
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/config/td3_bc_config.py
@@ -0,0 +1,111 @@
+"""
+Config for TD3_BC.
+"""
+
+from robomimic.config.base_config import BaseConfig
+
+
+class TD3_BCConfig(BaseConfig):
+ ALGO_NAME = "td3_bc"
+
+ def experiment_config(self):
+ """
+ Update from subclass to set paper defaults for gym envs.
+ """
+ super(TD3_BCConfig, self).experiment_config()
+
+ # no validation and no video rendering
+ self.experiment.validate = False
+ self.experiment.render_video = False
+
+ # save 10 checkpoints throughout training
+ self.experiment.save.every_n_epochs = 20
+
+ # save models that achieve best rollout return instead of best success rate
+ self.experiment.save.on_best_rollout_return = True
+ self.experiment.save.on_best_rollout_success_rate = False
+
+ # epoch definition - 5000 gradient steps per epoch, with 200 epochs = 1M gradient steps, and eval every 1 epochs
+ self.experiment.epoch_every_n_steps = 5000
+
+ # evaluate with normal environment rollouts
+ self.experiment.rollout.enabled = True
+ self.experiment.rollout.n = 50 # paper uses 10, but we can afford to do 50
+ self.experiment.rollout.horizon = 1000
+ self.experiment.rollout.rate = 1 # rollout every epoch to match paper
+
+ def train_config(self):
+ """
+ Update from subclass to set paper defaults for gym envs.
+ """
+ super(TD3_BCConfig, self).train_config()
+
+ # update to normalize observations
+ self.train.hdf5_normalize_obs = True
+
+ # increase batch size to 256
+ self.train.batch_size = 256
+
+ # 200 epochs, with each epoch lasting 5000 gradient steps, for 1M total steps
+ self.train.num_epochs = 200
+
+ def algo_config(self):
+ """
+ This function populates the `config.algo` attribute of the config, and is given to the
+ `Algo` subclass (see `algo/algo.py`) for each algorithm through the `algo_config`
+ argument to the constructor. Any parameter that an algorithm needs to determine its
+ training and test-time behavior should be populated here.
+ """
+
+ # optimization parameters
+ self.algo.optim_params.critic.learning_rate.initial = 3e-4 # critic learning rate
+ self.algo.optim_params.critic.learning_rate.decay_factor = 0.1 # factor to decay LR by (if epoch schedule non-empty)
+ self.algo.optim_params.critic.learning_rate.epoch_schedule = [] # epochs where LR decay occurs
+ self.algo.optim_params.critic.regularization.L2 = 0.00 # L2 regularization strength
+ self.algo.optim_params.critic.start_epoch = -1 # number of epochs before starting critic training (-1 means start right away)
+ self.algo.optim_params.critic.end_epoch = -1 # number of epochs before ending critic training (-1 means start right away)
+
+ self.algo.optim_params.actor.learning_rate.initial = 3e-4 # actor learning rate
+ self.algo.optim_params.actor.learning_rate.decay_factor = 0.1 # factor to decay LR by (if epoch schedule non-empty)
+ self.algo.optim_params.actor.learning_rate.epoch_schedule = [] # epochs where LR decay occurs
+ self.algo.optim_params.actor.regularization.L2 = 0.00 # L2 regularization strength
+ self.algo.optim_params.actor.start_epoch = -1 # number of epochs before starting actor training (-1 means start right away)
+ self.algo.optim_params.actor.end_epoch = -1 # number of epochs before ending actor training (-1 means start right away)
+
+ # alpha value - for weighting critic loss vs. BC loss
+ self.algo.alpha = 2.5
+
+ # target network related parameters
+ self.algo.discount = 0.99 # discount factor to use
+ self.algo.n_step = 1 # for using n-step returns in TD-updates
+ self.algo.target_tau = 0.005 # update rate for target networks
+ self.algo.infinite_horizon = False # if True, scale terminal rewards by 1 / (1 - discount) to treat as infinite horizon
+
+ # ================== Critic Network Config ===================
+ self.algo.critic.use_huber = False # Huber Loss instead of L2 for critic
+ self.algo.critic.max_gradient_norm = None # L2 gradient clipping for critic (None to use no clipping)
+ self.algo.critic.value_bounds = None # optional 2-tuple to ensure lower and upper bound on value estimates
+
+ # critic ensemble parameters (TD3 trick)
+ self.algo.critic.ensemble.n = 2 # number of Q networks in the ensemble
+ self.algo.critic.ensemble.weight = 1.0 # weighting for mixing min and max for target Q value
+
+ self.algo.critic.layer_dims = (256, 256) # size of critic MLP
+
+ # ================== Actor Network Config ===================
+
+ # update actor and target networks every n gradients steps for each critic gradient step
+ self.algo.actor.update_freq = 2
+
+ # exploration noise used to form target action for Q-update - clipped Gaussian noise
+ self.algo.actor.noise_std = 0.2 # zero-mean gaussian noise with this std is applied to actions
+ self.algo.actor.noise_clip = 0.5 # noise is clipped in each dimension to (-noise_clip, noise_clip)
+
+ self.algo.actor.layer_dims = (256, 256) # size of actor MLP
+
+ def observation_config(self):
+ """
+ Update from superclass to use flat observations from gym envs.
+ """
+ super(TD3_BCConfig, self).observation_config()
+ self.observation.modalities.obs.low_dim = ["flat"]
diff --git a/code_src/rise_robomimic/robomimic/envs/__init__.py b/code_src/rise_robomimic/robomimic/envs/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/code_src/rise_robomimic/robomimic/envs/env_base.py b/code_src/rise_robomimic/robomimic/envs/env_base.py
new file mode 100644
index 0000000000000000000000000000000000000000..9634db01b5d1e5bae4077d134f9dd84b021131a4
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/envs/env_base.py
@@ -0,0 +1,241 @@
+"""
+This file contains the base class for environment wrappers that are used
+to provide a standardized environment API for training policies and interacting
+with metadata present in datasets.
+"""
+import abc
+
+
+class EnvType:
+ """
+ Holds environment types - one per environment class.
+ These act as identifiers for different environments.
+ """
+ ROBOSUITE_TYPE = 1
+ GYM_TYPE = 2
+ IG_MOMART_TYPE = 3
+
+
+class EnvBase(abc.ABC):
+ """A base class method for environments used by this repo."""
+ @abc.abstractmethod
+ def __init__(
+ self,
+ env_name,
+ render=False,
+ render_offscreen=False,
+ use_image_obs=False,
+ use_depth_obs=False,
+ postprocess_visual_obs=True,
+ **kwargs,
+ ):
+ """
+ Args:
+ env_name (str): name of environment. Only needs to be provided if making a different
+ environment from the one in @env_meta.
+
+ render (bool): if True, environment supports on-screen rendering
+
+ render_offscreen (bool): if True, environment supports off-screen rendering. This
+ is forced to be True if @env_meta["use_images"] is True.
+
+ use_image_obs (bool): if True, environment is expected to render rgb image observations
+ on every env.step call. Set this to False for efficiency reasons, if image
+ observations are not required.
+
+ use_depth_obs (bool): if True, environment is expected to render depth image observations
+ on every env.step call. Set this to False for efficiency reasons, if depth
+ observations are not required.
+
+ postprocess_visual_obs (bool): if True, postprocess image observations
+ to prepare for learning. This should only be False when extracting observations
+ for saving to a dataset (to save space on RGB images for example).
+ """
+ return
+
+ @abc.abstractmethod
+ def step(self, action):
+ """
+ Step in the environment with an action.
+
+ Args:
+ action (np.array): action to take
+
+ Returns:
+ observation (dict): new observation dictionary
+ reward (float): reward for this step
+ done (bool): whether the task is done
+ info (dict): extra information
+ """
+ return
+
+ @abc.abstractmethod
+ def reset(self):
+ """
+ Reset environment.
+
+ Returns:
+ observation (dict): initial observation dictionary.
+ """
+ return
+
+ @abc.abstractmethod
+ def reset_to(self, state):
+ """
+ Reset to a specific simulator state.
+
+ Args:
+ state (dict): current simulator state
+
+ Returns:
+ observation (dict): observation dictionary after setting the simulator state
+ """
+ return
+
+ @abc.abstractmethod
+ def render(self, mode="human", height=None, width=None, camera_name=None):
+ """Render"""
+ return
+
+ @abc.abstractmethod
+ def get_observation(self):
+ """Get environment observation"""
+ return
+
+ @abc.abstractmethod
+ def get_state(self):
+ """Get environment simulator state, compatible with @reset_to"""
+ return
+
+ @abc.abstractmethod
+ def get_reward(self):
+ """
+ Get current reward.
+ """
+ return
+
+ @abc.abstractmethod
+ def get_goal(self):
+ """
+ Get goal observation. Not all environments support this.
+ """
+ return
+
+ @abc.abstractmethod
+ def set_goal(self, **kwargs):
+ """
+ Set goal observation with external specification. Not all environments support this.
+ """
+ return
+
+ @abc.abstractmethod
+ def is_done(self):
+ """
+ Check if the task is done (not necessarily successful).
+ """
+ return
+
+ @abc.abstractmethod
+ def is_success(self):
+ """
+ Check if the task condition(s) is reached. Should return a dictionary
+ { str: bool } with at least a "task" key for the overall task success,
+ and additional optional keys corresponding to other task criteria.
+ """
+ return
+
+ @property
+ @abc.abstractmethod
+ def action_dimension(self):
+ """
+ Returns dimension of actions (int).
+ """
+ return
+
+ @property
+ @abc.abstractmethod
+ def name(self):
+ """
+ Returns name of environment name (str).
+ """
+ return
+
+ @property
+ @abc.abstractmethod
+ def type(self):
+ """
+ Returns environment type (int) for this kind of environment.
+ This helps identify this env class.
+ """
+ return
+
+ @property
+ def version(self):
+ """
+ Returns version of environment (str).
+ This is not an abstract method, some subclasses do not implement it
+ """
+ return None
+
+ @abc.abstractmethod
+ def serialize(self):
+ """
+ Save all information needed to re-instantiate this environment in a dictionary.
+ This is the same as @env_meta - environment metadata stored in hdf5 datasets,
+ and used in utils/env_utils.py.
+ """
+ return
+
+ @classmethod
+ @abc.abstractmethod
+ def create_for_data_processing(
+ cls,
+ camera_names,
+ camera_height,
+ camera_width,
+ reward_shaping,
+ render=None,
+ render_offscreen=None,
+ use_image_obs=None,
+ use_depth_obs=None,
+ **kwargs,
+ ):
+ """
+ Create environment for processing datasets, which includes extracting
+ observations, labeling dense / sparse rewards, and annotating dones in
+ transitions.
+
+ Args:
+ camera_names ([str]): list of camera names that correspond to image observations
+ camera_height (int): camera height for all cameras
+ camera_width (int): camera width for all cameras
+ reward_shaping (bool): if True, use shaped environment rewards, else use sparse task completion rewards
+ render (bool or None): optionally override rendering behavior. Defaults to False.
+ render_offscreen (bool or None): optionally override rendering behavior. The default value is True if
+ @camera_names is non-empty, False otherwise.
+ use_image_obs (bool or None): optionally override rendering behavior. The default value is True if
+ @camera_names is non-empty, False otherwise.
+ use_depth_obs (bool): if True, use depth observations
+
+ Returns:
+ env (EnvBase instance)
+ """
+ return
+
+ @property
+ @abc.abstractmethod
+ def rollout_exceptions(self):
+ """
+ Return tuple of exceptions to except when doing rollouts. This is useful to ensure
+ that the entire training run doesn't crash because of a bad policy that causes unstable
+ simulation computations.
+ """
+ return
+
+ @property
+ @abc.abstractmethod
+ def base_env(self):
+ """
+ Grabs base simulation environment.
+ """
+ return
diff --git a/code_src/rise_robomimic/robomimic/envs/env_gym.py b/code_src/rise_robomimic/robomimic/envs/env_gym.py
new file mode 100644
index 0000000000000000000000000000000000000000..7b56d1ebb3be670c8e2207fa6afcdf4ee1ec5190
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/envs/env_gym.py
@@ -0,0 +1,267 @@
+"""
+This file contains the gym environment wrapper that is used
+to provide a standardized environment API for training policies and interacting
+with metadata present in datasets.
+"""
+import json
+import numpy as np
+from copy import deepcopy
+
+import gym
+try:
+ import d4rl
+except:
+ print("WARNING: could not load d4rl environments!")
+
+import robomimic.envs.env_base as EB
+import robomimic.utils.obs_utils as ObsUtils
+
+
+class EnvGym(EB.EnvBase):
+ """Wrapper class for gym"""
+ def __init__(
+ self,
+ env_name,
+ render=False,
+ render_offscreen=False,
+ use_image_obs=False,
+ use_depth_obs=False,
+ postprocess_visual_obs=True,
+ **kwargs,
+ ):
+ """
+ Args:
+ env_name (str): name of environment. Only needs to be provided if making a different
+ environment from the one in @env_meta.
+
+ render (bool): ignored - gym envs always support on-screen rendering
+
+ render_offscreen (bool): ignored - gym envs always support off-screen rendering
+
+ use_image_obs (bool): ignored - gym envs don't typically use images
+
+ postprocess_visual_obs (bool): ignored - gym envs don't typically use images
+ """
+ self._init_kwargs = deepcopy(kwargs)
+ self._env_name = env_name
+ self._current_obs = None
+ self._current_reward = None
+ self._current_done = None
+ self._done = None
+ self.env = gym.make(env_name, **kwargs)
+
+ def step(self, action):
+ """
+ Step in the environment with an action.
+
+ Args:
+ action (np.array): action to take
+
+ Returns:
+ observation (dict): new observation dictionary
+ reward (float): reward for this step
+ done (bool): whether the task is done
+ info (dict): extra information
+ """
+ obs, reward, done, info = self.env.step(action)
+ self._current_obs = obs
+ self._current_reward = reward
+ self._current_done = done
+ return self.get_observation(obs), reward, self.is_done(), info
+
+ def reset(self):
+ """
+ Reset environment.
+
+ Returns:
+ observation (dict): initial observation dictionary.
+ """
+ self._current_obs = self.env.reset()
+ self._current_reward = None
+ self._current_done = None
+ return self.get_observation(self._current_obs)
+
+ def reset_to(self, state):
+ """
+ Reset to a specific simulator state.
+
+ Args:
+ state (dict): current simulator state that contains:
+ - states (np.ndarray): initial state of the mujoco environment
+
+ Returns:
+ observation (dict): observation dictionary after setting the simulator state
+ """
+ if hasattr(self.env.unwrapped.sim, "set_state_from_flattened"):
+ self.env.unwrapped.sim.set_state_from_flattened(state["states"])
+ self.env.unwrapped.sim.forward()
+ return { "flat" : self.env.unwrapped._get_obs() }
+ else:
+ raise NotImplementedError
+
+ def render(self, mode="human", height=None, width=None, camera_name=None, **kwargs):
+ """
+ Render from simulation to either an on-screen window or off-screen to RGB array.
+
+ Args:
+ mode (str): pass "human" for on-screen rendering or "rgb_array" for off-screen rendering
+ height (int): height of image to render - only used if mode is "rgb_array"
+ width (int): width of image to render - only used if mode is "rgb_array"
+ """
+ if mode =="human":
+ return self.env.render(mode=mode, **kwargs)
+ if mode == "rgb_array":
+ return self.env.render(mode="rgb_array", height=height, width=width)
+ else:
+ raise NotImplementedError("mode={} is not implemented".format(mode))
+
+ def get_observation(self, obs=None):
+ """
+ Get current environment observation dictionary.
+
+ Args:
+ ob (np.array): current flat observation vector to wrap and provide as a dictionary.
+ If not provided, uses self._current_obs.
+ """
+ if obs is None:
+ assert self._current_obs is not None
+ obs = self._current_obs
+ return { "flat" : np.copy(obs) }
+
+ def get_state(self):
+ """
+ Get current environment simulator state as a dictionary. Should be compatible with @reset_to.
+ """
+ # NOTE: assumes MuJoCo gym task!
+ xml = self.env.sim.model.get_xml() # model xml file
+ state = np.array(self.env.sim.get_state().flatten()) # simulator state
+ return dict(model=xml, states=state)
+
+ def get_reward(self):
+ """
+ Get current reward.
+ """
+ assert self._current_reward is not None
+ return self._current_reward
+
+ def get_goal(self):
+ """
+ Get goal observation. Not all environments support this.
+ """
+ raise NotImplementedError
+
+ def set_goal(self, **kwargs):
+ """
+ Set goal observation with external specification. Not all environments support this.
+ """
+ raise NotImplementedError
+
+ def is_done(self):
+ """
+ Check if the task is done (not necessarily successful).
+ """
+ assert self._current_done is not None
+ return self._current_done
+
+ def is_success(self):
+ """
+ Check if the task condition(s) is reached. Should return a dictionary
+ { str: bool } with at least a "task" key for the overall task success,
+ and additional optional keys corresponding to other task criteria.
+ """
+ if hasattr(self.env.unwrapped, "_check_success"):
+ return self.env.unwrapped._check_success()
+
+ # gym envs generally don't check task success - we only compare returns
+ return { "task" : False }
+
+ @property
+ def action_dimension(self):
+ """
+ Returns dimension of actions (int).
+ """
+ return self.env.action_space.shape[0]
+
+ @property
+ def name(self):
+ """
+ Returns name of environment name (str).
+ """
+ return self._env_name
+
+ @property
+ def type(self):
+ """
+ Returns environment type (int) for this kind of environment.
+ This helps identify this env class.
+ """
+ return EB.EnvType.GYM_TYPE
+
+ def serialize(self):
+ """
+ Save all information needed to re-instantiate this environment in a dictionary.
+ This is the same as @env_meta - environment metadata stored in hdf5 datasets,
+ and used in utils/env_utils.py.
+ """
+ return dict(env_name=self.name, type=self.type, env_kwargs=deepcopy(self._init_kwargs))
+
+ @classmethod
+ def create_for_data_processing(
+ cls,
+ env_name,
+ camera_names,
+ camera_height,
+ camera_width,
+ reward_shaping,
+ render=None,
+ render_offscreen=None,
+ use_image_obs=None,
+ use_depth_obs=None,
+ **kwargs,
+ ):
+ """
+ Create environment for processing datasets, which includes extracting
+ observations, labeling dense / sparse rewards, and annotating dones in
+ transitions. For gym environments, input arguments (other than @env_name)
+ are ignored, since environments are mostly pre-configured.
+
+ Args:
+ env_name (str): name of gym environment to create
+
+ Returns:
+ env (EnvGym instance)
+ """
+
+ # make sure to initialize obs utils so it knows which modalities are image modalities.
+ # For currently supported gym tasks, there are no image observations.
+ obs_modality_specs = {
+ "obs": {
+ "low_dim": ["flat"],
+ "rgb": [],
+ }
+ }
+ ObsUtils.initialize_obs_utils_with_obs_specs(obs_modality_specs)
+
+ return cls(env_name=env_name, **kwargs)
+
+ @property
+ def rollout_exceptions(self):
+ """
+ Return tuple of exceptions to except when doing rollouts. This is useful to ensure
+ that the entire training run doesn't crash because of a bad policy that causes unstable
+ simulation computations.
+ """
+ return ()
+
+ @property
+ def base_env(self):
+ """
+ Grabs base simulation environment.
+ """
+ return self.env
+
+ def __repr__(self):
+ """
+ Pretty-print env description.
+ """
+ return self.name + "\n" + json.dumps(self._init_kwargs, sort_keys=True, indent=4)
diff --git a/code_src/rise_robomimic/robomimic/envs/env_ig_momart.py b/code_src/rise_robomimic/robomimic/envs/env_ig_momart.py
new file mode 100644
index 0000000000000000000000000000000000000000..951eedf393c4269a39a26e4ea4b5f69c992a4431
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/envs/env_ig_momart.py
@@ -0,0 +1,414 @@
+"""
+Wrapper environment class to enable using iGibson-based environments used in the MOMART paper
+"""
+
+from copy import deepcopy
+import numpy as np
+import json
+
+import pybullet as p
+import gibson2
+from gibson2.envs.semantic_organize_and_fetch import SemanticOrganizeAndFetch
+from gibson2.utils.custom_utils import ObjectConfig
+import gibson2.external.pybullet_tools.utils as PBU
+import tempfile
+import os
+import yaml
+import cv2
+
+import robomimic.utils.obs_utils as ObsUtils
+import robomimic.envs.env_base as EB
+
+
+# TODO: Once iG 2.0 is more stable, automate available environments, similar to robosuite
+ENV_MAPPING = {
+ "SemanticOrganizeAndFetch": SemanticOrganizeAndFetch,
+}
+
+
+class EnvGibsonMOMART(EB.EnvBase):
+ """
+ Wrapper class for gibson environments (https://github.com/StanfordVL/iGibson) specifically compatible with
+ MoMaRT datasets
+ """
+ def __init__(
+ self,
+ env_name,
+ ig_config,
+ postprocess_visual_obs=True,
+ render=False,
+ render_offscreen=False,
+ use_image_obs=False,
+ use_depth_obs=False,
+ image_height=None,
+ image_width=None,
+ physics_timestep=1./240.,
+ action_timestep=1./20.,
+ **kwargs,
+ ):
+ """
+ Args:
+ ig_config (dict): YAML configuration to use for iGibson, as a dict
+
+ postprocess_visual_obs (bool): if True, postprocess image observations
+ to prepare for learning
+
+ render (bool): if True, environment supports on-screen rendering
+
+ render_offscreen (bool): if True, environment supports off-screen rendering. This
+ is forced to be True if @use_image_obs is True.
+
+ use_image_obs (bool): if True, environment is expected to render rgb image observations
+ on every env.step call. Set this to False for efficiency reasons, if image
+ observations are not required.
+
+ use_depth_obs (bool): if True, environment is expected to render depth image observations
+ on every env.step call. Set this to False for efficiency reasons, if depth
+ observations are not required.
+
+ render_mode (str): How to run simulation rendering. Options are {"pbgui", "iggui", or "headless"}
+
+ image_height (int): If specified, overrides internal iG image height when rendering
+
+ image_width (int): If specified, overrides internal iG image width when rendering
+
+ physics_timestep (float): Pybullet physics timestep to use
+
+ action_timestep (float): Action timestep to use for robot in simulation
+
+ kwargs (unrolled dict): Any args to substitute in the ig_configuration
+ """
+ self._env_name = env_name
+ self.ig_config = deepcopy(ig_config)
+ self.postprocess_visual_obs = postprocess_visual_obs
+ self._init_kwargs = kwargs
+
+ # Determine rendering mode
+ self.render_mode = "iggui" if render else "headless"
+ self.render_onscreen = render
+
+ # Make sure rgb is part of obs in ig config
+ self.ig_config["output"] = list(set(self.ig_config["output"] + ["rgb"]))
+
+ # Warn user that iG always uses a renderer
+ if (not render) and (not render_offscreen):
+ print("WARNING: iGibson always uses a renderer -- using headless by default.")
+
+ # Update ig config
+ for k, v in kwargs.items():
+ assert k in self.ig_config, f"Got unknown ig configuration key {k}!"
+ self.ig_config[k] = v
+
+ # Set rendering values
+ self.obs_img_height = image_height if image_height is not None else self.ig_config.get("obs_image_height", 120)
+ self.obs_img_width = image_width if image_width is not None else self.ig_config.get("obs_image_width", 120)
+
+ # Get class to create
+ envClass = ENV_MAPPING.get(self._env_name, None)
+
+ # Make sure we have a valid environment class
+ assert envClass is not None, "No valid environment for the requested task was found!"
+
+ # Set device idx for rendering
+ # ensure that we select the correct GPU device for rendering by testing for EGL rendering
+ # NOTE: this package should be installed from this link (https://github.com/StanfordVL/egl_probe)
+ import egl_probe
+ device_idx = 0
+ valid_gpu_devices = egl_probe.get_available_devices()
+ if len(valid_gpu_devices) > 0:
+ device_idx = valid_gpu_devices[0]
+
+ # Create environment
+ self.env = envClass(
+ config_file=deepcopy(self.ig_config),
+ mode=self.render_mode,
+ physics_timestep=physics_timestep,
+ action_timestep=action_timestep,
+ device_idx=device_idx,
+ )
+
+ # If we have a viewer, make sure to remove all bodies belonging to the visual markers
+ self.exclude_body_ids = [] # Bodies to exclude when saving state
+ if self.env.simulator.viewer is not None:
+ self.exclude_body_ids.append(self.env.simulator.viewer.constraint_marker.body_id)
+ self.exclude_body_ids.append(self.env.simulator.viewer.constraint_marker2.body_id)
+
+ def step(self, action):
+ """
+ Step in the environment with an action
+
+ Args:
+ action: action to take
+
+ Returns:
+ observation: new observation
+ reward: step reward
+ done: whether the task is done
+ info: extra information
+ """
+ obs, r, done, info = self.env.step(action)
+ obs = self.get_observation(obs)
+ return obs, r, self.is_done(), info
+
+ def reset(self):
+ """Reset environment"""
+ di = self.env.reset()
+ return self.get_observation(di)
+
+ def reset_to(self, state):
+ """
+ Reset to a specific state
+ Args:
+ state (dict): contains:
+ - states (np.ndarray): initial state of the mujoco environment
+ - goal (dict): goal components to reset
+ Returns:
+ new observation
+ """
+ if "states" in state:
+ self.env.reset_to(state["states"], exclude=self.exclude_body_ids)
+
+ if "goal" in state:
+ self.set_goal(**state["goal"])
+
+ # Return obs
+ return self.get_observation()
+
+ def render(self, mode="human", camera_name="rgb", height=None, width=None):
+ """
+ Render
+
+ Args:
+ mode (str): Mode(s) to render. Options are either 'human' (rendering onscreen) or 'rgb' (rendering to
+ frames offscreen)
+ camera_name (str): Name of the camera to use -- valid options are "rgb" or "rgb_wrist"
+ height (int): If specified with width, resizes the rendered image to this height
+ width (int): If specified with height, resizes the rendered image to this width
+
+ Returns:
+ array or None: If rendering to frame, returns the rendered frame. Otherwise, returns None
+ """
+ # Only robotview camera is currently supported
+ assert camera_name in {"rgb", "rgb_wrist"}, \
+ f"Only rgb, rgb_wrist cameras currently supported, got {camera_name}."
+
+ if mode == "human":
+ assert self.render_onscreen, "Rendering has not been enabled for onscreen!"
+ self.env.simulator.sync()
+ else:
+ assert self.env.simulator.renderer is not None, "No renderer enabled for this env!"
+
+ frame = self.env.sensors["vision"].get_obs(self.env)[camera_name]
+
+ # Reshape all frames
+ if height is not None and width is not None:
+ frame = cv2.resize(frame, dsize=(height, width), interpolation=cv2.INTER_CUBIC)
+ return frame
+
+ def resize_obs_frame(self, frame):
+ """
+ Resizes frame to be internal height and width values
+ """
+ return cv2.resize(frame, dsize=(self.obs_img_width, self.obs_img_height), interpolation=cv2.INTER_CUBIC)
+
+ def get_observation(self, di=None):
+ """Get environment observation"""
+ if di is None:
+ di = self.env.get_state()
+ ret = {}
+ for k in di:
+ # RGB Images
+ if "rgb" in k:
+ ret[k] = di[k]
+ # ret[k] = np.transpose(di[k], (2, 0, 1))
+ if self.postprocess_visual_obs:
+ ret[k] = ObsUtils.process_obs(obs=self.resize_obs_frame(ret[k]), obs_key=k)
+
+ # Depth images
+ elif "depth" in k:
+ # ret[k] = np.transpose(di[k], (2, 0, 1))
+ # Values can be corrupted (negative or > 1.0, so we clip values)
+ ret[k] = np.clip(di[k], 0.0, 1.0)
+ if self.postprocess_visual_obs:
+ ret[k] = ObsUtils.process_obs(obs=self.resize_obs_frame(ret[k])[..., None], obs_key=k)
+
+ # Segmentation Images
+ elif "seg" in k:
+ ret[k] = di[k][..., None]
+ if self.postprocess_visual_obs:
+ ret[k] = ObsUtils.process_obs(obs=self.resize_obs_frame(ret[k]), obs_key=k)
+
+ # Scans
+ elif "scan" in k:
+ ret[k] = np.transpose(np.array(di[k]), axes=(1, 0))
+
+ # Compose proprio obs
+ proprio_obs = di["proprio"]
+
+ # Compute intermediate values
+ lin_vel = np.linalg.norm(proprio_obs["base_lin_vel"][:2])
+ ang_vel = proprio_obs["base_ang_vel"][2]
+
+ ret["proprio"] = np.concatenate([
+ proprio_obs["head_joint_pos"],
+ proprio_obs["grasped"],
+ proprio_obs["eef_pos"],
+ proprio_obs["eef_quat"],
+ ])
+
+ # Proprio info that's only relevant for navigation
+ ret["proprio_nav"] = np.concatenate([
+ [lin_vel],
+ [ang_vel],
+ ])
+
+ # Compose task obs
+ ret["object"] = np.concatenate([
+ np.array(di["task_obs"]["object-state"]),
+ ])
+
+ # Add ground truth navigational state
+ ret["gt_nav"] = np.concatenate([
+ proprio_obs["base_pos"][:2],
+ [np.sin(proprio_obs["base_rpy"][2])],
+ [np.cos(proprio_obs["base_rpy"][2])],
+ ])
+
+ return ret
+
+ def sync_task(self):
+ """
+ Method to synchronize iG task, since we're not actually resetting the env but instead setting states directly.
+ Should only be called after resetting the initial state of an episode
+ """
+ self.env.task.update_target_object_init_pos()
+ self.env.task.update_location_info()
+
+ def set_task_conditions(self, task_conditions):
+ """
+ Method to override task conditions (e.g.: target object), useful in cases such as playing back
+ from demonstrations
+
+ Args:
+ task_conditions (dict): Keyword-mapped arguments to pass to task instance to set internally
+ """
+ self.env.set_task_conditions(task_conditions)
+
+ def get_state(self):
+ """Get iG flattened state"""
+ return {"states": PBU.WorldSaver(exclude_body_ids=self.exclude_body_ids).serialize()}
+
+ def get_reward(self):
+ return self.env.task.get_reward(self.env)[0]
+ # return float(self.is_success()["task"])
+
+ def get_goal(self):
+ """Get goal specification"""
+ # No support yet in iG
+ raise NotImplementedError
+
+ def set_goal(self, **kwargs):
+ """Set env target with external specification"""
+ # No support yet in iG
+ raise NotImplementedError
+
+ def is_done(self):
+ """Check if the agent is done (not necessarily successful)."""
+ return False
+
+ def is_success(self):
+ """
+ Check if the task condition(s) is reached. Should return a dictionary
+ { str: bool } with at least a "task" key for the overall task success,
+ and additional optional keys corresponding to other task criteria.
+ """
+ succ = self.env.check_success()
+ if isinstance(succ, dict):
+ assert "task" in succ
+ return succ
+ return { "task" : succ }
+
+ @classmethod
+ def create_for_data_processing(
+ cls,
+ env_name,
+ camera_names,
+ camera_height,
+ camera_width,
+ reward_shaping,
+ render=None,
+ render_offscreen=None,
+ use_image_obs=None,
+ use_depth_obs=None,
+ **kwargs,
+ ):
+ """
+ Create environment for processing datasets, which includes extracting
+ observations, labeling dense / sparse rewards, and annotating dones in
+ transitions.
+
+ Args:
+ env_name (str): name of environment
+ camera_names (list of str): list of camera names that correspond to image observations
+ camera_height (int): camera height for all cameras
+ camera_width (int): camera width for all cameras
+ reward_shaping (bool): if True, use shaped environment rewards, else use sparse task completion rewards
+ render (bool or None): optionally override rendering behavior
+ render_offscreen (bool or None): optionally override rendering behavior
+ use_image_obs (bool or None): optionally override rendering behavior
+ """
+ has_camera = (len(camera_names) > 0)
+
+ # note that @postprocess_visual_obs is False since this env's images will be written to a dataset
+ return cls(
+ env_name=env_name,
+ render=(False if render is None else render),
+ render_offscreen=(has_camera if render_offscreen is None else render_offscreen),
+ use_image_obs=(has_camera if use_image_obs is None else use_image_obs),
+ postprocess_visual_obs=False,
+ image_height=camera_height,
+ image_width=camera_width,
+ **kwargs,
+ )
+
+ @property
+ def action_dimension(self):
+ """Action dimension"""
+ return self.env.robots[0].action_dim
+
+ @property
+ def name(self):
+ """Environment name"""
+ return self._env_name
+
+ @property
+ def type(self):
+ """Environment type"""
+ return EB.EnvType.IG_MOMART_TYPE
+
+ def serialize(self):
+ """Serialize to dictionary"""
+ return dict(env_name=self.name, type=self.type,
+ ig_config=self.ig_config,
+ env_kwargs=deepcopy(self._init_kwargs))
+
+ @classmethod
+ def deserialize(cls, info, postprocess_visual_obs=True):
+ """Create environment with external info"""
+ return cls(env_name=info["env_name"], ig_config=info["ig_config"], postprocess_visual_obs=postprocess_visual_obs, **info["env_kwargs"])
+
+ @property
+ def rollout_exceptions(self):
+ """Return tuple of exceptions to except when doing rollouts"""
+ return (RuntimeError)
+
+ @property
+ def base_env(self):
+ """
+ Grabs base simulation environment.
+ """
+ return self.env
+
+ def __repr__(self):
+ return self.name + "\n" + json.dumps(self._init_kwargs, sort_keys=True, indent=4) + \
+ "\niGibson Config: \n" + json.dumps(self.ig_config, sort_keys=True, indent=4)
diff --git a/code_src/rise_robomimic/robomimic/envs/env_robosuite.py b/code_src/rise_robomimic/robomimic/envs/env_robosuite.py
new file mode 100644
index 0000000000000000000000000000000000000000..2b675ee3d9d886589a1f993c8c2b606d5fb056ec
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/envs/env_robosuite.py
@@ -0,0 +1,520 @@
+"""
+This file contains the robosuite environment wrapper that is used
+to provide a standardized environment API for training policies and interacting
+with metadata present in datasets.
+"""
+import json
+import numpy as np
+from copy import deepcopy
+
+import robosuite
+import robosuite.utils.transform_utils as T
+try:
+ # this is needed for ensuring robosuite can find the additional mimicgen environments (see https://mimicgen.github.io)
+ import mimicgen
+except ImportError:
+ pass
+try:
+ # deprecated version of mimicgen
+ import mimicgen_envs
+except ImportError:
+ pass
+
+import robomimic.utils.obs_utils as ObsUtils
+import robomimic.envs.env_base as EB
+
+# protect against missing mujoco-py module, since robosuite might be using mujoco-py or DM backend
+try:
+ import mujoco_py
+ MUJOCO_EXCEPTIONS = [mujoco_py.builder.MujocoException]
+except ImportError:
+ MUJOCO_EXCEPTIONS = []
+
+
+class EnvRobosuite(EB.EnvBase):
+ """Wrapper class for robosuite environments (https://github.com/ARISE-Initiative/robosuite)"""
+ def __init__(
+ self,
+ env_name,
+ render=False,
+ render_offscreen=False,
+ use_image_obs=False,
+ use_depth_obs=False,
+ postprocess_visual_obs=True,
+ **kwargs,
+ ):
+ """
+ Args:
+ env_name (str): name of environment. Only needs to be provided if making a different
+ environment from the one in @env_meta.
+
+ render (bool): if True, environment supports on-screen rendering
+
+ render_offscreen (bool): if True, environment supports off-screen rendering. This
+ is forced to be True if @env_meta["use_images"] is True.
+
+ use_image_obs (bool): if True, environment is expected to render rgb image observations
+ on every env.step call. Set this to False for efficiency reasons, if image
+ observations are not required.
+
+ use_depth_obs (bool): if True, environment is expected to render depth image observations
+ on every env.step call. Set this to False for efficiency reasons, if depth
+ observations are not required.
+
+ postprocess_visual_obs (bool): if True, postprocess image observations
+ to prepare for learning. This should only be False when extracting observations
+ for saving to a dataset (to save space on RGB images for example).
+ """
+ self.postprocess_visual_obs = postprocess_visual_obs
+ self.use_depth_obs = use_depth_obs
+
+ # robosuite version check
+ self._is_v1 = (robosuite.__version__.split(".")[0] == "1")
+ if self._is_v1:
+ assert (int(robosuite.__version__.split(".")[1]) >= 2), "only support robosuite v0.3 and v1.2+"
+
+ kwargs = deepcopy(kwargs)
+
+ # update kwargs based on passed arguments
+ update_kwargs = dict(
+ has_renderer=render,
+ has_offscreen_renderer=(render_offscreen or use_image_obs),
+ ignore_done=True,
+ use_object_obs=True,
+ use_camera_obs=use_image_obs,
+ camera_depths=use_depth_obs,
+ )
+ kwargs.update(update_kwargs)
+
+ if self._is_v1:
+ if kwargs["has_offscreen_renderer"]:
+ # ensure that we select the correct GPU device for rendering by testing for EGL rendering
+ # NOTE: this package should be installed from this link (https://github.com/StanfordVL/egl_probe)
+ import egl_probe
+ valid_gpu_devices = egl_probe.get_available_devices()
+ if len(valid_gpu_devices) > 0:
+ kwargs["render_gpu_device_id"] = valid_gpu_devices[0]
+ else:
+ # make sure gripper visualization is turned off (we almost always want this for learning)
+ kwargs["gripper_visualization"] = False
+ del kwargs["camera_depths"]
+ kwargs["camera_depth"] = use_depth_obs # rename kwarg
+
+ self._env_name = env_name
+ self._init_kwargs = deepcopy(kwargs)
+ self.env = robosuite.make(self._env_name, **kwargs)
+
+ if self._is_v1:
+ # Make sure joint position observations and eef vel observations are active
+ for ob_name in self.env.observation_names:
+ if ("joint_pos" in ob_name) or ("eef_vel" in ob_name):
+ self.env.modify_observable(observable_name=ob_name, attribute="active", modifier=True)
+
+ def step(self, action):
+ """
+ Step in the environment with an action.
+
+ Args:
+ action (np.array): action to take
+
+ Returns:
+ observation (dict): new observation dictionary
+ reward (float): reward for this step
+ done (bool): whether the task is done
+ info (dict): extra information
+ """
+ obs, r, done, info = self.env.step(action)
+ obs = self.get_observation(obs)
+ return obs, r, self.is_done(), info
+
+ def reset(self):
+ """
+ Reset environment.
+
+ Returns:
+ observation (dict): initial observation dictionary.
+ """
+ di = self.env.reset()
+ return self.get_observation(di)
+
+ def reset_to(self, state):
+ """
+ Reset to a specific simulator state.
+
+ Args:
+ state (dict): current simulator state that contains one or more of:
+ - states (np.ndarray): initial state of the mujoco environment
+ - model (str): mujoco scene xml
+
+ Returns:
+ observation (dict): observation dictionary after setting the simulator state (only
+ if "states" is in @state)
+ """
+ should_ret = False
+ if "model" in state:
+ self.reset()
+ robosuite_version_id = int(robosuite.__version__.split(".")[1])
+ if robosuite_version_id <= 3:
+ from robosuite.utils.mjcf_utils import postprocess_model_xml
+ xml = postprocess_model_xml(state["model"])
+ else:
+ # v1.4 and above use the class-based edit_model_xml function
+ xml = self.env.edit_model_xml(state["model"])
+ self.env.reset_from_xml_string(xml)
+ self.env.sim.reset()
+ if not self._is_v1:
+ # hide teleop visualization after restoring from model
+ self.env.sim.model.site_rgba[self.env.eef_site_id] = np.array([0., 0., 0., 0.])
+ self.env.sim.model.site_rgba[self.env.eef_cylinder_id] = np.array([0., 0., 0., 0.])
+ if "states" in state:
+ self.env.sim.set_state_from_flattened(state["states"])
+ self.env.sim.forward()
+ should_ret = True
+
+ if "goal" in state:
+ self.set_goal(**state["goal"])
+ if should_ret:
+ # only return obs if we've done a forward call - otherwise the observations will be garbage
+ return self.get_observation()
+ return None
+
+ def render(self, mode="human", height=None, width=None, camera_name="agentview"):
+ """
+ Render from simulation to either an on-screen window or off-screen to RGB array.
+
+ Args:
+ mode (str): pass "human" for on-screen rendering or "rgb_array" for off-screen rendering
+ height (int): height of image to render - only used if mode is "rgb_array"
+ width (int): width of image to render - only used if mode is "rgb_array"
+ camera_name (str): camera name to use for rendering
+ """
+ if mode == "human":
+ cam_id = self.env.sim.model.camera_name2id(camera_name)
+ self.env.viewer.set_camera(cam_id)
+ return self.env.render()
+ elif mode == "rgb_array":
+ im = self.env.sim.render(height=height, width=width, camera_name=camera_name)
+ if self.use_depth_obs:
+ # render() returns a tuple when self.use_depth_obs=True
+ return im[0][::-1]
+ return im[::-1]
+ else:
+ raise NotImplementedError("mode={} is not implemented".format(mode))
+
+ def get_observation(self, di=None):
+ """
+ Get current environment observation dictionary.
+
+ Args:
+ di (dict): current raw observation dictionary from robosuite to wrap and provide
+ as a dictionary. If not provided, will be queried from robosuite.
+ """
+ if di is None:
+ di = self.env._get_observations(force_update=True) if self._is_v1 else self.env._get_observation()
+ ret = {}
+
+ for k in di:
+ if (k in ObsUtils.OBS_KEYS_TO_MODALITIES) and ObsUtils.key_is_obs_modality(key=k, obs_modality="rgb"):
+ # by default images from mujoco are flipped in height
+ ret[k] = di[k][::-1]
+ if self.postprocess_visual_obs:
+ ret[k] = ObsUtils.process_obs(obs=ret[k], obs_key=k)
+ elif (k in ObsUtils.OBS_KEYS_TO_MODALITIES) and ObsUtils.key_is_obs_modality(key=k, obs_modality="depth"):
+ # by default depth images from mujoco are flipped in height
+ ret[k] = di[k][::-1]
+ if len(ret[k].shape) == 2:
+ ret[k] = ret[k][..., None] # (H, W, 1)
+ assert len(ret[k].shape) == 3
+ # scale entries in depth map to correspond to real distance.
+ ret[k] = self.get_real_depth_map(ret[k])
+ if self.postprocess_visual_obs:
+ ret[k] = ObsUtils.process_obs(obs=ret[k], obs_key=k)
+
+ # "object" key contains object information
+ ret["object"] = np.array(di["object-state"])
+
+ if self._is_v1:
+ for robot in self.env.robots:
+ # add all robot-arm-specific observations. Note the (k not in ret) check
+ # ensures that we don't accidentally add robot wrist images a second time
+ pf = robot.robot_model.naming_prefix
+ for k in di:
+ if k.startswith(pf) and (k not in ret) and \
+ (not k.endswith("proprio-state")):
+ ret[k] = np.array(di[k])
+ else:
+ # minimal proprioception for older versions of robosuite
+ ret["proprio"] = np.array(di["robot-state"])
+ ret["eef_pos"] = np.array(di["eef_pos"])
+ ret["eef_quat"] = np.array(di["eef_quat"])
+ ret["gripper_qpos"] = np.array(di["gripper_qpos"])
+ return ret
+
+ def get_real_depth_map(self, depth_map):
+ """
+ Reproduced from https://github.com/ARISE-Initiative/robosuite/blob/c57e282553a4f42378f2635b9a3cbc4afba270fd/robosuite/utils/camera_utils.py#L106
+ since older versions of robosuite do not have this conversion from normalized depth values returned by MuJoCo
+ to real depth values.
+ """
+ # Make sure that depth values are normalized
+ assert np.all(depth_map >= 0.0) and np.all(depth_map <= 1.0)
+ extent = self.env.sim.model.stat.extent
+ far = self.env.sim.model.vis.map.zfar * extent
+ near = self.env.sim.model.vis.map.znear * extent
+ return near / (1.0 - depth_map * (1.0 - near / far))
+
+ def get_camera_intrinsic_matrix(self, camera_name, camera_height, camera_width):
+ """
+ Obtains camera intrinsic matrix.
+ Args:
+ camera_name (str): name of camera
+ camera_height (int): height of camera images in pixels
+ camera_width (int): width of camera images in pixels
+ Return:
+ K (np.array): 3x3 camera matrix
+ """
+ cam_id = self.env.sim.model.camera_name2id(camera_name)
+ fovy = self.env.sim.model.cam_fovy[cam_id]
+ f = 0.5 * camera_height / np.tan(fovy * np.pi / 360)
+ K = np.array([[f, 0, camera_width / 2], [0, f, camera_height / 2], [0, 0, 1]])
+ return K
+
+ def get_camera_extrinsic_matrix(self, camera_name):
+ """
+ Returns a 4x4 homogenous matrix corresponding to the camera pose in the
+ world frame. MuJoCo has a weird convention for how it sets up the
+ camera body axis, so we also apply a correction so that the x and y
+ axis are along the camera view and the z axis points along the
+ viewpoint.
+ Normal camera convention: https://docs.opencv.org/2.4/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.html
+ Args:
+ camera_name (str): name of camera
+ Return:
+ R (np.array): 4x4 camera extrinsic matrix
+ """
+ cam_id = self.env.sim.model.camera_name2id(camera_name)
+ camera_pos = self.env.sim.data.cam_xpos[cam_id]
+ camera_rot = self.env.sim.data.cam_xmat[cam_id].reshape(3, 3)
+ R = T.make_pose(camera_pos, camera_rot)
+
+ # IMPORTANT! This is a correction so that the camera axis is set up along the viewpoint correctly.
+ camera_axis_correction = np.array(
+ [[1.0, 0.0, 0.0, 0.0], [0.0, -1.0, 0.0, 0.0], [0.0, 0.0, -1.0, 0.0], [0.0, 0.0, 0.0, 1.0]]
+ )
+ R = R @ camera_axis_correction
+ return R
+
+ def get_camera_transform_matrix(self, camera_name, camera_height, camera_width):
+ """
+ Camera transform matrix to project from world coordinates to pixel coordinates.
+ Args:
+ camera_name (str): name of camera
+ camera_height (int): height of camera images in pixels
+ camera_width (int): width of camera images in pixels
+ Return:
+ K (np.array): 4x4 camera matrix to project from world coordinates to pixel coordinates
+ """
+ R = self.get_camera_extrinsic_matrix(camera_name=camera_name)
+ K = self.get_camera_intrinsic_matrix(
+ camera_name=camera_name, camera_height=camera_height, camera_width=camera_width
+ )
+ K_exp = np.eye(4)
+ K_exp[:3, :3] = K
+
+ # Takes a point in world, transforms to camera frame, and then projects onto image plane.
+ return K_exp @ T.pose_inv(R)
+
+ def get_state(self):
+ """
+ Get current environment simulator state as a dictionary. Should be compatible with @reset_to.
+ """
+ xml = self.env.sim.model.get_xml() # model xml file
+ state = np.array(self.env.sim.get_state().flatten()) # simulator state
+ return dict(model=xml, states=state)
+
+ def get_reward(self):
+ """
+ Get current reward.
+ """
+ return self.env.reward()
+
+ def get_goal(self):
+ """
+ Get goal observation. Not all environments support this.
+ """
+ return self.get_observation(self.env._get_goal())
+
+ def set_goal(self, **kwargs):
+ """
+ Set goal observation with external specification. Not all environments support this.
+ """
+ return self.env.set_goal(**kwargs)
+
+ def is_done(self):
+ """
+ Check if the task is done (not necessarily successful).
+ """
+
+ # Robosuite envs always rollout to fixed horizon.
+ return False
+
+ def is_success(self):
+ """
+ Check if the task condition(s) is reached. Should return a dictionary
+ { str: bool } with at least a "task" key for the overall task success,
+ and additional optional keys corresponding to other task criteria.
+ """
+ succ = self.env._check_success()
+ if isinstance(succ, dict):
+ assert "task" in succ
+ return succ
+ return { "task" : succ }
+
+ @property
+ def action_dimension(self):
+ """
+ Returns dimension of actions (int).
+ """
+ return self.env.action_spec[0].shape[0]
+
+ @property
+ def name(self):
+ """
+ Returns name of environment name (str).
+ """
+ return self._env_name
+
+ @property
+ def type(self):
+ """
+ Returns environment type (int) for this kind of environment.
+ This helps identify this env class.
+ """
+ return EB.EnvType.ROBOSUITE_TYPE
+
+ @property
+ def version(self):
+ """
+ Returns version of robosuite used for this environment, eg. 1.2.0
+ """
+ return robosuite.__version__
+
+ def serialize(self):
+ """
+ Save all information needed to re-instantiate this environment in a dictionary.
+ This is the same as @env_meta - environment metadata stored in hdf5 datasets,
+ and used in utils/env_utils.py.
+ """
+ return dict(
+ env_name=self.name,
+ env_version=self.version,
+ type=self.type,
+ env_kwargs=deepcopy(self._init_kwargs)
+ )
+
+ @classmethod
+ def create_for_data_processing(
+ cls,
+ env_name,
+ camera_names,
+ camera_height,
+ camera_width,
+ reward_shaping,
+ render=None,
+ render_offscreen=None,
+ use_image_obs=None,
+ use_depth_obs=None,
+ **kwargs,
+ ):
+ """
+ Create environment for processing datasets, which includes extracting
+ observations, labeling dense / sparse rewards, and annotating dones in
+ transitions.
+
+ Args:
+ env_name (str): name of environment
+ camera_names (list of str): list of camera names that correspond to image observations
+ camera_height (int): camera height for all cameras
+ camera_width (int): camera width for all cameras
+ reward_shaping (bool): if True, use shaped environment rewards, else use sparse task completion rewards
+ render (bool or None): optionally override rendering behavior. Defaults to False.
+ render_offscreen (bool or None): optionally override rendering behavior. The default value is True if
+ @camera_names is non-empty, False otherwise.
+ use_image_obs (bool or None): optionally override rendering behavior. The default value is True if
+ @camera_names is non-empty, False otherwise.
+ use_depth_obs (bool): if True, use depth observations
+ """
+ is_v1 = (robosuite.__version__.split(".")[0] == "1")
+ has_camera = (len(camera_names) > 0)
+
+ new_kwargs = {
+ "reward_shaping": reward_shaping,
+ }
+
+ if has_camera:
+ if is_v1:
+ new_kwargs["camera_names"] = list(camera_names)
+ new_kwargs["camera_heights"] = camera_height
+ new_kwargs["camera_widths"] = camera_width
+ else:
+ assert len(camera_names) == 1
+ if has_camera:
+ new_kwargs["camera_name"] = camera_names[0]
+ new_kwargs["camera_height"] = camera_height
+ new_kwargs["camera_width"] = camera_width
+
+ kwargs.update(new_kwargs)
+
+ # also initialize obs utils so it knows which modalities are image modalities
+ image_modalities = list(camera_names)
+ depth_modalities = list(camera_names)
+ if is_v1:
+ image_modalities = ["{}_image".format(cn) for cn in camera_names]
+ depth_modalities = ["{}_depth".format(cn) for cn in camera_names]
+ elif has_camera:
+ # v0.3 only had support for one image, and it was named "image"
+ assert len(image_modalities) == 1
+ image_modalities = ["image"]
+ depth_modalities = ["depth"]
+ obs_modality_specs = {
+ "obs": {
+ "low_dim": [], # technically unused, so we don't have to specify all of them
+ "rgb": image_modalities,
+ }
+ }
+ if use_depth_obs:
+ obs_modality_specs["obs"]["depth"] = depth_modalities
+ ObsUtils.initialize_obs_utils_with_obs_specs(obs_modality_specs)
+
+ # note that @postprocess_visual_obs is False since this env's images will be written to a dataset
+ return cls(
+ env_name=env_name,
+ render=(False if render is None else render),
+ render_offscreen=(has_camera if render_offscreen is None else render_offscreen),
+ use_image_obs=(has_camera if use_image_obs is None else use_image_obs),
+ use_depth_obs=use_depth_obs,
+ postprocess_visual_obs=False,
+ **kwargs,
+ )
+
+ @property
+ def rollout_exceptions(self):
+ """
+ Return tuple of exceptions to except when doing rollouts. This is useful to ensure
+ that the entire training run doesn't crash because of a bad policy that causes unstable
+ simulation computations.
+ """
+ return tuple(MUJOCO_EXCEPTIONS)
+
+ @property
+ def base_env(self):
+ """
+ Grabs base simulation environment.
+ """
+ return self.env
+
+ def __repr__(self):
+ """
+ Pretty-print env description.
+ """
+ return self.name + "\n" + json.dumps(self._init_kwargs, sort_keys=True, indent=4)
diff --git a/code_src/rise_robomimic/robomimic/envs/wrappers.py b/code_src/rise_robomimic/robomimic/envs/wrappers.py
new file mode 100644
index 0000000000000000000000000000000000000000..9936f9de70573c78aba8389328b911a139666f05
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/envs/wrappers.py
@@ -0,0 +1,220 @@
+"""
+A collection of useful environment wrappers.
+"""
+from copy import deepcopy
+import textwrap
+import numpy as np
+from collections import deque
+
+import robomimic.envs.env_base as EB
+
+
+class EnvWrapper(object):
+ """
+ Base class for all environment wrappers in robomimic.
+ """
+ def __init__(self, env):
+ """
+ Args:
+ env (EnvBase instance): The environment to wrap.
+ """
+ assert isinstance(env, EB.EnvBase) or isinstance(env, EnvWrapper)
+ self.env = env
+
+ @classmethod
+ def class_name(cls):
+ return cls.__name__
+
+ def _warn_double_wrap(self):
+ """
+ Utility function that checks if we're accidentally trying to double wrap an env
+ Raises:
+ Exception: [Double wrapping env]
+ """
+ env = self.env
+ while True:
+ if isinstance(env, EnvWrapper):
+ if env.class_name() == self.class_name():
+ raise Exception(
+ "Attempted to double wrap with Wrapper: {}".format(
+ self.__class__.__name__
+ )
+ )
+ env = env.env
+ else:
+ break
+
+ @property
+ def unwrapped(self):
+ """
+ Grabs unwrapped environment
+
+ Returns:
+ env (EnvBase instance): Unwrapped environment
+ """
+ if hasattr(self.env, "unwrapped"):
+ return self.env.unwrapped
+ else:
+ return self.env
+
+ def _to_string(self):
+ """
+ Subclasses should override this method to print out info about the
+ wrapper (such as arguments passed to it).
+ """
+ return ''
+
+ def __repr__(self):
+ """Pretty print environment."""
+ header = '{}'.format(str(self.__class__.__name__))
+ msg = ''
+ indent = ' ' * 4
+ if self._to_string() != '':
+ msg += textwrap.indent("\n" + self._to_string(), indent)
+ msg += textwrap.indent("\nenv={}".format(self.env), indent)
+ msg = header + '(' + msg + '\n)'
+ return msg
+
+ # this method is a fallback option on any methods the original env might support
+ def __getattr__(self, attr):
+ # using getattr ensures that both __getattribute__ and __getattr__ (fallback) get called
+ # (see https://stackoverflow.com/questions/3278077/difference-between-getattr-vs-getattribute)
+ orig_attr = getattr(self.env, attr)
+ if callable(orig_attr):
+
+ def hooked(*args, **kwargs):
+ result = orig_attr(*args, **kwargs)
+ # prevent wrapped_class from becoming unwrapped
+ if id(result) == id(self.env):
+ return self
+ return result
+
+ return hooked
+ else:
+ return orig_attr
+
+
+class FrameStackWrapper(EnvWrapper):
+ """
+ Wrapper for frame stacking observations during rollouts. The agent
+ receives a sequence of past observations instead of a single observation
+ when it calls @env.reset, @env.reset_to, or @env.step in the rollout loop.
+ """
+ def __init__(self, env, num_frames):
+ """
+ Args:
+ env (EnvBase instance): The environment to wrap.
+ num_frames (int): number of past observations (including current observation)
+ to stack together. Must be greater than 1 (otherwise this wrapper would
+ be a no-op).
+ """
+ assert num_frames > 1, "error: FrameStackWrapper must have num_frames > 1 but got num_frames of {}".format(num_frames)
+
+ super(FrameStackWrapper, self).__init__(env=env)
+ self.num_frames = num_frames
+
+ # keep track of last @num_frames observations for each obs key
+ self.obs_history = None
+
+ def _get_initial_obs_history(self, init_obs):
+ """
+ Helper method to get observation history from the initial observation, by
+ repeating it.
+
+ Returns:
+ obs_history (dict): a deque for each observation key, with an extra
+ leading dimension of 1 for each key (for easy concatenation later)
+ """
+ obs_history = {}
+ for k in init_obs:
+ obs_history[k] = deque(
+ [init_obs[k][None] for _ in range(self.num_frames)],
+ maxlen=self.num_frames,
+ )
+ return obs_history
+
+ def _get_stacked_obs_from_history(self):
+ """
+ Helper method to convert internal variable @self.obs_history to a
+ stacked observation where each key is a numpy array with leading dimension
+ @self.num_frames.
+ """
+ # concatenate all frames per key so we return a numpy array per key
+ return { k : np.concatenate(self.obs_history[k], axis=0) for k in self.obs_history }
+
+ def cache_obs_history(self):
+ self.obs_history_cache = deepcopy(self.obs_history)
+
+ def uncache_obs_history(self):
+ self.obs_history = self.obs_history_cache
+ self.obs_history_cache = None
+
+ def reset(self):
+ """
+ Modify to return frame stacked observation which is @self.num_frames copies of
+ the initial observation.
+
+ Returns:
+ obs_stacked (dict): each observation key in original observation now has
+ leading shape @self.num_frames and consists of the previous @self.num_frames
+ observations
+ """
+ obs = self.env.reset()
+ self.timestep = 0 # always zero regardless of timestep type
+ self.update_obs(obs, reset=True)
+ self.obs_history = self._get_initial_obs_history(init_obs=obs)
+ return self._get_stacked_obs_from_history()
+
+ def reset_to(self, state):
+ """
+ Modify to return frame stacked observation which is @self.num_frames copies of
+ the initial observation.
+
+ Returns:
+ obs_stacked (dict): each observation key in original observation now has
+ leading shape @self.num_frames and consists of the previous @self.num_frames
+ observations
+ """
+ obs = self.env.reset_to(state)
+ self.timestep = 0 # always zero regardless of timestep type
+ self.update_obs(obs, reset=True)
+ self.obs_history = self._get_initial_obs_history(init_obs=obs)
+ return self._get_stacked_obs_from_history()
+
+ def step(self, action):
+ """
+ Modify to update the internal frame history and return frame stacked observation,
+ which will have leading dimension @self.num_frames for each key.
+
+ Args:
+ action (np.array): action to take
+
+ Returns:
+ obs_stacked (dict): each observation key in original observation now has
+ leading shape @self.num_frames and consists of the previous @self.num_frames
+ observations
+ reward (float): reward for this step
+ done (bool): whether the task is done
+ info (dict): extra information
+ """
+ obs, r, done, info = self.env.step(action)
+ self.update_obs(obs, action=action, reset=False)
+ # update frame history
+ for k in obs:
+ # make sure to have leading dim of 1 for easy concatenation
+ self.obs_history[k].append(obs[k][None])
+ obs_ret = self._get_stacked_obs_from_history()
+ return obs_ret, r, done, info
+
+ def update_obs(self, obs, action=None, reset=False):
+ obs["timesteps"] = np.array([self.timestep])
+
+ if reset:
+ obs["actions"] = np.zeros(self.env.action_dimension)
+ else:
+ self.timestep += 1
+ obs["actions"] = action[: self.env.action_dimension]
+
+ def _to_string(self):
+ """Info to pretty print."""
+ return "num_frames={}".format(self.num_frames)
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/image_dense/bc.json b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/image_dense/bc.json
new file mode 100644
index 0000000000000000000000000000000000000000..dc98a74486a6b8a6746ef146edbbf682783afd39
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/image_dense/bc.json
@@ -0,0 +1,236 @@
+{
+ "algo_name": "bc",
+ "experiment": {
+ "name": "core_bc_can_mg_image_dense",
+ "validate": false,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 20,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 500,
+ "validation_epoch_every_n_steps": 50,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 20,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/can/mg/image_dense_v141.hdf5",
+ "output_dir": "experiments/core/bc/can/mg/image_dense/trained_models",
+ "num_data_workers": 2,
+ "hdf5_cache_mode": "low_dim",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": false,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": null,
+ "hdf5_validation_filter_key": null,
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 16,
+ "num_epochs": 600,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "gaussian": {
+ "enabled": false,
+ "fixed_std": false,
+ "init_std": 0.1,
+ "min_std": 0.01,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "gmm": {
+ "enabled": false,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": false,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 1.0,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "rnn": {
+ "enabled": false,
+ "horizon": 10,
+ "hidden_dim": 400,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos"
+ ],
+ "rgb": [
+ "agentview_image",
+ "robot0_eye_in_hand_image"
+ ],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {
+ "feature_dimension": 64,
+ "backbone_class": "ResNet18Conv",
+ "backbone_kwargs": {
+ "pretrained": false,
+ "input_coord_conv": false
+ },
+ "pool_class": "SpatialSoftmax",
+ "pool_kwargs": {
+ "num_kp": 32,
+ "learnable_temperature": false,
+ "temperature": 1.0,
+ "noise_std": 0.0
+ }
+ },
+ "obs_randomizer_class": "CropRandomizer",
+ "obs_randomizer_kwargs": {
+ "crop_height": 76,
+ "crop_width": 76,
+ "num_crops": 1,
+ "pos_enc": false
+ }
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/image_dense/bc_rnn.json b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/image_dense/bc_rnn.json
new file mode 100644
index 0000000000000000000000000000000000000000..90f3550fa44061ae555eaed9269f7e195d4104ba
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/image_dense/bc_rnn.json
@@ -0,0 +1,233 @@
+{
+ "algo_name": "bc",
+ "experiment": {
+ "name": "core_bc_rnn_can_mg_image_dense",
+ "validate": false,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 20,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 500,
+ "validation_epoch_every_n_steps": 50,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 20,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/can/mg/image_dense_v141.hdf5",
+ "output_dir": "experiments/core/bc_rnn/can/mg/image_dense/trained_models",
+ "num_data_workers": 2,
+ "hdf5_cache_mode": "low_dim",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": false,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": null,
+ "hdf5_validation_filter_key": null,
+ "seq_length": 10,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 16,
+ "num_epochs": 600,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [],
+ "gaussian": {
+ "enabled": false,
+ "fixed_std": false,
+ "init_std": 0.1,
+ "min_std": 0.01,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "gmm": {
+ "enabled": false,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": false,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 1.0,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "rnn": {
+ "enabled": true,
+ "horizon": 10,
+ "hidden_dim": 1000,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos"
+ ],
+ "rgb": [
+ "agentview_image",
+ "robot0_eye_in_hand_image"
+ ],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {
+ "feature_dimension": 64,
+ "backbone_class": "ResNet18Conv",
+ "backbone_kwargs": {
+ "pretrained": false,
+ "input_coord_conv": false
+ },
+ "pool_class": "SpatialSoftmax",
+ "pool_kwargs": {
+ "num_kp": 32,
+ "learnable_temperature": false,
+ "temperature": 1.0,
+ "noise_std": 0.0
+ }
+ },
+ "obs_randomizer_class": "CropRandomizer",
+ "obs_randomizer_kwargs": {
+ "crop_height": 76,
+ "crop_width": 76,
+ "num_crops": 1,
+ "pos_enc": false
+ }
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/image_dense/bcq.json b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/image_dense/bcq.json
new file mode 100644
index 0000000000000000000000000000000000000000..16cd5bc17c45e56346834083c87c9596c3925961
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/image_dense/bcq.json
@@ -0,0 +1,256 @@
+{
+ "algo_name": "bcq",
+ "experiment": {
+ "name": "core_bcq_can_mg_image_dense",
+ "validate": false,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 20,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 500,
+ "validation_epoch_every_n_steps": 50,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 20,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/can/mg/image_dense_v141.hdf5",
+ "output_dir": "experiments/core/bcq/can/mg/image_dense/trained_models",
+ "num_data_workers": 2,
+ "hdf5_cache_mode": "low_dim",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": null,
+ "hdf5_validation_filter_key": null,
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 16,
+ "num_epochs": 600,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "critic": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "action_sampler": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "actor": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ }
+ },
+ "discount": 0.99,
+ "n_step": 1,
+ "target_tau": 0.005,
+ "infinite_horizon": false,
+ "critic": {
+ "use_huber": false,
+ "max_gradient_norm": null,
+ "value_bounds": null,
+ "num_action_samples": 10,
+ "num_action_samples_rollout": 100,
+ "ensemble": {
+ "n": 2,
+ "weight": 0.75
+ },
+ "distributional": {
+ "enabled": false,
+ "num_atoms": 51
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "action_sampler": {
+ "actor_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "gmm": {
+ "enabled": false,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": true,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 0.5,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "freeze_encoder_epoch": -1
+ },
+ "actor": {
+ "enabled": false,
+ "perturbation_scale": 0.05,
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos"
+ ],
+ "rgb": [
+ "agentview_image",
+ "robot0_eye_in_hand_image"
+ ],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {
+ "feature_dimension": 64,
+ "backbone_class": "ResNet18Conv",
+ "backbone_kwargs": {
+ "pretrained": false,
+ "input_coord_conv": false
+ },
+ "pool_class": "SpatialSoftmax",
+ "pool_kwargs": {
+ "num_kp": 32,
+ "learnable_temperature": false,
+ "temperature": 1.0,
+ "noise_std": 0.0
+ }
+ },
+ "obs_randomizer_class": "CropRandomizer",
+ "obs_randomizer_kwargs": {
+ "crop_height": 76,
+ "crop_width": 76,
+ "num_crops": 1,
+ "pos_enc": false
+ }
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/image_dense/cql.json b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/image_dense/cql.json
new file mode 100644
index 0000000000000000000000000000000000000000..8a6247992abcf5dbb2a579f60be1fa931bac9f93
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/image_dense/cql.json
@@ -0,0 +1,203 @@
+{
+ "algo_name": "cql",
+ "experiment": {
+ "name": "core_cql_can_mg_image_dense",
+ "validate": false,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 20,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 500,
+ "validation_epoch_every_n_steps": 50,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 20,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/can/mg/image_dense_v141.hdf5",
+ "output_dir": "experiments/core/cql/can/mg/image_dense/trained_models",
+ "num_data_workers": 2,
+ "hdf5_cache_mode": "low_dim",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": null,
+ "hdf5_validation_filter_key": null,
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 8,
+ "num_epochs": 600,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "critic": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.0,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ },
+ "actor": {
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.0,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "discount": 0.99,
+ "n_step": 1,
+ "target_tau": 0.005,
+ "actor": {
+ "bc_start_steps": 0,
+ "target_entropy": "default",
+ "max_gradient_norm": null,
+ "net": {
+ "type": "gaussian",
+ "common": {
+ "std_activation": "exp",
+ "use_tanh": true,
+ "low_noise_eval": true
+ },
+ "gaussian": {
+ "init_last_fc_weight": 0.001,
+ "init_std": 0.3,
+ "fixed_std": false
+ }
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "critic": {
+ "use_huber": false,
+ "max_gradient_norm": null,
+ "value_bounds": null,
+ "num_action_samples": 1,
+ "cql_weight": 1.0,
+ "deterministic_backup": true,
+ "min_q_weight": 1.0,
+ "target_q_gap": 5.0,
+ "num_random_actions": 10,
+ "ensemble": {
+ "n": 2
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos"
+ ],
+ "rgb": [
+ "agentview_image",
+ "robot0_eye_in_hand_image"
+ ],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {
+ "feature_dimension": 64,
+ "backbone_class": "ResNet18Conv",
+ "backbone_kwargs": {
+ "pretrained": false,
+ "input_coord_conv": false
+ },
+ "pool_class": "SpatialSoftmax",
+ "pool_kwargs": {
+ "num_kp": 32,
+ "learnable_temperature": false,
+ "temperature": 1.0,
+ "noise_std": 0.0
+ }
+ },
+ "obs_randomizer_class": "CropRandomizer",
+ "obs_randomizer_kwargs": {
+ "crop_height": 76,
+ "crop_width": 76,
+ "num_crops": 1,
+ "pos_enc": false
+ }
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/image_sparse/bc.json b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/image_sparse/bc.json
new file mode 100644
index 0000000000000000000000000000000000000000..9f71cbb1ab49fa108b74300635b3cd7ef9d70058
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/image_sparse/bc.json
@@ -0,0 +1,236 @@
+{
+ "algo_name": "bc",
+ "experiment": {
+ "name": "core_bc_can_mg_image_sparse",
+ "validate": false,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 20,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 500,
+ "validation_epoch_every_n_steps": 50,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 20,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/can/mg/image_sparse_v141.hdf5",
+ "output_dir": "experiments/core/bc/can/mg/image_sparse/trained_models",
+ "num_data_workers": 2,
+ "hdf5_cache_mode": "low_dim",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": false,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": null,
+ "hdf5_validation_filter_key": null,
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 16,
+ "num_epochs": 600,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "gaussian": {
+ "enabled": false,
+ "fixed_std": false,
+ "init_std": 0.1,
+ "min_std": 0.01,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "gmm": {
+ "enabled": false,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": false,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 1.0,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "rnn": {
+ "enabled": false,
+ "horizon": 10,
+ "hidden_dim": 400,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos"
+ ],
+ "rgb": [
+ "agentview_image",
+ "robot0_eye_in_hand_image"
+ ],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {
+ "feature_dimension": 64,
+ "backbone_class": "ResNet18Conv",
+ "backbone_kwargs": {
+ "pretrained": false,
+ "input_coord_conv": false
+ },
+ "pool_class": "SpatialSoftmax",
+ "pool_kwargs": {
+ "num_kp": 32,
+ "learnable_temperature": false,
+ "temperature": 1.0,
+ "noise_std": 0.0
+ }
+ },
+ "obs_randomizer_class": "CropRandomizer",
+ "obs_randomizer_kwargs": {
+ "crop_height": 76,
+ "crop_width": 76,
+ "num_crops": 1,
+ "pos_enc": false
+ }
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/image_sparse/bc_rnn.json b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/image_sparse/bc_rnn.json
new file mode 100644
index 0000000000000000000000000000000000000000..6d23d548fe31c701e72bd0f14bd2086dfba4f20b
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/image_sparse/bc_rnn.json
@@ -0,0 +1,233 @@
+{
+ "algo_name": "bc",
+ "experiment": {
+ "name": "core_bc_rnn_can_mg_image_sparse",
+ "validate": false,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 20,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 500,
+ "validation_epoch_every_n_steps": 50,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 20,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/can/mg/image_sparse_v141.hdf5",
+ "output_dir": "experiments/core/bc_rnn/can/mg/image_sparse/trained_models",
+ "num_data_workers": 2,
+ "hdf5_cache_mode": "low_dim",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": false,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": null,
+ "hdf5_validation_filter_key": null,
+ "seq_length": 10,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 16,
+ "num_epochs": 600,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [],
+ "gaussian": {
+ "enabled": false,
+ "fixed_std": false,
+ "init_std": 0.1,
+ "min_std": 0.01,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "gmm": {
+ "enabled": false,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": false,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 1.0,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "rnn": {
+ "enabled": true,
+ "horizon": 10,
+ "hidden_dim": 1000,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos"
+ ],
+ "rgb": [
+ "agentview_image",
+ "robot0_eye_in_hand_image"
+ ],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {
+ "feature_dimension": 64,
+ "backbone_class": "ResNet18Conv",
+ "backbone_kwargs": {
+ "pretrained": false,
+ "input_coord_conv": false
+ },
+ "pool_class": "SpatialSoftmax",
+ "pool_kwargs": {
+ "num_kp": 32,
+ "learnable_temperature": false,
+ "temperature": 1.0,
+ "noise_std": 0.0
+ }
+ },
+ "obs_randomizer_class": "CropRandomizer",
+ "obs_randomizer_kwargs": {
+ "crop_height": 76,
+ "crop_width": 76,
+ "num_crops": 1,
+ "pos_enc": false
+ }
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/image_sparse/bcq.json b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/image_sparse/bcq.json
new file mode 100644
index 0000000000000000000000000000000000000000..043c055b81fb3c5991b2d705414f618b44dc3dd3
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/image_sparse/bcq.json
@@ -0,0 +1,256 @@
+{
+ "algo_name": "bcq",
+ "experiment": {
+ "name": "core_bcq_can_mg_image_sparse",
+ "validate": false,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 20,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 500,
+ "validation_epoch_every_n_steps": 50,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 20,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/can/mg/image_sparse_v141.hdf5",
+ "output_dir": "experiments/core/bcq/can/mg/image_sparse/trained_models",
+ "num_data_workers": 2,
+ "hdf5_cache_mode": "low_dim",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": null,
+ "hdf5_validation_filter_key": null,
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 16,
+ "num_epochs": 600,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "critic": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "action_sampler": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "actor": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ }
+ },
+ "discount": 0.99,
+ "n_step": 1,
+ "target_tau": 0.005,
+ "infinite_horizon": false,
+ "critic": {
+ "use_huber": false,
+ "max_gradient_norm": null,
+ "value_bounds": null,
+ "num_action_samples": 10,
+ "num_action_samples_rollout": 100,
+ "ensemble": {
+ "n": 2,
+ "weight": 0.75
+ },
+ "distributional": {
+ "enabled": false,
+ "num_atoms": 51
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "action_sampler": {
+ "actor_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "gmm": {
+ "enabled": false,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": true,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 0.5,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "freeze_encoder_epoch": -1
+ },
+ "actor": {
+ "enabled": false,
+ "perturbation_scale": 0.05,
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos"
+ ],
+ "rgb": [
+ "agentview_image",
+ "robot0_eye_in_hand_image"
+ ],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {
+ "feature_dimension": 64,
+ "backbone_class": "ResNet18Conv",
+ "backbone_kwargs": {
+ "pretrained": false,
+ "input_coord_conv": false
+ },
+ "pool_class": "SpatialSoftmax",
+ "pool_kwargs": {
+ "num_kp": 32,
+ "learnable_temperature": false,
+ "temperature": 1.0,
+ "noise_std": 0.0
+ }
+ },
+ "obs_randomizer_class": "CropRandomizer",
+ "obs_randomizer_kwargs": {
+ "crop_height": 76,
+ "crop_width": 76,
+ "num_crops": 1,
+ "pos_enc": false
+ }
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/image_sparse/cql.json b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/image_sparse/cql.json
new file mode 100644
index 0000000000000000000000000000000000000000..fedb4401bc0d143fdeb13773ffa3ba8e57dc9d34
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/image_sparse/cql.json
@@ -0,0 +1,203 @@
+{
+ "algo_name": "cql",
+ "experiment": {
+ "name": "core_cql_can_mg_image_sparse",
+ "validate": false,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 20,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 500,
+ "validation_epoch_every_n_steps": 50,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 20,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/can/mg/image_sparse_v141.hdf5",
+ "output_dir": "experiments/core/cql/can/mg/image_sparse/trained_models",
+ "num_data_workers": 2,
+ "hdf5_cache_mode": "low_dim",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": null,
+ "hdf5_validation_filter_key": null,
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 8,
+ "num_epochs": 600,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "critic": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.0,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ },
+ "actor": {
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.0,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "discount": 0.99,
+ "n_step": 1,
+ "target_tau": 0.005,
+ "actor": {
+ "bc_start_steps": 0,
+ "target_entropy": "default",
+ "max_gradient_norm": null,
+ "net": {
+ "type": "gaussian",
+ "common": {
+ "std_activation": "exp",
+ "use_tanh": true,
+ "low_noise_eval": true
+ },
+ "gaussian": {
+ "init_last_fc_weight": 0.001,
+ "init_std": 0.3,
+ "fixed_std": false
+ }
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "critic": {
+ "use_huber": false,
+ "max_gradient_norm": null,
+ "value_bounds": null,
+ "num_action_samples": 1,
+ "cql_weight": 1.0,
+ "deterministic_backup": true,
+ "min_q_weight": 1.0,
+ "target_q_gap": 5.0,
+ "num_random_actions": 10,
+ "ensemble": {
+ "n": 2
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos"
+ ],
+ "rgb": [
+ "agentview_image",
+ "robot0_eye_in_hand_image"
+ ],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {
+ "feature_dimension": 64,
+ "backbone_class": "ResNet18Conv",
+ "backbone_kwargs": {
+ "pretrained": false,
+ "input_coord_conv": false
+ },
+ "pool_class": "SpatialSoftmax",
+ "pool_kwargs": {
+ "num_kp": 32,
+ "learnable_temperature": false,
+ "temperature": 1.0,
+ "noise_std": 0.0
+ }
+ },
+ "obs_randomizer_class": "CropRandomizer",
+ "obs_randomizer_kwargs": {
+ "crop_height": 76,
+ "crop_width": 76,
+ "num_crops": 1,
+ "pos_enc": false
+ }
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/low_dim_dense/bc.json b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/low_dim_dense/bc.json
new file mode 100644
index 0000000000000000000000000000000000000000..47c95d11c22a3adfb8bbf9cc81fc02ffd69cb0d9
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/low_dim_dense/bc.json
@@ -0,0 +1,215 @@
+{
+ "algo_name": "bc",
+ "experiment": {
+ "name": "core_bc_can_mg_low_dim_dense",
+ "validate": false,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/can/mg/low_dim_dense_v141.hdf5",
+ "output_dir": "experiments/core/bc/can/mg/low_dim_dense/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": false,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": null,
+ "hdf5_validation_filter_key": null,
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 100,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "gaussian": {
+ "enabled": false,
+ "fixed_std": false,
+ "init_std": 0.1,
+ "min_std": 0.01,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "gmm": {
+ "enabled": false,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": false,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 1.0,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "rnn": {
+ "enabled": false,
+ "horizon": 10,
+ "hidden_dim": 400,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/low_dim_dense/bc_rnn.json b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/low_dim_dense/bc_rnn.json
new file mode 100644
index 0000000000000000000000000000000000000000..3ffc37ed005d97288dd677b49e91567712bfa81c
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/low_dim_dense/bc_rnn.json
@@ -0,0 +1,212 @@
+{
+ "algo_name": "bc",
+ "experiment": {
+ "name": "core_bc_rnn_can_mg_low_dim_dense",
+ "validate": false,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/can/mg/low_dim_dense_v141.hdf5",
+ "output_dir": "experiments/core/bc_rnn/can/mg/low_dim_dense/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": false,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": null,
+ "hdf5_validation_filter_key": null,
+ "seq_length": 10,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 100,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [],
+ "gaussian": {
+ "enabled": false,
+ "fixed_std": false,
+ "init_std": 0.1,
+ "min_std": 0.01,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "gmm": {
+ "enabled": false,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": false,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 1.0,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "rnn": {
+ "enabled": true,
+ "horizon": 10,
+ "hidden_dim": 400,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/low_dim_dense/bcq.json b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/low_dim_dense/bcq.json
new file mode 100644
index 0000000000000000000000000000000000000000..b148eee04391c8ec6bab17b65fe8e6fc3fa485b4
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/low_dim_dense/bcq.json
@@ -0,0 +1,235 @@
+{
+ "algo_name": "bcq",
+ "experiment": {
+ "name": "core_bcq_can_mg_low_dim_dense",
+ "validate": false,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/can/mg/low_dim_dense_v141.hdf5",
+ "output_dir": "experiments/core/bcq/can/mg/low_dim_dense/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": null,
+ "hdf5_validation_filter_key": null,
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 100,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "critic": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "action_sampler": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "actor": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ }
+ },
+ "discount": 0.99,
+ "n_step": 1,
+ "target_tau": 0.005,
+ "infinite_horizon": false,
+ "critic": {
+ "use_huber": false,
+ "max_gradient_norm": null,
+ "value_bounds": null,
+ "num_action_samples": 10,
+ "num_action_samples_rollout": 100,
+ "ensemble": {
+ "n": 2,
+ "weight": 0.75
+ },
+ "distributional": {
+ "enabled": false,
+ "num_atoms": 51
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "action_sampler": {
+ "actor_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "gmm": {
+ "enabled": false,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": true,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 0.5,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "freeze_encoder_epoch": -1
+ },
+ "actor": {
+ "enabled": true,
+ "perturbation_scale": 0.05,
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/low_dim_dense/cql.json b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/low_dim_dense/cql.json
new file mode 100644
index 0000000000000000000000000000000000000000..231595e3dabefd3811fadf306a9ad4839fb66610
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/low_dim_dense/cql.json
@@ -0,0 +1,182 @@
+{
+ "algo_name": "cql",
+ "experiment": {
+ "name": "core_cql_can_mg_low_dim_dense",
+ "validate": false,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/can/mg/low_dim_dense_v141.hdf5",
+ "output_dir": "experiments/core/cql/can/mg/low_dim_dense/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": null,
+ "hdf5_validation_filter_key": null,
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 1024,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "critic": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.0,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ },
+ "actor": {
+ "learning_rate": {
+ "initial": 0.0003,
+ "decay_factor": 0.0,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "discount": 0.99,
+ "n_step": 1,
+ "target_tau": 0.005,
+ "actor": {
+ "bc_start_steps": 0,
+ "target_entropy": "default",
+ "max_gradient_norm": null,
+ "net": {
+ "type": "gaussian",
+ "common": {
+ "std_activation": "exp",
+ "use_tanh": true,
+ "low_noise_eval": true
+ },
+ "gaussian": {
+ "init_last_fc_weight": 0.001,
+ "init_std": 0.3,
+ "fixed_std": false
+ }
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "critic": {
+ "use_huber": false,
+ "max_gradient_norm": null,
+ "value_bounds": null,
+ "num_action_samples": 1,
+ "cql_weight": 1.0,
+ "deterministic_backup": true,
+ "min_q_weight": 1.0,
+ "target_q_gap": 5.0,
+ "num_random_actions": 10,
+ "ensemble": {
+ "n": 2
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/low_dim_dense/hbc.json b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/low_dim_dense/hbc.json
new file mode 100644
index 0000000000000000000000000000000000000000..a1e48fdc085fd1e214406d80055adb7cfc5a3758
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/low_dim_dense/hbc.json
@@ -0,0 +1,293 @@
+{
+ "algo_name": "hbc",
+ "experiment": {
+ "name": "core_hbc_can_mg_low_dim_dense",
+ "validate": false,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/can/mg/low_dim_dense_v141.hdf5",
+ "output_dir": "experiments/core/hbc/can/mg/low_dim_dense/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": null,
+ "hdf5_validation_filter_key": null,
+ "seq_length": 10,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 100,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "mode": "separate",
+ "actor_use_random_subgoals": false,
+ "subgoal_update_interval": 10,
+ "latent_subgoal": {
+ "enabled": false,
+ "prior_correction": {
+ "enabled": false,
+ "num_samples": 100
+ }
+ },
+ "planner": {
+ "optim_params": {
+ "goal_network": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "subgoal_horizon": 10,
+ "ae": {
+ "planner_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "vae": {
+ "enabled": true,
+ "latent_dim": 16,
+ "latent_clip": null,
+ "kl_weight": 0.0005,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": true,
+ "is_conditioned": true,
+ "use_gmm": true,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": true,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "decoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "prior_layer_dims": [
+ 1024,
+ 1024
+ ]
+ }
+ },
+ "actor": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "rnn": {
+ "enabled": true,
+ "horizon": 10,
+ "hidden_dim": 100,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ }
+ },
+ "observation": {
+ "planner": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "subgoal": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "actor": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/low_dim_dense/iris.json b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/low_dim_dense/iris.json
new file mode 100644
index 0000000000000000000000000000000000000000..99727e5e66e861fb2aabe451f397fac83d092ca5
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/low_dim_dense/iris.json
@@ -0,0 +1,462 @@
+{
+ "algo_name": "iris",
+ "experiment": {
+ "name": "core_iris_can_mg_low_dim_dense",
+ "validate": false,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/can/mg/low_dim_dense_v141.hdf5",
+ "output_dir": "experiments/core/iris/can/mg/low_dim_dense/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": null,
+ "hdf5_validation_filter_key": null,
+ "seq_length": 10,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 100,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "mode": "separate",
+ "actor_use_random_subgoals": false,
+ "subgoal_update_interval": 10,
+ "latent_subgoal": {
+ "enabled": false,
+ "prior_correction": {
+ "enabled": false,
+ "num_samples": 100
+ }
+ },
+ "value_planner": {
+ "planner": {
+ "optim_params": {
+ "goal_network": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "subgoal_horizon": 10,
+ "ae": {
+ "planner_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "vae": {
+ "enabled": true,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 0.0005,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": true,
+ "is_conditioned": true,
+ "use_gmm": true,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": true,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "decoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "prior_layer_dims": [
+ 1024,
+ 1024
+ ]
+ }
+ },
+ "value": {
+ "optim_params": {
+ "critic": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "action_sampler": {
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "actor": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ }
+ },
+ "discount": 0.99,
+ "n_step": 1,
+ "target_tau": 0.005,
+ "infinite_horizon": false,
+ "critic": {
+ "use_huber": false,
+ "max_gradient_norm": null,
+ "value_bounds": null,
+ "num_action_samples": 10,
+ "num_action_samples_rollout": 100,
+ "ensemble": {
+ "n": 2,
+ "weight": 0.75
+ },
+ "distributional": {
+ "enabled": false,
+ "num_atoms": 51
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "action_sampler": {
+ "actor_layer_dims": [
+ 300,
+ 400
+ ],
+ "gmm": {
+ "enabled": false,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": true,
+ "latent_dim": 16,
+ "latent_clip": null,
+ "kl_weight": 0.5,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "freeze_encoder_epoch": -1
+ },
+ "actor": {
+ "enabled": true,
+ "perturbation_scale": 0.05,
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ }
+ },
+ "num_samples": 100
+ },
+ "actor": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [],
+ "rnn": {
+ "enabled": true,
+ "horizon": 10,
+ "hidden_dim": 400,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ }
+ },
+ "observation": {
+ "value_planner": {
+ "planner": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "subgoal": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "value": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ }
+ },
+ "actor": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/low_dim_sparse/bc.json b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/low_dim_sparse/bc.json
new file mode 100644
index 0000000000000000000000000000000000000000..b5dc32e5fc4580a5b643a76f1d578b1ef6ddd857
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/low_dim_sparse/bc.json
@@ -0,0 +1,215 @@
+{
+ "algo_name": "bc",
+ "experiment": {
+ "name": "core_bc_can_mg_low_dim_sparse",
+ "validate": false,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/can/mg/low_dim_sparse_v141.hdf5",
+ "output_dir": "experiments/core/bc/can/mg/low_dim_sparse/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": false,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": null,
+ "hdf5_validation_filter_key": null,
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 100,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "gaussian": {
+ "enabled": false,
+ "fixed_std": false,
+ "init_std": 0.1,
+ "min_std": 0.01,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "gmm": {
+ "enabled": false,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": false,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 1.0,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "rnn": {
+ "enabled": false,
+ "horizon": 10,
+ "hidden_dim": 400,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/low_dim_sparse/bc_rnn.json b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/low_dim_sparse/bc_rnn.json
new file mode 100644
index 0000000000000000000000000000000000000000..6c732f83755879ef0018364cba4e36dabe5e914a
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/low_dim_sparse/bc_rnn.json
@@ -0,0 +1,212 @@
+{
+ "algo_name": "bc",
+ "experiment": {
+ "name": "core_bc_rnn_can_mg_low_dim_sparse",
+ "validate": false,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/can/mg/low_dim_sparse_v141.hdf5",
+ "output_dir": "experiments/core/bc_rnn/can/mg/low_dim_sparse/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": false,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": null,
+ "hdf5_validation_filter_key": null,
+ "seq_length": 10,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 100,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [],
+ "gaussian": {
+ "enabled": false,
+ "fixed_std": false,
+ "init_std": 0.1,
+ "min_std": 0.01,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "gmm": {
+ "enabled": false,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": false,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 1.0,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "rnn": {
+ "enabled": true,
+ "horizon": 10,
+ "hidden_dim": 400,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/low_dim_sparse/bcq.json b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/low_dim_sparse/bcq.json
new file mode 100644
index 0000000000000000000000000000000000000000..6bf18b5932e561e37142e38253a31af6b4bbd9c2
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/low_dim_sparse/bcq.json
@@ -0,0 +1,235 @@
+{
+ "algo_name": "bcq",
+ "experiment": {
+ "name": "core_bcq_can_mg_low_dim_sparse",
+ "validate": false,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/can/mg/low_dim_sparse_v141.hdf5",
+ "output_dir": "experiments/core/bcq/can/mg/low_dim_sparse/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": null,
+ "hdf5_validation_filter_key": null,
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 100,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "critic": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "action_sampler": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "actor": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ }
+ },
+ "discount": 0.99,
+ "n_step": 1,
+ "target_tau": 0.005,
+ "infinite_horizon": false,
+ "critic": {
+ "use_huber": false,
+ "max_gradient_norm": null,
+ "value_bounds": null,
+ "num_action_samples": 10,
+ "num_action_samples_rollout": 100,
+ "ensemble": {
+ "n": 2,
+ "weight": 0.75
+ },
+ "distributional": {
+ "enabled": false,
+ "num_atoms": 51
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "action_sampler": {
+ "actor_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "gmm": {
+ "enabled": false,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": true,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 0.5,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "freeze_encoder_epoch": -1
+ },
+ "actor": {
+ "enabled": true,
+ "perturbation_scale": 0.05,
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/low_dim_sparse/cql.json b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/low_dim_sparse/cql.json
new file mode 100644
index 0000000000000000000000000000000000000000..d47d7fcdf2295075aaef0bb7c88bb87a9a888faa
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/low_dim_sparse/cql.json
@@ -0,0 +1,182 @@
+{
+ "algo_name": "cql",
+ "experiment": {
+ "name": "core_cql_can_mg_low_dim_sparse",
+ "validate": false,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/can/mg/low_dim_sparse_v141.hdf5",
+ "output_dir": "experiments/core/cql/can/mg/low_dim_sparse/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": null,
+ "hdf5_validation_filter_key": null,
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 1024,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "critic": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.0,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ },
+ "actor": {
+ "learning_rate": {
+ "initial": 0.0003,
+ "decay_factor": 0.0,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "discount": 0.99,
+ "n_step": 1,
+ "target_tau": 0.005,
+ "actor": {
+ "bc_start_steps": 0,
+ "target_entropy": "default",
+ "max_gradient_norm": null,
+ "net": {
+ "type": "gaussian",
+ "common": {
+ "std_activation": "exp",
+ "use_tanh": true,
+ "low_noise_eval": true
+ },
+ "gaussian": {
+ "init_last_fc_weight": 0.001,
+ "init_std": 0.3,
+ "fixed_std": false
+ }
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "critic": {
+ "use_huber": false,
+ "max_gradient_norm": null,
+ "value_bounds": null,
+ "num_action_samples": 1,
+ "cql_weight": 1.0,
+ "deterministic_backup": true,
+ "min_q_weight": 1.0,
+ "target_q_gap": 5.0,
+ "num_random_actions": 10,
+ "ensemble": {
+ "n": 2
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/low_dim_sparse/hbc.json b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/low_dim_sparse/hbc.json
new file mode 100644
index 0000000000000000000000000000000000000000..98b63f2b73ba0bd0cead60fc874f19b3719a9605
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/low_dim_sparse/hbc.json
@@ -0,0 +1,293 @@
+{
+ "algo_name": "hbc",
+ "experiment": {
+ "name": "core_hbc_can_mg_low_dim_sparse",
+ "validate": false,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/can/mg/low_dim_sparse_v141.hdf5",
+ "output_dir": "experiments/core/hbc/can/mg/low_dim_sparse/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": null,
+ "hdf5_validation_filter_key": null,
+ "seq_length": 10,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 100,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "mode": "separate",
+ "actor_use_random_subgoals": false,
+ "subgoal_update_interval": 10,
+ "latent_subgoal": {
+ "enabled": false,
+ "prior_correction": {
+ "enabled": false,
+ "num_samples": 100
+ }
+ },
+ "planner": {
+ "optim_params": {
+ "goal_network": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "subgoal_horizon": 10,
+ "ae": {
+ "planner_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "vae": {
+ "enabled": true,
+ "latent_dim": 16,
+ "latent_clip": null,
+ "kl_weight": 0.0005,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": true,
+ "is_conditioned": true,
+ "use_gmm": true,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": true,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "decoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "prior_layer_dims": [
+ 1024,
+ 1024
+ ]
+ }
+ },
+ "actor": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "rnn": {
+ "enabled": true,
+ "horizon": 10,
+ "hidden_dim": 100,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ }
+ },
+ "observation": {
+ "planner": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "subgoal": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "actor": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/low_dim_sparse/iris.json b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/low_dim_sparse/iris.json
new file mode 100644
index 0000000000000000000000000000000000000000..fb681090c8413dc69b82f4938913c98d73d5428c
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mg/low_dim_sparse/iris.json
@@ -0,0 +1,462 @@
+{
+ "algo_name": "iris",
+ "experiment": {
+ "name": "core_iris_can_mg_low_dim_sparse",
+ "validate": false,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/can/mg/low_dim_sparse_v141.hdf5",
+ "output_dir": "experiments/core/iris/can/mg/low_dim_sparse/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": null,
+ "hdf5_validation_filter_key": null,
+ "seq_length": 10,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 100,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "mode": "separate",
+ "actor_use_random_subgoals": false,
+ "subgoal_update_interval": 10,
+ "latent_subgoal": {
+ "enabled": false,
+ "prior_correction": {
+ "enabled": false,
+ "num_samples": 100
+ }
+ },
+ "value_planner": {
+ "planner": {
+ "optim_params": {
+ "goal_network": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "subgoal_horizon": 10,
+ "ae": {
+ "planner_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "vae": {
+ "enabled": true,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 0.0005,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": true,
+ "is_conditioned": true,
+ "use_gmm": true,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": true,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "decoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "prior_layer_dims": [
+ 1024,
+ 1024
+ ]
+ }
+ },
+ "value": {
+ "optim_params": {
+ "critic": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "action_sampler": {
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "actor": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ }
+ },
+ "discount": 0.99,
+ "n_step": 1,
+ "target_tau": 0.005,
+ "infinite_horizon": false,
+ "critic": {
+ "use_huber": false,
+ "max_gradient_norm": null,
+ "value_bounds": null,
+ "num_action_samples": 10,
+ "num_action_samples_rollout": 100,
+ "ensemble": {
+ "n": 2,
+ "weight": 0.75
+ },
+ "distributional": {
+ "enabled": false,
+ "num_atoms": 51
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "action_sampler": {
+ "actor_layer_dims": [
+ 300,
+ 400
+ ],
+ "gmm": {
+ "enabled": false,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": true,
+ "latent_dim": 16,
+ "latent_clip": null,
+ "kl_weight": 0.5,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "freeze_encoder_epoch": -1
+ },
+ "actor": {
+ "enabled": true,
+ "perturbation_scale": 0.05,
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ }
+ },
+ "num_samples": 100
+ },
+ "actor": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [],
+ "rnn": {
+ "enabled": true,
+ "horizon": 10,
+ "hidden_dim": 400,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ }
+ },
+ "observation": {
+ "value_planner": {
+ "planner": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "subgoal": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "value": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ }
+ },
+ "actor": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/can/mh/image/bc.json b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mh/image/bc.json
new file mode 100644
index 0000000000000000000000000000000000000000..69122768a8b9634857a5d008363319eb13e84fa9
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mh/image/bc.json
@@ -0,0 +1,236 @@
+{
+ "algo_name": "bc",
+ "experiment": {
+ "name": "core_bc_can_mh_image",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 20,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 500,
+ "validation_epoch_every_n_steps": 50,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 500,
+ "rate": 20,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/can/mh/image_v141.hdf5",
+ "output_dir": "experiments/core/bc/can/mh/image/trained_models",
+ "num_data_workers": 2,
+ "hdf5_cache_mode": "low_dim",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": false,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 16,
+ "num_epochs": 600,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "gaussian": {
+ "enabled": false,
+ "fixed_std": false,
+ "init_std": 0.1,
+ "min_std": 0.01,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "gmm": {
+ "enabled": true,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": false,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 1.0,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "rnn": {
+ "enabled": false,
+ "horizon": 10,
+ "hidden_dim": 400,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos"
+ ],
+ "rgb": [
+ "agentview_image",
+ "robot0_eye_in_hand_image"
+ ],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {
+ "feature_dimension": 64,
+ "backbone_class": "ResNet18Conv",
+ "backbone_kwargs": {
+ "pretrained": false,
+ "input_coord_conv": false
+ },
+ "pool_class": "SpatialSoftmax",
+ "pool_kwargs": {
+ "num_kp": 32,
+ "learnable_temperature": false,
+ "temperature": 1.0,
+ "noise_std": 0.0
+ }
+ },
+ "obs_randomizer_class": "CropRandomizer",
+ "obs_randomizer_kwargs": {
+ "crop_height": 76,
+ "crop_width": 76,
+ "num_crops": 1,
+ "pos_enc": false
+ }
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/can/mh/image/bc_rnn.json b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mh/image/bc_rnn.json
new file mode 100644
index 0000000000000000000000000000000000000000..4cba9ac2a1f1d10f9051a22de3c35035e4132b5e
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mh/image/bc_rnn.json
@@ -0,0 +1,233 @@
+{
+ "algo_name": "bc",
+ "experiment": {
+ "name": "core_bc_rnn_can_mh_image",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 20,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 500,
+ "validation_epoch_every_n_steps": 50,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 500,
+ "rate": 20,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/can/mh/image_v141.hdf5",
+ "output_dir": "experiments/core/bc_rnn/can/mh/image/trained_models",
+ "num_data_workers": 2,
+ "hdf5_cache_mode": "low_dim",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": false,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 10,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 16,
+ "num_epochs": 600,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [],
+ "gaussian": {
+ "enabled": false,
+ "fixed_std": false,
+ "init_std": 0.1,
+ "min_std": 0.01,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "gmm": {
+ "enabled": true,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": false,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 1.0,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "rnn": {
+ "enabled": true,
+ "horizon": 10,
+ "hidden_dim": 1000,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos"
+ ],
+ "rgb": [
+ "agentview_image",
+ "robot0_eye_in_hand_image"
+ ],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {
+ "feature_dimension": 64,
+ "backbone_class": "ResNet18Conv",
+ "backbone_kwargs": {
+ "pretrained": false,
+ "input_coord_conv": false
+ },
+ "pool_class": "SpatialSoftmax",
+ "pool_kwargs": {
+ "num_kp": 32,
+ "learnable_temperature": false,
+ "temperature": 1.0,
+ "noise_std": 0.0
+ }
+ },
+ "obs_randomizer_class": "CropRandomizer",
+ "obs_randomizer_kwargs": {
+ "crop_height": 76,
+ "crop_width": 76,
+ "num_crops": 1,
+ "pos_enc": false
+ }
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/can/mh/image/bcq.json b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mh/image/bcq.json
new file mode 100644
index 0000000000000000000000000000000000000000..0a18da02e523cdbb8b3136f6debdd61568d1128f
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mh/image/bcq.json
@@ -0,0 +1,256 @@
+{
+ "algo_name": "bcq",
+ "experiment": {
+ "name": "core_bcq_can_mh_image",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 20,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 500,
+ "validation_epoch_every_n_steps": 50,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 500,
+ "rate": 20,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/can/mh/image_v141.hdf5",
+ "output_dir": "experiments/core/bcq/can/mh/image/trained_models",
+ "num_data_workers": 2,
+ "hdf5_cache_mode": "low_dim",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 16,
+ "num_epochs": 600,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "critic": {
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "action_sampler": {
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "actor": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ }
+ },
+ "discount": 0.99,
+ "n_step": 1,
+ "target_tau": 0.0005,
+ "infinite_horizon": false,
+ "critic": {
+ "use_huber": false,
+ "max_gradient_norm": null,
+ "value_bounds": null,
+ "num_action_samples": 10,
+ "num_action_samples_rollout": 100,
+ "ensemble": {
+ "n": 2,
+ "weight": 0.75
+ },
+ "distributional": {
+ "enabled": false,
+ "num_atoms": 51
+ },
+ "layer_dims": [
+ 1024,
+ 1024
+ ]
+ },
+ "action_sampler": {
+ "actor_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "gmm": {
+ "enabled": false,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": true,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 0.05,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "decoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "freeze_encoder_epoch": -1
+ },
+ "actor": {
+ "enabled": false,
+ "perturbation_scale": 0.05,
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos"
+ ],
+ "rgb": [
+ "agentview_image",
+ "robot0_eye_in_hand_image"
+ ],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {
+ "feature_dimension": 64,
+ "backbone_class": "ResNet18Conv",
+ "backbone_kwargs": {
+ "pretrained": false,
+ "input_coord_conv": false
+ },
+ "pool_class": "SpatialSoftmax",
+ "pool_kwargs": {
+ "num_kp": 32,
+ "learnable_temperature": false,
+ "temperature": 1.0,
+ "noise_std": 0.0
+ }
+ },
+ "obs_randomizer_class": "CropRandomizer",
+ "obs_randomizer_kwargs": {
+ "crop_height": 76,
+ "crop_width": 76,
+ "num_crops": 1,
+ "pos_enc": false
+ }
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/can/mh/image/cql.json b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mh/image/cql.json
new file mode 100644
index 0000000000000000000000000000000000000000..49d589817f13d6416e3d09f7d0681e5138a3a1e7
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mh/image/cql.json
@@ -0,0 +1,203 @@
+{
+ "algo_name": "cql",
+ "experiment": {
+ "name": "core_cql_can_mh_image",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 20,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 500,
+ "validation_epoch_every_n_steps": 50,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 500,
+ "rate": 20,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/can/mh/image_v141.hdf5",
+ "output_dir": "experiments/core/cql/can/mh/image/trained_models",
+ "num_data_workers": 2,
+ "hdf5_cache_mode": "low_dim",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 8,
+ "num_epochs": 600,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "critic": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.0,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ },
+ "actor": {
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.0,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "discount": 0.99,
+ "n_step": 1,
+ "target_tau": 0.005,
+ "actor": {
+ "bc_start_steps": 0,
+ "target_entropy": "default",
+ "max_gradient_norm": null,
+ "net": {
+ "type": "gaussian",
+ "common": {
+ "std_activation": "exp",
+ "use_tanh": true,
+ "low_noise_eval": true
+ },
+ "gaussian": {
+ "init_last_fc_weight": 0.001,
+ "init_std": 0.3,
+ "fixed_std": false
+ }
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "critic": {
+ "use_huber": false,
+ "max_gradient_norm": null,
+ "value_bounds": null,
+ "num_action_samples": 1,
+ "cql_weight": 1.0,
+ "deterministic_backup": true,
+ "min_q_weight": 1.0,
+ "target_q_gap": 5.0,
+ "num_random_actions": 10,
+ "ensemble": {
+ "n": 2
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos"
+ ],
+ "rgb": [
+ "agentview_image",
+ "robot0_eye_in_hand_image"
+ ],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {
+ "feature_dimension": 64,
+ "backbone_class": "ResNet18Conv",
+ "backbone_kwargs": {
+ "pretrained": false,
+ "input_coord_conv": false
+ },
+ "pool_class": "SpatialSoftmax",
+ "pool_kwargs": {
+ "num_kp": 32,
+ "learnable_temperature": false,
+ "temperature": 1.0,
+ "noise_std": 0.0
+ }
+ },
+ "obs_randomizer_class": "CropRandomizer",
+ "obs_randomizer_kwargs": {
+ "crop_height": 76,
+ "crop_width": 76,
+ "num_crops": 1,
+ "pos_enc": false
+ }
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/can/mh/low_dim/bc.json b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mh/low_dim/bc.json
new file mode 100644
index 0000000000000000000000000000000000000000..4df11ce8696ea8352d1334c96bc8cd0b32333c6f
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mh/low_dim/bc.json
@@ -0,0 +1,215 @@
+{
+ "algo_name": "bc",
+ "experiment": {
+ "name": "core_bc_can_mh_low_dim",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 500,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/can/mh/low_dim_v141.hdf5",
+ "output_dir": "experiments/core/bc/can/mh/low_dim/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": false,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 100,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "gaussian": {
+ "enabled": false,
+ "fixed_std": false,
+ "init_std": 0.1,
+ "min_std": 0.01,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "gmm": {
+ "enabled": true,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": false,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 1.0,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "rnn": {
+ "enabled": false,
+ "horizon": 10,
+ "hidden_dim": 400,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/can/mh/low_dim/bc_rnn.json b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mh/low_dim/bc_rnn.json
new file mode 100644
index 0000000000000000000000000000000000000000..08db26d69ce40fa4d7f4bf83f13b50bdf32e1082
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mh/low_dim/bc_rnn.json
@@ -0,0 +1,212 @@
+{
+ "algo_name": "bc",
+ "experiment": {
+ "name": "core_bc_rnn_can_mh_low_dim",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 500,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/can/mh/low_dim_v141.hdf5",
+ "output_dir": "experiments/core/bc_rnn/can/mh/low_dim/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": false,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 10,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 100,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [],
+ "gaussian": {
+ "enabled": false,
+ "fixed_std": false,
+ "init_std": 0.1,
+ "min_std": 0.01,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "gmm": {
+ "enabled": true,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": false,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 1.0,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "rnn": {
+ "enabled": true,
+ "horizon": 10,
+ "hidden_dim": 400,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/can/mh/low_dim/bcq.json b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mh/low_dim/bcq.json
new file mode 100644
index 0000000000000000000000000000000000000000..9ce68fdb0a810024cbcbd1340da45a506c4e96e3
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mh/low_dim/bcq.json
@@ -0,0 +1,235 @@
+{
+ "algo_name": "bcq",
+ "experiment": {
+ "name": "core_bcq_can_mh_low_dim",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 500,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/can/mh/low_dim_v141.hdf5",
+ "output_dir": "experiments/core/bcq/can/mh/low_dim/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 100,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "critic": {
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "action_sampler": {
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "actor": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ }
+ },
+ "discount": 0.99,
+ "n_step": 1,
+ "target_tau": 0.0005,
+ "infinite_horizon": false,
+ "critic": {
+ "use_huber": false,
+ "max_gradient_norm": null,
+ "value_bounds": null,
+ "num_action_samples": 10,
+ "num_action_samples_rollout": 100,
+ "ensemble": {
+ "n": 2,
+ "weight": 0.75
+ },
+ "distributional": {
+ "enabled": false,
+ "num_atoms": 51
+ },
+ "layer_dims": [
+ 1024,
+ 1024
+ ]
+ },
+ "action_sampler": {
+ "actor_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "gmm": {
+ "enabled": false,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": true,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 0.5,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": true,
+ "is_conditioned": true,
+ "use_gmm": true,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": true,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "decoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "prior_layer_dims": [
+ 1024,
+ 1024
+ ]
+ },
+ "freeze_encoder_epoch": -1
+ },
+ "actor": {
+ "enabled": false,
+ "perturbation_scale": 0.05,
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/can/mh/low_dim/cql.json b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mh/low_dim/cql.json
new file mode 100644
index 0000000000000000000000000000000000000000..6d57ebf461485251088cd948dc11b0c9ce70d5b6
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mh/low_dim/cql.json
@@ -0,0 +1,182 @@
+{
+ "algo_name": "cql",
+ "experiment": {
+ "name": "core_cql_can_mh_low_dim",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 500,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/can/mh/low_dim_v141.hdf5",
+ "output_dir": "experiments/core/cql/can/mh/low_dim/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 1024,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "critic": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.0,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ },
+ "actor": {
+ "learning_rate": {
+ "initial": 0.0003,
+ "decay_factor": 0.0,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "discount": 0.99,
+ "n_step": 1,
+ "target_tau": 0.005,
+ "actor": {
+ "bc_start_steps": 0,
+ "target_entropy": "default",
+ "max_gradient_norm": null,
+ "net": {
+ "type": "gaussian",
+ "common": {
+ "std_activation": "exp",
+ "use_tanh": true,
+ "low_noise_eval": true
+ },
+ "gaussian": {
+ "init_last_fc_weight": 0.001,
+ "init_std": 0.3,
+ "fixed_std": false
+ }
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "critic": {
+ "use_huber": false,
+ "max_gradient_norm": null,
+ "value_bounds": null,
+ "num_action_samples": 1,
+ "cql_weight": 1.0,
+ "deterministic_backup": true,
+ "min_q_weight": 1.0,
+ "target_q_gap": 5.0,
+ "num_random_actions": 10,
+ "ensemble": {
+ "n": 2
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/can/mh/low_dim/hbc.json b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mh/low_dim/hbc.json
new file mode 100644
index 0000000000000000000000000000000000000000..4ebe4907f1d495e31edb56fdc8af21a712f912a1
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mh/low_dim/hbc.json
@@ -0,0 +1,290 @@
+{
+ "algo_name": "hbc",
+ "experiment": {
+ "name": "core_hbc_can_mh_low_dim",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 500,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/can/mh/low_dim_v141.hdf5",
+ "output_dir": "experiments/core/hbc/can/mh/low_dim/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 10,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 100,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "mode": "separate",
+ "actor_use_random_subgoals": false,
+ "subgoal_update_interval": 10,
+ "latent_subgoal": {
+ "enabled": false,
+ "prior_correction": {
+ "enabled": false,
+ "num_samples": 100
+ }
+ },
+ "planner": {
+ "optim_params": {
+ "goal_network": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "subgoal_horizon": 10,
+ "ae": {
+ "planner_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "vae": {
+ "enabled": true,
+ "latent_dim": 16,
+ "latent_clip": null,
+ "kl_weight": 0.0005,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": true,
+ "is_conditioned": true,
+ "use_gmm": true,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": true,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "decoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "prior_layer_dims": [
+ 1024,
+ 1024
+ ]
+ }
+ },
+ "actor": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [],
+ "rnn": {
+ "enabled": true,
+ "horizon": 10,
+ "hidden_dim": 400,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ }
+ },
+ "observation": {
+ "planner": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "subgoal": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "actor": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/can/mh/low_dim/iris.json b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mh/low_dim/iris.json
new file mode 100644
index 0000000000000000000000000000000000000000..a90f1c3141e6c7bd8001ec4c2992a3c167a4b93d
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/can/mh/low_dim/iris.json
@@ -0,0 +1,462 @@
+{
+ "algo_name": "iris",
+ "experiment": {
+ "name": "core_iris_can_mh_low_dim",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 500,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/can/mh/low_dim_v141.hdf5",
+ "output_dir": "experiments/core/iris/can/mh/low_dim/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 10,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 100,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "mode": "separate",
+ "actor_use_random_subgoals": false,
+ "subgoal_update_interval": 10,
+ "latent_subgoal": {
+ "enabled": false,
+ "prior_correction": {
+ "enabled": false,
+ "num_samples": 100
+ }
+ },
+ "value_planner": {
+ "planner": {
+ "optim_params": {
+ "goal_network": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "subgoal_horizon": 10,
+ "ae": {
+ "planner_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "vae": {
+ "enabled": true,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 0.0005,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": true,
+ "is_conditioned": true,
+ "use_gmm": true,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": true,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "decoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "prior_layer_dims": [
+ 1024,
+ 1024
+ ]
+ }
+ },
+ "value": {
+ "optim_params": {
+ "critic": {
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "action_sampler": {
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "actor": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ }
+ },
+ "discount": 0.99,
+ "n_step": 1,
+ "target_tau": 0.0005,
+ "infinite_horizon": false,
+ "critic": {
+ "use_huber": false,
+ "max_gradient_norm": null,
+ "value_bounds": null,
+ "num_action_samples": 10,
+ "num_action_samples_rollout": 100,
+ "ensemble": {
+ "n": 2,
+ "weight": 0.75
+ },
+ "distributional": {
+ "enabled": false,
+ "num_atoms": 51
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "action_sampler": {
+ "actor_layer_dims": [
+ 300,
+ 400
+ ],
+ "gmm": {
+ "enabled": false,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": true,
+ "latent_dim": 16,
+ "latent_clip": null,
+ "kl_weight": 0.05,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "freeze_encoder_epoch": -1
+ },
+ "actor": {
+ "enabled": false,
+ "perturbation_scale": 0.05,
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ }
+ },
+ "num_samples": 100
+ },
+ "actor": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [],
+ "rnn": {
+ "enabled": true,
+ "horizon": 10,
+ "hidden_dim": 400,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ }
+ },
+ "observation": {
+ "value_planner": {
+ "planner": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "subgoal": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "value": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ }
+ },
+ "actor": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/can/paired/image/bc.json b/code_src/rise_robomimic/robomimic/exps/paper/core/can/paired/image/bc.json
new file mode 100644
index 0000000000000000000000000000000000000000..5a2cf95c9c6d5e499bf482a26f3814e6c5ec1710
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/can/paired/image/bc.json
@@ -0,0 +1,236 @@
+{
+ "algo_name": "bc",
+ "experiment": {
+ "name": "core_bc_can_paired_image",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 20,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 500,
+ "validation_epoch_every_n_steps": 50,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 20,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/can/paired/image_v141.hdf5",
+ "output_dir": "experiments/core/bc/can/paired/image/trained_models",
+ "num_data_workers": 2,
+ "hdf5_cache_mode": "low_dim",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": false,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 16,
+ "num_epochs": 600,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "gaussian": {
+ "enabled": false,
+ "fixed_std": false,
+ "init_std": 0.1,
+ "min_std": 0.01,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "gmm": {
+ "enabled": true,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": false,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 1.0,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "rnn": {
+ "enabled": false,
+ "horizon": 10,
+ "hidden_dim": 400,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos"
+ ],
+ "rgb": [
+ "agentview_image",
+ "robot0_eye_in_hand_image"
+ ],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {
+ "feature_dimension": 64,
+ "backbone_class": "ResNet18Conv",
+ "backbone_kwargs": {
+ "pretrained": false,
+ "input_coord_conv": false
+ },
+ "pool_class": "SpatialSoftmax",
+ "pool_kwargs": {
+ "num_kp": 32,
+ "learnable_temperature": false,
+ "temperature": 1.0,
+ "noise_std": 0.0
+ }
+ },
+ "obs_randomizer_class": "CropRandomizer",
+ "obs_randomizer_kwargs": {
+ "crop_height": 76,
+ "crop_width": 76,
+ "num_crops": 1,
+ "pos_enc": false
+ }
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/can/paired/image/bc_rnn.json b/code_src/rise_robomimic/robomimic/exps/paper/core/can/paired/image/bc_rnn.json
new file mode 100644
index 0000000000000000000000000000000000000000..0797bcb625c75041bf91f428286bed9649651a8f
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/can/paired/image/bc_rnn.json
@@ -0,0 +1,233 @@
+{
+ "algo_name": "bc",
+ "experiment": {
+ "name": "core_bc_rnn_can_paired_image",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 20,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 500,
+ "validation_epoch_every_n_steps": 50,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 20,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/can/paired/image_v141.hdf5",
+ "output_dir": "experiments/core/bc_rnn/can/paired/image/trained_models",
+ "num_data_workers": 2,
+ "hdf5_cache_mode": "low_dim",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": false,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 10,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 16,
+ "num_epochs": 600,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [],
+ "gaussian": {
+ "enabled": false,
+ "fixed_std": false,
+ "init_std": 0.1,
+ "min_std": 0.01,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "gmm": {
+ "enabled": true,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": false,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 1.0,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "rnn": {
+ "enabled": true,
+ "horizon": 10,
+ "hidden_dim": 1000,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos"
+ ],
+ "rgb": [
+ "agentview_image",
+ "robot0_eye_in_hand_image"
+ ],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {
+ "feature_dimension": 64,
+ "backbone_class": "ResNet18Conv",
+ "backbone_kwargs": {
+ "pretrained": false,
+ "input_coord_conv": false
+ },
+ "pool_class": "SpatialSoftmax",
+ "pool_kwargs": {
+ "num_kp": 32,
+ "learnable_temperature": false,
+ "temperature": 1.0,
+ "noise_std": 0.0
+ }
+ },
+ "obs_randomizer_class": "CropRandomizer",
+ "obs_randomizer_kwargs": {
+ "crop_height": 76,
+ "crop_width": 76,
+ "num_crops": 1,
+ "pos_enc": false
+ }
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/can/paired/image/bcq.json b/code_src/rise_robomimic/robomimic/exps/paper/core/can/paired/image/bcq.json
new file mode 100644
index 0000000000000000000000000000000000000000..4483e1ae843b52db3ebd467c4f20ff2e4563a0b6
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/can/paired/image/bcq.json
@@ -0,0 +1,256 @@
+{
+ "algo_name": "bcq",
+ "experiment": {
+ "name": "core_bcq_can_paired_image",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 20,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 500,
+ "validation_epoch_every_n_steps": 50,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 20,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/can/paired/image_v141.hdf5",
+ "output_dir": "experiments/core/bcq/can/paired/image/trained_models",
+ "num_data_workers": 2,
+ "hdf5_cache_mode": "low_dim",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 16,
+ "num_epochs": 600,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "critic": {
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "action_sampler": {
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "actor": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ }
+ },
+ "discount": 0.99,
+ "n_step": 1,
+ "target_tau": 0.0005,
+ "infinite_horizon": false,
+ "critic": {
+ "use_huber": false,
+ "max_gradient_norm": null,
+ "value_bounds": null,
+ "num_action_samples": 10,
+ "num_action_samples_rollout": 100,
+ "ensemble": {
+ "n": 2,
+ "weight": 0.75
+ },
+ "distributional": {
+ "enabled": false,
+ "num_atoms": 51
+ },
+ "layer_dims": [
+ 1024,
+ 1024
+ ]
+ },
+ "action_sampler": {
+ "actor_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "gmm": {
+ "enabled": false,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": true,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 0.05,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "decoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "freeze_encoder_epoch": -1
+ },
+ "actor": {
+ "enabled": false,
+ "perturbation_scale": 0.05,
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos"
+ ],
+ "rgb": [
+ "agentview_image",
+ "robot0_eye_in_hand_image"
+ ],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {
+ "feature_dimension": 64,
+ "backbone_class": "ResNet18Conv",
+ "backbone_kwargs": {
+ "pretrained": false,
+ "input_coord_conv": false
+ },
+ "pool_class": "SpatialSoftmax",
+ "pool_kwargs": {
+ "num_kp": 32,
+ "learnable_temperature": false,
+ "temperature": 1.0,
+ "noise_std": 0.0
+ }
+ },
+ "obs_randomizer_class": "CropRandomizer",
+ "obs_randomizer_kwargs": {
+ "crop_height": 76,
+ "crop_width": 76,
+ "num_crops": 1,
+ "pos_enc": false
+ }
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/can/paired/image/cql.json b/code_src/rise_robomimic/robomimic/exps/paper/core/can/paired/image/cql.json
new file mode 100644
index 0000000000000000000000000000000000000000..84fc1b075110731c63894b676a41c39da417d884
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/can/paired/image/cql.json
@@ -0,0 +1,203 @@
+{
+ "algo_name": "cql",
+ "experiment": {
+ "name": "core_cql_can_paired_image",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 20,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 500,
+ "validation_epoch_every_n_steps": 50,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 20,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/can/paired/image_v141.hdf5",
+ "output_dir": "experiments/core/cql/can/paired/image/trained_models",
+ "num_data_workers": 2,
+ "hdf5_cache_mode": "low_dim",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 8,
+ "num_epochs": 600,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "critic": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.0,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ },
+ "actor": {
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.0,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "discount": 0.99,
+ "n_step": 1,
+ "target_tau": 0.005,
+ "actor": {
+ "bc_start_steps": 0,
+ "target_entropy": "default",
+ "max_gradient_norm": null,
+ "net": {
+ "type": "gaussian",
+ "common": {
+ "std_activation": "exp",
+ "use_tanh": true,
+ "low_noise_eval": true
+ },
+ "gaussian": {
+ "init_last_fc_weight": 0.001,
+ "init_std": 0.3,
+ "fixed_std": false
+ }
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "critic": {
+ "use_huber": false,
+ "max_gradient_norm": null,
+ "value_bounds": null,
+ "num_action_samples": 1,
+ "cql_weight": 1.0,
+ "deterministic_backup": true,
+ "min_q_weight": 1.0,
+ "target_q_gap": 5.0,
+ "num_random_actions": 10,
+ "ensemble": {
+ "n": 2
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos"
+ ],
+ "rgb": [
+ "agentview_image",
+ "robot0_eye_in_hand_image"
+ ],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {
+ "feature_dimension": 64,
+ "backbone_class": "ResNet18Conv",
+ "backbone_kwargs": {
+ "pretrained": false,
+ "input_coord_conv": false
+ },
+ "pool_class": "SpatialSoftmax",
+ "pool_kwargs": {
+ "num_kp": 32,
+ "learnable_temperature": false,
+ "temperature": 1.0,
+ "noise_std": 0.0
+ }
+ },
+ "obs_randomizer_class": "CropRandomizer",
+ "obs_randomizer_kwargs": {
+ "crop_height": 76,
+ "crop_width": 76,
+ "num_crops": 1,
+ "pos_enc": false
+ }
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/can/paired/low_dim/bc.json b/code_src/rise_robomimic/robomimic/exps/paper/core/can/paired/low_dim/bc.json
new file mode 100644
index 0000000000000000000000000000000000000000..b81afb4edb4e010764f5252a297a8919e2ad41ab
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/can/paired/low_dim/bc.json
@@ -0,0 +1,215 @@
+{
+ "algo_name": "bc",
+ "experiment": {
+ "name": "core_bc_can_paired_low_dim",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/can/paired/low_dim_v141.hdf5",
+ "output_dir": "experiments/core/bc/can/paired/low_dim/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": false,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 100,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "gaussian": {
+ "enabled": false,
+ "fixed_std": false,
+ "init_std": 0.1,
+ "min_std": 0.01,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "gmm": {
+ "enabled": true,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": false,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 1.0,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "rnn": {
+ "enabled": false,
+ "horizon": 10,
+ "hidden_dim": 400,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/can/paired/low_dim/bc_rnn.json b/code_src/rise_robomimic/robomimic/exps/paper/core/can/paired/low_dim/bc_rnn.json
new file mode 100644
index 0000000000000000000000000000000000000000..41365aaebdb1f192dc93b0b28a1eab6dd55e7223
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/can/paired/low_dim/bc_rnn.json
@@ -0,0 +1,212 @@
+{
+ "algo_name": "bc",
+ "experiment": {
+ "name": "core_bc_rnn_can_paired_low_dim",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/can/paired/low_dim_v141.hdf5",
+ "output_dir": "experiments/core/bc_rnn/can/paired/low_dim/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": false,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 10,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 100,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [],
+ "gaussian": {
+ "enabled": false,
+ "fixed_std": false,
+ "init_std": 0.1,
+ "min_std": 0.01,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "gmm": {
+ "enabled": true,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": false,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 1.0,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "rnn": {
+ "enabled": true,
+ "horizon": 10,
+ "hidden_dim": 400,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/can/paired/low_dim/bcq.json b/code_src/rise_robomimic/robomimic/exps/paper/core/can/paired/low_dim/bcq.json
new file mode 100644
index 0000000000000000000000000000000000000000..c4ff7ddce48819b202a9ec7d6e6cad6bdf117ad3
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/can/paired/low_dim/bcq.json
@@ -0,0 +1,235 @@
+{
+ "algo_name": "bcq",
+ "experiment": {
+ "name": "core_bcq_can_paired_low_dim",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/can/paired/low_dim_v141.hdf5",
+ "output_dir": "experiments/core/bcq/can/paired/low_dim/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 100,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "critic": {
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "action_sampler": {
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "actor": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ }
+ },
+ "discount": 0.99,
+ "n_step": 1,
+ "target_tau": 0.0005,
+ "infinite_horizon": false,
+ "critic": {
+ "use_huber": false,
+ "max_gradient_norm": null,
+ "value_bounds": null,
+ "num_action_samples": 10,
+ "num_action_samples_rollout": 100,
+ "ensemble": {
+ "n": 2,
+ "weight": 0.75
+ },
+ "distributional": {
+ "enabled": false,
+ "num_atoms": 51
+ },
+ "layer_dims": [
+ 1024,
+ 1024
+ ]
+ },
+ "action_sampler": {
+ "actor_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "gmm": {
+ "enabled": false,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": true,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 0.5,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": true,
+ "is_conditioned": true,
+ "use_gmm": true,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": true,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "decoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "prior_layer_dims": [
+ 1024,
+ 1024
+ ]
+ },
+ "freeze_encoder_epoch": -1
+ },
+ "actor": {
+ "enabled": false,
+ "perturbation_scale": 0.05,
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/can/paired/low_dim/cql.json b/code_src/rise_robomimic/robomimic/exps/paper/core/can/paired/low_dim/cql.json
new file mode 100644
index 0000000000000000000000000000000000000000..fb0c9bbe7215ac69ed6ee91e57bd12fdfacce281
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/can/paired/low_dim/cql.json
@@ -0,0 +1,182 @@
+{
+ "algo_name": "cql",
+ "experiment": {
+ "name": "core_cql_can_paired_low_dim",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/can/paired/low_dim_v141.hdf5",
+ "output_dir": "experiments/core/cql/can/paired/low_dim/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 1024,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "critic": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.0,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ },
+ "actor": {
+ "learning_rate": {
+ "initial": 0.0003,
+ "decay_factor": 0.0,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "discount": 0.99,
+ "n_step": 1,
+ "target_tau": 0.005,
+ "actor": {
+ "bc_start_steps": 0,
+ "target_entropy": "default",
+ "max_gradient_norm": null,
+ "net": {
+ "type": "gaussian",
+ "common": {
+ "std_activation": "exp",
+ "use_tanh": true,
+ "low_noise_eval": true
+ },
+ "gaussian": {
+ "init_last_fc_weight": 0.001,
+ "init_std": 0.3,
+ "fixed_std": false
+ }
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "critic": {
+ "use_huber": false,
+ "max_gradient_norm": null,
+ "value_bounds": null,
+ "num_action_samples": 1,
+ "cql_weight": 1.0,
+ "deterministic_backup": true,
+ "min_q_weight": 1.0,
+ "target_q_gap": 5.0,
+ "num_random_actions": 10,
+ "ensemble": {
+ "n": 2
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/can/paired/low_dim/hbc.json b/code_src/rise_robomimic/robomimic/exps/paper/core/can/paired/low_dim/hbc.json
new file mode 100644
index 0000000000000000000000000000000000000000..332e64dffb6a2aafbd9a4644415ca7a00d538783
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/can/paired/low_dim/hbc.json
@@ -0,0 +1,290 @@
+{
+ "algo_name": "hbc",
+ "experiment": {
+ "name": "core_hbc_can_paired_low_dim",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/can/paired/low_dim_v141.hdf5",
+ "output_dir": "experiments/core/hbc/can/paired/low_dim/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 10,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 100,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "mode": "separate",
+ "actor_use_random_subgoals": false,
+ "subgoal_update_interval": 10,
+ "latent_subgoal": {
+ "enabled": false,
+ "prior_correction": {
+ "enabled": false,
+ "num_samples": 100
+ }
+ },
+ "planner": {
+ "optim_params": {
+ "goal_network": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "subgoal_horizon": 10,
+ "ae": {
+ "planner_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "vae": {
+ "enabled": true,
+ "latent_dim": 16,
+ "latent_clip": null,
+ "kl_weight": 0.0005,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": true,
+ "is_conditioned": true,
+ "use_gmm": true,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": true,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "decoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "prior_layer_dims": [
+ 1024,
+ 1024
+ ]
+ }
+ },
+ "actor": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [],
+ "rnn": {
+ "enabled": true,
+ "horizon": 10,
+ "hidden_dim": 400,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ }
+ },
+ "observation": {
+ "planner": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "subgoal": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "actor": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/can/paired/low_dim/iris.json b/code_src/rise_robomimic/robomimic/exps/paper/core/can/paired/low_dim/iris.json
new file mode 100644
index 0000000000000000000000000000000000000000..c7edfd126124ecced3ac4950582262512e371560
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/can/paired/low_dim/iris.json
@@ -0,0 +1,462 @@
+{
+ "algo_name": "iris",
+ "experiment": {
+ "name": "core_iris_can_paired_low_dim",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/can/paired/low_dim_v141.hdf5",
+ "output_dir": "experiments/core/iris/can/paired/low_dim/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 10,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 100,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "mode": "separate",
+ "actor_use_random_subgoals": false,
+ "subgoal_update_interval": 10,
+ "latent_subgoal": {
+ "enabled": false,
+ "prior_correction": {
+ "enabled": false,
+ "num_samples": 100
+ }
+ },
+ "value_planner": {
+ "planner": {
+ "optim_params": {
+ "goal_network": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "subgoal_horizon": 10,
+ "ae": {
+ "planner_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "vae": {
+ "enabled": true,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 0.0005,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": true,
+ "is_conditioned": true,
+ "use_gmm": true,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": true,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "decoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "prior_layer_dims": [
+ 1024,
+ 1024
+ ]
+ }
+ },
+ "value": {
+ "optim_params": {
+ "critic": {
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "action_sampler": {
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "actor": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ }
+ },
+ "discount": 0.99,
+ "n_step": 1,
+ "target_tau": 0.0005,
+ "infinite_horizon": false,
+ "critic": {
+ "use_huber": false,
+ "max_gradient_norm": null,
+ "value_bounds": null,
+ "num_action_samples": 10,
+ "num_action_samples_rollout": 100,
+ "ensemble": {
+ "n": 2,
+ "weight": 0.75
+ },
+ "distributional": {
+ "enabled": false,
+ "num_atoms": 51
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "action_sampler": {
+ "actor_layer_dims": [
+ 300,
+ 400
+ ],
+ "gmm": {
+ "enabled": false,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": true,
+ "latent_dim": 16,
+ "latent_clip": null,
+ "kl_weight": 0.05,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "freeze_encoder_epoch": -1
+ },
+ "actor": {
+ "enabled": false,
+ "perturbation_scale": 0.05,
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ }
+ },
+ "num_samples": 100
+ },
+ "actor": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [],
+ "rnn": {
+ "enabled": true,
+ "horizon": 10,
+ "hidden_dim": 400,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ }
+ },
+ "observation": {
+ "value_planner": {
+ "planner": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "subgoal": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "value": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ }
+ },
+ "actor": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/can/ph/image/bc.json b/code_src/rise_robomimic/robomimic/exps/paper/core/can/ph/image/bc.json
new file mode 100644
index 0000000000000000000000000000000000000000..0909c65373b2457d145fda8ce9cc72fda35a2e03
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/can/ph/image/bc.json
@@ -0,0 +1,236 @@
+{
+ "algo_name": "bc",
+ "experiment": {
+ "name": "core_bc_can_ph_image",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 20,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 500,
+ "validation_epoch_every_n_steps": 50,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 20,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/can/ph/image_v141.hdf5",
+ "output_dir": "experiments/core/bc/can/ph/image/trained_models",
+ "num_data_workers": 2,
+ "hdf5_cache_mode": "low_dim",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": false,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 16,
+ "num_epochs": 600,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "gaussian": {
+ "enabled": false,
+ "fixed_std": false,
+ "init_std": 0.1,
+ "min_std": 0.01,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "gmm": {
+ "enabled": true,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": false,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 1.0,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "rnn": {
+ "enabled": false,
+ "horizon": 10,
+ "hidden_dim": 400,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos"
+ ],
+ "rgb": [
+ "agentview_image",
+ "robot0_eye_in_hand_image"
+ ],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {
+ "feature_dimension": 64,
+ "backbone_class": "ResNet18Conv",
+ "backbone_kwargs": {
+ "pretrained": false,
+ "input_coord_conv": false
+ },
+ "pool_class": "SpatialSoftmax",
+ "pool_kwargs": {
+ "num_kp": 32,
+ "learnable_temperature": false,
+ "temperature": 1.0,
+ "noise_std": 0.0
+ }
+ },
+ "obs_randomizer_class": "CropRandomizer",
+ "obs_randomizer_kwargs": {
+ "crop_height": 76,
+ "crop_width": 76,
+ "num_crops": 1,
+ "pos_enc": false
+ }
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/can/ph/image/bc_rnn.json b/code_src/rise_robomimic/robomimic/exps/paper/core/can/ph/image/bc_rnn.json
new file mode 100644
index 0000000000000000000000000000000000000000..92790f0fcd82d84c93b84f93d6680756b1a1a090
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/can/ph/image/bc_rnn.json
@@ -0,0 +1,233 @@
+{
+ "algo_name": "bc",
+ "experiment": {
+ "name": "core_bc_rnn_can_ph_image",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 20,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 500,
+ "validation_epoch_every_n_steps": 50,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 20,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/can/ph/image_v141.hdf5",
+ "output_dir": "experiments/core/bc_rnn/can/ph/image/trained_models",
+ "num_data_workers": 2,
+ "hdf5_cache_mode": "low_dim",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": false,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 10,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 16,
+ "num_epochs": 600,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [],
+ "gaussian": {
+ "enabled": false,
+ "fixed_std": false,
+ "init_std": 0.1,
+ "min_std": 0.01,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "gmm": {
+ "enabled": true,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": false,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 1.0,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "rnn": {
+ "enabled": true,
+ "horizon": 10,
+ "hidden_dim": 1000,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos"
+ ],
+ "rgb": [
+ "agentview_image",
+ "robot0_eye_in_hand_image"
+ ],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {
+ "feature_dimension": 64,
+ "backbone_class": "ResNet18Conv",
+ "backbone_kwargs": {
+ "pretrained": false,
+ "input_coord_conv": false
+ },
+ "pool_class": "SpatialSoftmax",
+ "pool_kwargs": {
+ "num_kp": 32,
+ "learnable_temperature": false,
+ "temperature": 1.0,
+ "noise_std": 0.0
+ }
+ },
+ "obs_randomizer_class": "CropRandomizer",
+ "obs_randomizer_kwargs": {
+ "crop_height": 76,
+ "crop_width": 76,
+ "num_crops": 1,
+ "pos_enc": false
+ }
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/can/ph/image/bcq.json b/code_src/rise_robomimic/robomimic/exps/paper/core/can/ph/image/bcq.json
new file mode 100644
index 0000000000000000000000000000000000000000..ef317e03cf912251b13b814ce7af33c27d5d6d84
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/can/ph/image/bcq.json
@@ -0,0 +1,256 @@
+{
+ "algo_name": "bcq",
+ "experiment": {
+ "name": "core_bcq_can_ph_image",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 20,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 500,
+ "validation_epoch_every_n_steps": 50,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 20,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/can/ph/image_v141.hdf5",
+ "output_dir": "experiments/core/bcq/can/ph/image/trained_models",
+ "num_data_workers": 2,
+ "hdf5_cache_mode": "low_dim",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 16,
+ "num_epochs": 600,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "critic": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "action_sampler": {
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "actor": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ }
+ },
+ "discount": 0.99,
+ "n_step": 1,
+ "target_tau": 0.0005,
+ "infinite_horizon": false,
+ "critic": {
+ "use_huber": false,
+ "max_gradient_norm": null,
+ "value_bounds": null,
+ "num_action_samples": 10,
+ "num_action_samples_rollout": 100,
+ "ensemble": {
+ "n": 2,
+ "weight": 0.75
+ },
+ "distributional": {
+ "enabled": false,
+ "num_atoms": 51
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "action_sampler": {
+ "actor_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "gmm": {
+ "enabled": false,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": true,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 0.05,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "decoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "freeze_encoder_epoch": -1
+ },
+ "actor": {
+ "enabled": false,
+ "perturbation_scale": 0.05,
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos"
+ ],
+ "rgb": [
+ "agentview_image",
+ "robot0_eye_in_hand_image"
+ ],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {
+ "feature_dimension": 64,
+ "backbone_class": "ResNet18Conv",
+ "backbone_kwargs": {
+ "pretrained": false,
+ "input_coord_conv": false
+ },
+ "pool_class": "SpatialSoftmax",
+ "pool_kwargs": {
+ "num_kp": 32,
+ "learnable_temperature": false,
+ "temperature": 1.0,
+ "noise_std": 0.0
+ }
+ },
+ "obs_randomizer_class": "CropRandomizer",
+ "obs_randomizer_kwargs": {
+ "crop_height": 76,
+ "crop_width": 76,
+ "num_crops": 1,
+ "pos_enc": false
+ }
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/can/ph/image/cql.json b/code_src/rise_robomimic/robomimic/exps/paper/core/can/ph/image/cql.json
new file mode 100644
index 0000000000000000000000000000000000000000..1d768b820e82ece32316d60297e3e8e970f1ac75
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/can/ph/image/cql.json
@@ -0,0 +1,203 @@
+{
+ "algo_name": "cql",
+ "experiment": {
+ "name": "core_cql_can_ph_image",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 20,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 500,
+ "validation_epoch_every_n_steps": 50,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 20,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/can/ph/image_v141.hdf5",
+ "output_dir": "experiments/core/cql/can/ph/image/trained_models",
+ "num_data_workers": 2,
+ "hdf5_cache_mode": "low_dim",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 8,
+ "num_epochs": 600,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "critic": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.0,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ },
+ "actor": {
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.0,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "discount": 0.99,
+ "n_step": 1,
+ "target_tau": 0.005,
+ "actor": {
+ "bc_start_steps": 0,
+ "target_entropy": "default",
+ "max_gradient_norm": null,
+ "net": {
+ "type": "gaussian",
+ "common": {
+ "std_activation": "exp",
+ "use_tanh": true,
+ "low_noise_eval": true
+ },
+ "gaussian": {
+ "init_last_fc_weight": 0.001,
+ "init_std": 0.3,
+ "fixed_std": false
+ }
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "critic": {
+ "use_huber": false,
+ "max_gradient_norm": null,
+ "value_bounds": null,
+ "num_action_samples": 1,
+ "cql_weight": 1.0,
+ "deterministic_backup": true,
+ "min_q_weight": 1.0,
+ "target_q_gap": 5.0,
+ "num_random_actions": 10,
+ "ensemble": {
+ "n": 2
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos"
+ ],
+ "rgb": [
+ "agentview_image",
+ "robot0_eye_in_hand_image"
+ ],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {
+ "feature_dimension": 64,
+ "backbone_class": "ResNet18Conv",
+ "backbone_kwargs": {
+ "pretrained": false,
+ "input_coord_conv": false
+ },
+ "pool_class": "SpatialSoftmax",
+ "pool_kwargs": {
+ "num_kp": 32,
+ "learnable_temperature": false,
+ "temperature": 1.0,
+ "noise_std": 0.0
+ }
+ },
+ "obs_randomizer_class": "CropRandomizer",
+ "obs_randomizer_kwargs": {
+ "crop_height": 76,
+ "crop_width": 76,
+ "num_crops": 1,
+ "pos_enc": false
+ }
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/can/ph/low_dim/bc.json b/code_src/rise_robomimic/robomimic/exps/paper/core/can/ph/low_dim/bc.json
new file mode 100644
index 0000000000000000000000000000000000000000..08d9f84473f7a7544a55fe9137b9b1f7057be6ec
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/can/ph/low_dim/bc.json
@@ -0,0 +1,215 @@
+{
+ "algo_name": "bc",
+ "experiment": {
+ "name": "core_bc_can_ph_low_dim",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/can/ph/low_dim_v141.hdf5",
+ "output_dir": "experiments/core/bc/can/ph/low_dim/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": false,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 100,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "gaussian": {
+ "enabled": false,
+ "fixed_std": false,
+ "init_std": 0.1,
+ "min_std": 0.01,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "gmm": {
+ "enabled": true,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": false,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 1.0,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "rnn": {
+ "enabled": false,
+ "horizon": 10,
+ "hidden_dim": 400,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/can/ph/low_dim/bc_rnn.json b/code_src/rise_robomimic/robomimic/exps/paper/core/can/ph/low_dim/bc_rnn.json
new file mode 100644
index 0000000000000000000000000000000000000000..fdf60c2a7a6c928813b62c65f212fc1b17b6c5dd
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/can/ph/low_dim/bc_rnn.json
@@ -0,0 +1,212 @@
+{
+ "algo_name": "bc",
+ "experiment": {
+ "name": "core_bc_rnn_can_ph_low_dim",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/can/ph/low_dim_v141.hdf5",
+ "output_dir": "experiments/core/bc_rnn/can/ph/low_dim/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": false,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 10,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 100,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [],
+ "gaussian": {
+ "enabled": false,
+ "fixed_std": false,
+ "init_std": 0.1,
+ "min_std": 0.01,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "gmm": {
+ "enabled": true,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": false,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 1.0,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "rnn": {
+ "enabled": true,
+ "horizon": 10,
+ "hidden_dim": 400,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/can/ph/low_dim/bcq.json b/code_src/rise_robomimic/robomimic/exps/paper/core/can/ph/low_dim/bcq.json
new file mode 100644
index 0000000000000000000000000000000000000000..fa8a7d4502f3e05ff448110a3b64fa1fd040c945
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/can/ph/low_dim/bcq.json
@@ -0,0 +1,235 @@
+{
+ "algo_name": "bcq",
+ "experiment": {
+ "name": "core_bcq_can_ph_low_dim",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/can/ph/low_dim_v141.hdf5",
+ "output_dir": "experiments/core/bcq/can/ph/low_dim/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 100,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "critic": {
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "action_sampler": {
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "actor": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ }
+ },
+ "discount": 0.99,
+ "n_step": 1,
+ "target_tau": 0.0005,
+ "infinite_horizon": false,
+ "critic": {
+ "use_huber": false,
+ "max_gradient_norm": null,
+ "value_bounds": null,
+ "num_action_samples": 10,
+ "num_action_samples_rollout": 100,
+ "ensemble": {
+ "n": 2,
+ "weight": 0.75
+ },
+ "distributional": {
+ "enabled": false,
+ "num_atoms": 51
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "action_sampler": {
+ "actor_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "gmm": {
+ "enabled": false,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": true,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 0.05,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "freeze_encoder_epoch": -1
+ },
+ "actor": {
+ "enabled": false,
+ "perturbation_scale": 0.05,
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/can/ph/low_dim/cql.json b/code_src/rise_robomimic/robomimic/exps/paper/core/can/ph/low_dim/cql.json
new file mode 100644
index 0000000000000000000000000000000000000000..cb3d60bcc6908cf71f412e936f1c97544d21223b
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/can/ph/low_dim/cql.json
@@ -0,0 +1,182 @@
+{
+ "algo_name": "cql",
+ "experiment": {
+ "name": "core_cql_can_ph_low_dim",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/can/ph/low_dim_v141.hdf5",
+ "output_dir": "experiments/core/cql/can/ph/low_dim/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 1024,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "critic": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.0,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ },
+ "actor": {
+ "learning_rate": {
+ "initial": 0.0003,
+ "decay_factor": 0.0,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "discount": 0.99,
+ "n_step": 1,
+ "target_tau": 0.005,
+ "actor": {
+ "bc_start_steps": 0,
+ "target_entropy": "default",
+ "max_gradient_norm": null,
+ "net": {
+ "type": "gaussian",
+ "common": {
+ "std_activation": "exp",
+ "use_tanh": true,
+ "low_noise_eval": true
+ },
+ "gaussian": {
+ "init_last_fc_weight": 0.001,
+ "init_std": 0.3,
+ "fixed_std": false
+ }
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "critic": {
+ "use_huber": false,
+ "max_gradient_norm": null,
+ "value_bounds": null,
+ "num_action_samples": 1,
+ "cql_weight": 1.0,
+ "deterministic_backup": true,
+ "min_q_weight": 1.0,
+ "target_q_gap": 5.0,
+ "num_random_actions": 10,
+ "ensemble": {
+ "n": 2
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/can/ph/low_dim/hbc.json b/code_src/rise_robomimic/robomimic/exps/paper/core/can/ph/low_dim/hbc.json
new file mode 100644
index 0000000000000000000000000000000000000000..a44f56f4d18525fe15073b0c8ef9ca595ef9107b
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/can/ph/low_dim/hbc.json
@@ -0,0 +1,290 @@
+{
+ "algo_name": "hbc",
+ "experiment": {
+ "name": "core_hbc_can_ph_low_dim",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/can/ph/low_dim_v141.hdf5",
+ "output_dir": "experiments/core/hbc/can/ph/low_dim/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 10,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 100,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "mode": "separate",
+ "actor_use_random_subgoals": false,
+ "subgoal_update_interval": 10,
+ "latent_subgoal": {
+ "enabled": false,
+ "prior_correction": {
+ "enabled": false,
+ "num_samples": 100
+ }
+ },
+ "planner": {
+ "optim_params": {
+ "goal_network": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "subgoal_horizon": 10,
+ "ae": {
+ "planner_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "vae": {
+ "enabled": true,
+ "latent_dim": 16,
+ "latent_clip": null,
+ "kl_weight": 0.0005,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": true,
+ "is_conditioned": true,
+ "use_gmm": true,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": true,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "decoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "prior_layer_dims": [
+ 1024,
+ 1024
+ ]
+ }
+ },
+ "actor": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [],
+ "rnn": {
+ "enabled": true,
+ "horizon": 10,
+ "hidden_dim": 400,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ }
+ },
+ "observation": {
+ "planner": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "subgoal": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "actor": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/can/ph/low_dim/iris.json b/code_src/rise_robomimic/robomimic/exps/paper/core/can/ph/low_dim/iris.json
new file mode 100644
index 0000000000000000000000000000000000000000..4e5803309bf4e1f41ada741bb915212c9fb1ee69
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/can/ph/low_dim/iris.json
@@ -0,0 +1,462 @@
+{
+ "algo_name": "iris",
+ "experiment": {
+ "name": "core_iris_can_ph_low_dim",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/can/ph/low_dim_v141.hdf5",
+ "output_dir": "experiments/core/iris/can/ph/low_dim/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 10,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 100,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "mode": "separate",
+ "actor_use_random_subgoals": false,
+ "subgoal_update_interval": 10,
+ "latent_subgoal": {
+ "enabled": false,
+ "prior_correction": {
+ "enabled": false,
+ "num_samples": 100
+ }
+ },
+ "value_planner": {
+ "planner": {
+ "optim_params": {
+ "goal_network": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "subgoal_horizon": 10,
+ "ae": {
+ "planner_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "vae": {
+ "enabled": true,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 0.0005,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": true,
+ "is_conditioned": true,
+ "use_gmm": true,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": true,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "decoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "prior_layer_dims": [
+ 1024,
+ 1024
+ ]
+ }
+ },
+ "value": {
+ "optim_params": {
+ "critic": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "action_sampler": {
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "actor": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ }
+ },
+ "discount": 0.99,
+ "n_step": 1,
+ "target_tau": 0.0005,
+ "infinite_horizon": false,
+ "critic": {
+ "use_huber": false,
+ "max_gradient_norm": null,
+ "value_bounds": null,
+ "num_action_samples": 10,
+ "num_action_samples_rollout": 100,
+ "ensemble": {
+ "n": 2,
+ "weight": 0.75
+ },
+ "distributional": {
+ "enabled": false,
+ "num_atoms": 51
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "action_sampler": {
+ "actor_layer_dims": [
+ 300,
+ 400
+ ],
+ "gmm": {
+ "enabled": false,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": true,
+ "latent_dim": 16,
+ "latent_clip": null,
+ "kl_weight": 0.5,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "freeze_encoder_epoch": -1
+ },
+ "actor": {
+ "enabled": false,
+ "perturbation_scale": 0.05,
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ }
+ },
+ "num_samples": 100
+ },
+ "actor": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [],
+ "rnn": {
+ "enabled": true,
+ "horizon": 10,
+ "hidden_dim": 400,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ }
+ },
+ "observation": {
+ "value_planner": {
+ "planner": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "subgoal": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "value": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ }
+ },
+ "actor": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/can_real/ph/raw/bc_rnn.json b/code_src/rise_robomimic/robomimic/exps/paper/core/can_real/ph/raw/bc_rnn.json
new file mode 100644
index 0000000000000000000000000000000000000000..f553da644e6e80951373c662f066b24fd778e3f8
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/can_real/ph/raw/bc_rnn.json
@@ -0,0 +1,232 @@
+{
+ "algo_name": "bc",
+ "experiment": {
+ "name": "core_bc_rnn_can_real_ph_raw",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 20,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 500,
+ "validation_epoch_every_n_steps": 50,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": false,
+ "n": 50,
+ "horizon": 1000,
+ "rate": 20,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/can_real/ph/demo.hdf5",
+ "output_dir": "experiments/core/bc_rnn/can_real/ph/raw/trained_models",
+ "num_data_workers": 2,
+ "hdf5_cache_mode": "low_dim",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": false,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 10,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 16,
+ "num_epochs": 600,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [],
+ "gaussian": {
+ "enabled": false,
+ "fixed_std": false,
+ "init_std": 0.1,
+ "min_std": 0.01,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "gmm": {
+ "enabled": true,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": false,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 1.0,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "rnn": {
+ "enabled": true,
+ "horizon": 10,
+ "hidden_dim": 1000,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "ee_pose",
+ "gripper_position"
+ ],
+ "rgb": [
+ "image",
+ "image_wrist"
+ ],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {
+ "feature_dimension": 64,
+ "backbone_class": "ResNet18Conv",
+ "backbone_kwargs": {
+ "pretrained": false,
+ "input_coord_conv": false
+ },
+ "pool_class": "SpatialSoftmax",
+ "pool_kwargs": {
+ "num_kp": 32,
+ "learnable_temperature": false,
+ "temperature": 1.0,
+ "noise_std": 0.0
+ }
+ },
+ "obs_randomizer_class": "CropRandomizer",
+ "obs_randomizer_kwargs": {
+ "crop_height": 108,
+ "crop_width": 108,
+ "num_crops": 1,
+ "pos_enc": false
+ }
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/image_dense/bc.json b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/image_dense/bc.json
new file mode 100644
index 0000000000000000000000000000000000000000..70ac97d06b9ab432bf34244483b39f5050363d75
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/image_dense/bc.json
@@ -0,0 +1,236 @@
+{
+ "algo_name": "bc",
+ "experiment": {
+ "name": "core_bc_lift_mg_image_dense",
+ "validate": false,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 20,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 500,
+ "validation_epoch_every_n_steps": 50,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 20,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/lift/mg/image_dense_v141.hdf5",
+ "output_dir": "experiments/core/bc/lift/mg/image_dense/trained_models",
+ "num_data_workers": 2,
+ "hdf5_cache_mode": "low_dim",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": false,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": null,
+ "hdf5_validation_filter_key": null,
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 16,
+ "num_epochs": 600,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "gaussian": {
+ "enabled": false,
+ "fixed_std": false,
+ "init_std": 0.1,
+ "min_std": 0.01,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "gmm": {
+ "enabled": false,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": false,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 1.0,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "rnn": {
+ "enabled": false,
+ "horizon": 10,
+ "hidden_dim": 400,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos"
+ ],
+ "rgb": [
+ "agentview_image",
+ "robot0_eye_in_hand_image"
+ ],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {
+ "feature_dimension": 64,
+ "backbone_class": "ResNet18Conv",
+ "backbone_kwargs": {
+ "pretrained": false,
+ "input_coord_conv": false
+ },
+ "pool_class": "SpatialSoftmax",
+ "pool_kwargs": {
+ "num_kp": 32,
+ "learnable_temperature": false,
+ "temperature": 1.0,
+ "noise_std": 0.0
+ }
+ },
+ "obs_randomizer_class": "CropRandomizer",
+ "obs_randomizer_kwargs": {
+ "crop_height": 76,
+ "crop_width": 76,
+ "num_crops": 1,
+ "pos_enc": false
+ }
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/image_dense/bc_rnn.json b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/image_dense/bc_rnn.json
new file mode 100644
index 0000000000000000000000000000000000000000..2b7f720a616e2569255d6e7a9ecb703641ee9338
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/image_dense/bc_rnn.json
@@ -0,0 +1,233 @@
+{
+ "algo_name": "bc",
+ "experiment": {
+ "name": "core_bc_rnn_lift_mg_image_dense",
+ "validate": false,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 20,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 500,
+ "validation_epoch_every_n_steps": 50,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 20,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/lift/mg/image_dense_v141.hdf5",
+ "output_dir": "experiments/core/bc_rnn/lift/mg/image_dense/trained_models",
+ "num_data_workers": 2,
+ "hdf5_cache_mode": "low_dim",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": false,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": null,
+ "hdf5_validation_filter_key": null,
+ "seq_length": 10,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 16,
+ "num_epochs": 600,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [],
+ "gaussian": {
+ "enabled": false,
+ "fixed_std": false,
+ "init_std": 0.1,
+ "min_std": 0.01,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "gmm": {
+ "enabled": false,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": false,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 1.0,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "rnn": {
+ "enabled": true,
+ "horizon": 10,
+ "hidden_dim": 1000,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos"
+ ],
+ "rgb": [
+ "agentview_image",
+ "robot0_eye_in_hand_image"
+ ],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {
+ "feature_dimension": 64,
+ "backbone_class": "ResNet18Conv",
+ "backbone_kwargs": {
+ "pretrained": false,
+ "input_coord_conv": false
+ },
+ "pool_class": "SpatialSoftmax",
+ "pool_kwargs": {
+ "num_kp": 32,
+ "learnable_temperature": false,
+ "temperature": 1.0,
+ "noise_std": 0.0
+ }
+ },
+ "obs_randomizer_class": "CropRandomizer",
+ "obs_randomizer_kwargs": {
+ "crop_height": 76,
+ "crop_width": 76,
+ "num_crops": 1,
+ "pos_enc": false
+ }
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/image_dense/bcq.json b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/image_dense/bcq.json
new file mode 100644
index 0000000000000000000000000000000000000000..75cf45fb1165aed7ee4efdda4b65d26870c8fb97
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/image_dense/bcq.json
@@ -0,0 +1,256 @@
+{
+ "algo_name": "bcq",
+ "experiment": {
+ "name": "core_bcq_lift_mg_image_dense",
+ "validate": false,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 20,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 500,
+ "validation_epoch_every_n_steps": 50,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 20,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/lift/mg/image_dense_v141.hdf5",
+ "output_dir": "experiments/core/bcq/lift/mg/image_dense/trained_models",
+ "num_data_workers": 2,
+ "hdf5_cache_mode": "low_dim",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": null,
+ "hdf5_validation_filter_key": null,
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 16,
+ "num_epochs": 600,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "critic": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "action_sampler": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "actor": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ }
+ },
+ "discount": 0.99,
+ "n_step": 1,
+ "target_tau": 0.005,
+ "infinite_horizon": false,
+ "critic": {
+ "use_huber": false,
+ "max_gradient_norm": null,
+ "value_bounds": null,
+ "num_action_samples": 10,
+ "num_action_samples_rollout": 100,
+ "ensemble": {
+ "n": 2,
+ "weight": 0.75
+ },
+ "distributional": {
+ "enabled": false,
+ "num_atoms": 51
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "action_sampler": {
+ "actor_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "gmm": {
+ "enabled": false,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": true,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 0.5,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "freeze_encoder_epoch": -1
+ },
+ "actor": {
+ "enabled": false,
+ "perturbation_scale": 0.05,
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos"
+ ],
+ "rgb": [
+ "agentview_image",
+ "robot0_eye_in_hand_image"
+ ],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {
+ "feature_dimension": 64,
+ "backbone_class": "ResNet18Conv",
+ "backbone_kwargs": {
+ "pretrained": false,
+ "input_coord_conv": false
+ },
+ "pool_class": "SpatialSoftmax",
+ "pool_kwargs": {
+ "num_kp": 32,
+ "learnable_temperature": false,
+ "temperature": 1.0,
+ "noise_std": 0.0
+ }
+ },
+ "obs_randomizer_class": "CropRandomizer",
+ "obs_randomizer_kwargs": {
+ "crop_height": 76,
+ "crop_width": 76,
+ "num_crops": 1,
+ "pos_enc": false
+ }
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/image_dense/cql.json b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/image_dense/cql.json
new file mode 100644
index 0000000000000000000000000000000000000000..5c1b6db8cd2e284d118b186ab0daa4b0c58ce21e
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/image_dense/cql.json
@@ -0,0 +1,203 @@
+{
+ "algo_name": "cql",
+ "experiment": {
+ "name": "core_cql_lift_mg_image_dense",
+ "validate": false,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 20,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 500,
+ "validation_epoch_every_n_steps": 50,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 20,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/lift/mg/image_dense_v141.hdf5",
+ "output_dir": "experiments/core/cql/lift/mg/image_dense/trained_models",
+ "num_data_workers": 2,
+ "hdf5_cache_mode": "low_dim",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": null,
+ "hdf5_validation_filter_key": null,
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 8,
+ "num_epochs": 600,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "critic": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.0,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ },
+ "actor": {
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.0,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "discount": 0.99,
+ "n_step": 1,
+ "target_tau": 0.005,
+ "actor": {
+ "bc_start_steps": 0,
+ "target_entropy": "default",
+ "max_gradient_norm": null,
+ "net": {
+ "type": "gaussian",
+ "common": {
+ "std_activation": "exp",
+ "use_tanh": true,
+ "low_noise_eval": true
+ },
+ "gaussian": {
+ "init_last_fc_weight": 0.001,
+ "init_std": 0.3,
+ "fixed_std": false
+ }
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "critic": {
+ "use_huber": false,
+ "max_gradient_norm": null,
+ "value_bounds": null,
+ "num_action_samples": 1,
+ "cql_weight": 1.0,
+ "deterministic_backup": true,
+ "min_q_weight": 1.0,
+ "target_q_gap": 5.0,
+ "num_random_actions": 10,
+ "ensemble": {
+ "n": 2
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos"
+ ],
+ "rgb": [
+ "agentview_image",
+ "robot0_eye_in_hand_image"
+ ],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {
+ "feature_dimension": 64,
+ "backbone_class": "ResNet18Conv",
+ "backbone_kwargs": {
+ "pretrained": false,
+ "input_coord_conv": false
+ },
+ "pool_class": "SpatialSoftmax",
+ "pool_kwargs": {
+ "num_kp": 32,
+ "learnable_temperature": false,
+ "temperature": 1.0,
+ "noise_std": 0.0
+ }
+ },
+ "obs_randomizer_class": "CropRandomizer",
+ "obs_randomizer_kwargs": {
+ "crop_height": 76,
+ "crop_width": 76,
+ "num_crops": 1,
+ "pos_enc": false
+ }
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/image_sparse/bc.json b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/image_sparse/bc.json
new file mode 100644
index 0000000000000000000000000000000000000000..f70b22f061725e382b684cf5c8287a7c2295365a
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/image_sparse/bc.json
@@ -0,0 +1,236 @@
+{
+ "algo_name": "bc",
+ "experiment": {
+ "name": "core_bc_lift_mg_image_sparse",
+ "validate": false,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 20,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 500,
+ "validation_epoch_every_n_steps": 50,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 20,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/lift/mg/image_sparse_v141.hdf5",
+ "output_dir": "experiments/core/bc/lift/mg/image_sparse/trained_models",
+ "num_data_workers": 2,
+ "hdf5_cache_mode": "low_dim",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": false,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": null,
+ "hdf5_validation_filter_key": null,
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 16,
+ "num_epochs": 600,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "gaussian": {
+ "enabled": false,
+ "fixed_std": false,
+ "init_std": 0.1,
+ "min_std": 0.01,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "gmm": {
+ "enabled": false,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": false,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 1.0,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "rnn": {
+ "enabled": false,
+ "horizon": 10,
+ "hidden_dim": 400,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos"
+ ],
+ "rgb": [
+ "agentview_image",
+ "robot0_eye_in_hand_image"
+ ],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {
+ "feature_dimension": 64,
+ "backbone_class": "ResNet18Conv",
+ "backbone_kwargs": {
+ "pretrained": false,
+ "input_coord_conv": false
+ },
+ "pool_class": "SpatialSoftmax",
+ "pool_kwargs": {
+ "num_kp": 32,
+ "learnable_temperature": false,
+ "temperature": 1.0,
+ "noise_std": 0.0
+ }
+ },
+ "obs_randomizer_class": "CropRandomizer",
+ "obs_randomizer_kwargs": {
+ "crop_height": 76,
+ "crop_width": 76,
+ "num_crops": 1,
+ "pos_enc": false
+ }
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/image_sparse/bc_rnn.json b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/image_sparse/bc_rnn.json
new file mode 100644
index 0000000000000000000000000000000000000000..4dd0edf188de6ba1bd8873cb698933ca6439cbf9
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/image_sparse/bc_rnn.json
@@ -0,0 +1,233 @@
+{
+ "algo_name": "bc",
+ "experiment": {
+ "name": "core_bc_rnn_lift_mg_image_sparse",
+ "validate": false,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 20,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 500,
+ "validation_epoch_every_n_steps": 50,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 20,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/lift/mg/image_sparse_v141.hdf5",
+ "output_dir": "experiments/core/bc_rnn/lift/mg/image_sparse/trained_models",
+ "num_data_workers": 2,
+ "hdf5_cache_mode": "low_dim",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": false,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": null,
+ "hdf5_validation_filter_key": null,
+ "seq_length": 10,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 16,
+ "num_epochs": 600,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [],
+ "gaussian": {
+ "enabled": false,
+ "fixed_std": false,
+ "init_std": 0.1,
+ "min_std": 0.01,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "gmm": {
+ "enabled": false,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": false,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 1.0,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "rnn": {
+ "enabled": true,
+ "horizon": 10,
+ "hidden_dim": 1000,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos"
+ ],
+ "rgb": [
+ "agentview_image",
+ "robot0_eye_in_hand_image"
+ ],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {
+ "feature_dimension": 64,
+ "backbone_class": "ResNet18Conv",
+ "backbone_kwargs": {
+ "pretrained": false,
+ "input_coord_conv": false
+ },
+ "pool_class": "SpatialSoftmax",
+ "pool_kwargs": {
+ "num_kp": 32,
+ "learnable_temperature": false,
+ "temperature": 1.0,
+ "noise_std": 0.0
+ }
+ },
+ "obs_randomizer_class": "CropRandomizer",
+ "obs_randomizer_kwargs": {
+ "crop_height": 76,
+ "crop_width": 76,
+ "num_crops": 1,
+ "pos_enc": false
+ }
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/image_sparse/bcq.json b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/image_sparse/bcq.json
new file mode 100644
index 0000000000000000000000000000000000000000..87995e28b28a069adf8d23a459fff9bc6784ed5f
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/image_sparse/bcq.json
@@ -0,0 +1,256 @@
+{
+ "algo_name": "bcq",
+ "experiment": {
+ "name": "core_bcq_lift_mg_image_sparse",
+ "validate": false,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 20,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 500,
+ "validation_epoch_every_n_steps": 50,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 20,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/lift/mg/image_sparse_v141.hdf5",
+ "output_dir": "experiments/core/bcq/lift/mg/image_sparse/trained_models",
+ "num_data_workers": 2,
+ "hdf5_cache_mode": "low_dim",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": null,
+ "hdf5_validation_filter_key": null,
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 16,
+ "num_epochs": 600,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "critic": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "action_sampler": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "actor": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ }
+ },
+ "discount": 0.99,
+ "n_step": 1,
+ "target_tau": 0.005,
+ "infinite_horizon": false,
+ "critic": {
+ "use_huber": false,
+ "max_gradient_norm": null,
+ "value_bounds": null,
+ "num_action_samples": 10,
+ "num_action_samples_rollout": 100,
+ "ensemble": {
+ "n": 2,
+ "weight": 0.75
+ },
+ "distributional": {
+ "enabled": false,
+ "num_atoms": 51
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "action_sampler": {
+ "actor_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "gmm": {
+ "enabled": false,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": true,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 0.5,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "freeze_encoder_epoch": -1
+ },
+ "actor": {
+ "enabled": false,
+ "perturbation_scale": 0.05,
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos"
+ ],
+ "rgb": [
+ "agentview_image",
+ "robot0_eye_in_hand_image"
+ ],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {
+ "feature_dimension": 64,
+ "backbone_class": "ResNet18Conv",
+ "backbone_kwargs": {
+ "pretrained": false,
+ "input_coord_conv": false
+ },
+ "pool_class": "SpatialSoftmax",
+ "pool_kwargs": {
+ "num_kp": 32,
+ "learnable_temperature": false,
+ "temperature": 1.0,
+ "noise_std": 0.0
+ }
+ },
+ "obs_randomizer_class": "CropRandomizer",
+ "obs_randomizer_kwargs": {
+ "crop_height": 76,
+ "crop_width": 76,
+ "num_crops": 1,
+ "pos_enc": false
+ }
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/image_sparse/cql.json b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/image_sparse/cql.json
new file mode 100644
index 0000000000000000000000000000000000000000..62c6dede8eee7da771e78715044d715c4134bd4f
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/image_sparse/cql.json
@@ -0,0 +1,203 @@
+{
+ "algo_name": "cql",
+ "experiment": {
+ "name": "core_cql_lift_mg_image_sparse",
+ "validate": false,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 20,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 500,
+ "validation_epoch_every_n_steps": 50,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 20,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/lift/mg/image_sparse_v141.hdf5",
+ "output_dir": "experiments/core/cql/lift/mg/image_sparse/trained_models",
+ "num_data_workers": 2,
+ "hdf5_cache_mode": "low_dim",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": null,
+ "hdf5_validation_filter_key": null,
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 8,
+ "num_epochs": 600,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "critic": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.0,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ },
+ "actor": {
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.0,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "discount": 0.99,
+ "n_step": 1,
+ "target_tau": 0.005,
+ "actor": {
+ "bc_start_steps": 0,
+ "target_entropy": "default",
+ "max_gradient_norm": null,
+ "net": {
+ "type": "gaussian",
+ "common": {
+ "std_activation": "exp",
+ "use_tanh": true,
+ "low_noise_eval": true
+ },
+ "gaussian": {
+ "init_last_fc_weight": 0.001,
+ "init_std": 0.3,
+ "fixed_std": false
+ }
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "critic": {
+ "use_huber": false,
+ "max_gradient_norm": null,
+ "value_bounds": null,
+ "num_action_samples": 1,
+ "cql_weight": 1.0,
+ "deterministic_backup": true,
+ "min_q_weight": 1.0,
+ "target_q_gap": 5.0,
+ "num_random_actions": 10,
+ "ensemble": {
+ "n": 2
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos"
+ ],
+ "rgb": [
+ "agentview_image",
+ "robot0_eye_in_hand_image"
+ ],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {
+ "feature_dimension": 64,
+ "backbone_class": "ResNet18Conv",
+ "backbone_kwargs": {
+ "pretrained": false,
+ "input_coord_conv": false
+ },
+ "pool_class": "SpatialSoftmax",
+ "pool_kwargs": {
+ "num_kp": 32,
+ "learnable_temperature": false,
+ "temperature": 1.0,
+ "noise_std": 0.0
+ }
+ },
+ "obs_randomizer_class": "CropRandomizer",
+ "obs_randomizer_kwargs": {
+ "crop_height": 76,
+ "crop_width": 76,
+ "num_crops": 1,
+ "pos_enc": false
+ }
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/low_dim_dense/bc.json b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/low_dim_dense/bc.json
new file mode 100644
index 0000000000000000000000000000000000000000..27abab3c7762263854ebc7e8b8ed0a5857081599
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/low_dim_dense/bc.json
@@ -0,0 +1,215 @@
+{
+ "algo_name": "bc",
+ "experiment": {
+ "name": "core_bc_lift_mg_low_dim_dense",
+ "validate": false,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/lift/mg/low_dim_dense_v141.hdf5",
+ "output_dir": "experiments/core/bc/lift/mg/low_dim_dense/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": false,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": null,
+ "hdf5_validation_filter_key": null,
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 100,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "gaussian": {
+ "enabled": false,
+ "fixed_std": false,
+ "init_std": 0.1,
+ "min_std": 0.01,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "gmm": {
+ "enabled": false,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": false,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 1.0,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "rnn": {
+ "enabled": false,
+ "horizon": 10,
+ "hidden_dim": 400,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/low_dim_dense/bc_rnn.json b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/low_dim_dense/bc_rnn.json
new file mode 100644
index 0000000000000000000000000000000000000000..a2885289e66827fd71b9d204c99d70fed563b207
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/low_dim_dense/bc_rnn.json
@@ -0,0 +1,212 @@
+{
+ "algo_name": "bc",
+ "experiment": {
+ "name": "core_bc_rnn_lift_mg_low_dim_dense",
+ "validate": false,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/lift/mg/low_dim_dense_v141.hdf5",
+ "output_dir": "experiments/core/bc_rnn/lift/mg/low_dim_dense/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": false,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": null,
+ "hdf5_validation_filter_key": null,
+ "seq_length": 10,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 100,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [],
+ "gaussian": {
+ "enabled": false,
+ "fixed_std": false,
+ "init_std": 0.1,
+ "min_std": 0.01,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "gmm": {
+ "enabled": false,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": false,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 1.0,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "rnn": {
+ "enabled": true,
+ "horizon": 10,
+ "hidden_dim": 400,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/low_dim_dense/bcq.json b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/low_dim_dense/bcq.json
new file mode 100644
index 0000000000000000000000000000000000000000..dd711f50a088d0530e349630dd7390c9dc29e1c2
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/low_dim_dense/bcq.json
@@ -0,0 +1,235 @@
+{
+ "algo_name": "bcq",
+ "experiment": {
+ "name": "core_bcq_lift_mg_low_dim_dense",
+ "validate": false,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/lift/mg/low_dim_dense_v141.hdf5",
+ "output_dir": "experiments/core/bcq/lift/mg/low_dim_dense/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": null,
+ "hdf5_validation_filter_key": null,
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 100,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "critic": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "action_sampler": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "actor": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ }
+ },
+ "discount": 0.99,
+ "n_step": 1,
+ "target_tau": 0.005,
+ "infinite_horizon": false,
+ "critic": {
+ "use_huber": false,
+ "max_gradient_norm": null,
+ "value_bounds": null,
+ "num_action_samples": 10,
+ "num_action_samples_rollout": 100,
+ "ensemble": {
+ "n": 2,
+ "weight": 0.75
+ },
+ "distributional": {
+ "enabled": false,
+ "num_atoms": 51
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "action_sampler": {
+ "actor_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "gmm": {
+ "enabled": false,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": true,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 0.5,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "freeze_encoder_epoch": -1
+ },
+ "actor": {
+ "enabled": true,
+ "perturbation_scale": 0.05,
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/low_dim_dense/cql.json b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/low_dim_dense/cql.json
new file mode 100644
index 0000000000000000000000000000000000000000..19957199522b22b01e0ed5a83c5d2b57734acaa7
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/low_dim_dense/cql.json
@@ -0,0 +1,182 @@
+{
+ "algo_name": "cql",
+ "experiment": {
+ "name": "core_cql_lift_mg_low_dim_dense",
+ "validate": false,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/lift/mg/low_dim_dense_v141.hdf5",
+ "output_dir": "experiments/core/cql/lift/mg/low_dim_dense/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": null,
+ "hdf5_validation_filter_key": null,
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 1024,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "critic": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.0,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ },
+ "actor": {
+ "learning_rate": {
+ "initial": 0.0003,
+ "decay_factor": 0.0,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "discount": 0.99,
+ "n_step": 1,
+ "target_tau": 0.005,
+ "actor": {
+ "bc_start_steps": 0,
+ "target_entropy": "default",
+ "max_gradient_norm": null,
+ "net": {
+ "type": "gaussian",
+ "common": {
+ "std_activation": "exp",
+ "use_tanh": true,
+ "low_noise_eval": true
+ },
+ "gaussian": {
+ "init_last_fc_weight": 0.001,
+ "init_std": 0.3,
+ "fixed_std": false
+ }
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "critic": {
+ "use_huber": false,
+ "max_gradient_norm": null,
+ "value_bounds": null,
+ "num_action_samples": 1,
+ "cql_weight": 1.0,
+ "deterministic_backup": true,
+ "min_q_weight": 1.0,
+ "target_q_gap": 5.0,
+ "num_random_actions": 10,
+ "ensemble": {
+ "n": 2
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/low_dim_dense/hbc.json b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/low_dim_dense/hbc.json
new file mode 100644
index 0000000000000000000000000000000000000000..9dd9baecd41a4d37a861071b52a7f4daa4958d84
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/low_dim_dense/hbc.json
@@ -0,0 +1,293 @@
+{
+ "algo_name": "hbc",
+ "experiment": {
+ "name": "core_hbc_lift_mg_low_dim_dense",
+ "validate": false,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/lift/mg/low_dim_dense_v141.hdf5",
+ "output_dir": "experiments/core/hbc/lift/mg/low_dim_dense/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": null,
+ "hdf5_validation_filter_key": null,
+ "seq_length": 10,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 100,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "mode": "separate",
+ "actor_use_random_subgoals": false,
+ "subgoal_update_interval": 10,
+ "latent_subgoal": {
+ "enabled": false,
+ "prior_correction": {
+ "enabled": false,
+ "num_samples": 100
+ }
+ },
+ "planner": {
+ "optim_params": {
+ "goal_network": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "subgoal_horizon": 10,
+ "ae": {
+ "planner_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "vae": {
+ "enabled": true,
+ "latent_dim": 16,
+ "latent_clip": null,
+ "kl_weight": 0.0005,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": true,
+ "is_conditioned": true,
+ "use_gmm": true,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": true,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "decoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "prior_layer_dims": [
+ 1024,
+ 1024
+ ]
+ }
+ },
+ "actor": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "rnn": {
+ "enabled": true,
+ "horizon": 10,
+ "hidden_dim": 100,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ }
+ },
+ "observation": {
+ "planner": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "subgoal": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "actor": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/low_dim_dense/iris.json b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/low_dim_dense/iris.json
new file mode 100644
index 0000000000000000000000000000000000000000..0b0dddcc42b026501b4590b035b199962d317707
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/low_dim_dense/iris.json
@@ -0,0 +1,462 @@
+{
+ "algo_name": "iris",
+ "experiment": {
+ "name": "core_iris_lift_mg_low_dim_dense",
+ "validate": false,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/lift/mg/low_dim_dense_v141.hdf5",
+ "output_dir": "experiments/core/iris/lift/mg/low_dim_dense/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": null,
+ "hdf5_validation_filter_key": null,
+ "seq_length": 10,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 100,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "mode": "separate",
+ "actor_use_random_subgoals": false,
+ "subgoal_update_interval": 10,
+ "latent_subgoal": {
+ "enabled": false,
+ "prior_correction": {
+ "enabled": false,
+ "num_samples": 100
+ }
+ },
+ "value_planner": {
+ "planner": {
+ "optim_params": {
+ "goal_network": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "subgoal_horizon": 10,
+ "ae": {
+ "planner_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "vae": {
+ "enabled": true,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 0.0005,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": true,
+ "is_conditioned": true,
+ "use_gmm": true,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": true,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "decoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "prior_layer_dims": [
+ 1024,
+ 1024
+ ]
+ }
+ },
+ "value": {
+ "optim_params": {
+ "critic": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "action_sampler": {
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "actor": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ }
+ },
+ "discount": 0.99,
+ "n_step": 1,
+ "target_tau": 0.005,
+ "infinite_horizon": false,
+ "critic": {
+ "use_huber": false,
+ "max_gradient_norm": null,
+ "value_bounds": null,
+ "num_action_samples": 10,
+ "num_action_samples_rollout": 100,
+ "ensemble": {
+ "n": 2,
+ "weight": 0.75
+ },
+ "distributional": {
+ "enabled": false,
+ "num_atoms": 51
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "action_sampler": {
+ "actor_layer_dims": [
+ 300,
+ 400
+ ],
+ "gmm": {
+ "enabled": false,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": true,
+ "latent_dim": 16,
+ "latent_clip": null,
+ "kl_weight": 0.5,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "freeze_encoder_epoch": -1
+ },
+ "actor": {
+ "enabled": true,
+ "perturbation_scale": 0.05,
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ }
+ },
+ "num_samples": 100
+ },
+ "actor": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [],
+ "rnn": {
+ "enabled": true,
+ "horizon": 10,
+ "hidden_dim": 400,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ }
+ },
+ "observation": {
+ "value_planner": {
+ "planner": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "subgoal": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "value": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ }
+ },
+ "actor": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/low_dim_sparse/bc.json b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/low_dim_sparse/bc.json
new file mode 100644
index 0000000000000000000000000000000000000000..570042bd0c8cf32bffd6167cacc855900f580844
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/low_dim_sparse/bc.json
@@ -0,0 +1,215 @@
+{
+ "algo_name": "bc",
+ "experiment": {
+ "name": "core_bc_lift_mg_low_dim_sparse",
+ "validate": false,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/lift/mg/low_dim_sparse_v141.hdf5",
+ "output_dir": "experiments/core/bc/lift/mg/low_dim_sparse/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": false,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": null,
+ "hdf5_validation_filter_key": null,
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 100,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "gaussian": {
+ "enabled": false,
+ "fixed_std": false,
+ "init_std": 0.1,
+ "min_std": 0.01,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "gmm": {
+ "enabled": false,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": false,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 1.0,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "rnn": {
+ "enabled": false,
+ "horizon": 10,
+ "hidden_dim": 400,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/low_dim_sparse/bc_rnn.json b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/low_dim_sparse/bc_rnn.json
new file mode 100644
index 0000000000000000000000000000000000000000..7b90a4e60cae4871e65fa1395509a2098d5a9f44
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/low_dim_sparse/bc_rnn.json
@@ -0,0 +1,212 @@
+{
+ "algo_name": "bc",
+ "experiment": {
+ "name": "core_bc_rnn_lift_mg_low_dim_sparse",
+ "validate": false,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/lift/mg/low_dim_sparse_v141.hdf5",
+ "output_dir": "experiments/core/bc_rnn/lift/mg/low_dim_sparse/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": false,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": null,
+ "hdf5_validation_filter_key": null,
+ "seq_length": 10,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 100,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [],
+ "gaussian": {
+ "enabled": false,
+ "fixed_std": false,
+ "init_std": 0.1,
+ "min_std": 0.01,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "gmm": {
+ "enabled": false,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": false,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 1.0,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "rnn": {
+ "enabled": true,
+ "horizon": 10,
+ "hidden_dim": 400,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/low_dim_sparse/bcq.json b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/low_dim_sparse/bcq.json
new file mode 100644
index 0000000000000000000000000000000000000000..f7f73393bd9bf929115b6dbdfa594e73fca9e2be
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/low_dim_sparse/bcq.json
@@ -0,0 +1,235 @@
+{
+ "algo_name": "bcq",
+ "experiment": {
+ "name": "core_bcq_lift_mg_low_dim_sparse",
+ "validate": false,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/lift/mg/low_dim_sparse_v141.hdf5",
+ "output_dir": "experiments/core/bcq/lift/mg/low_dim_sparse/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": null,
+ "hdf5_validation_filter_key": null,
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 100,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "critic": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "action_sampler": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "actor": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ }
+ },
+ "discount": 0.99,
+ "n_step": 1,
+ "target_tau": 0.005,
+ "infinite_horizon": false,
+ "critic": {
+ "use_huber": false,
+ "max_gradient_norm": null,
+ "value_bounds": null,
+ "num_action_samples": 10,
+ "num_action_samples_rollout": 100,
+ "ensemble": {
+ "n": 2,
+ "weight": 0.75
+ },
+ "distributional": {
+ "enabled": false,
+ "num_atoms": 51
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "action_sampler": {
+ "actor_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "gmm": {
+ "enabled": false,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": true,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 0.5,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "freeze_encoder_epoch": -1
+ },
+ "actor": {
+ "enabled": true,
+ "perturbation_scale": 0.05,
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/low_dim_sparse/cql.json b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/low_dim_sparse/cql.json
new file mode 100644
index 0000000000000000000000000000000000000000..e5b60e061a15268807a9f4a0cd480268cc50fea8
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/low_dim_sparse/cql.json
@@ -0,0 +1,182 @@
+{
+ "algo_name": "cql",
+ "experiment": {
+ "name": "core_cql_lift_mg_low_dim_sparse",
+ "validate": false,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/lift/mg/low_dim_sparse_v141.hdf5",
+ "output_dir": "experiments/core/cql/lift/mg/low_dim_sparse/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": null,
+ "hdf5_validation_filter_key": null,
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 1024,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "critic": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.0,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ },
+ "actor": {
+ "learning_rate": {
+ "initial": 0.0003,
+ "decay_factor": 0.0,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "discount": 0.99,
+ "n_step": 1,
+ "target_tau": 0.005,
+ "actor": {
+ "bc_start_steps": 0,
+ "target_entropy": "default",
+ "max_gradient_norm": null,
+ "net": {
+ "type": "gaussian",
+ "common": {
+ "std_activation": "exp",
+ "use_tanh": true,
+ "low_noise_eval": true
+ },
+ "gaussian": {
+ "init_last_fc_weight": 0.001,
+ "init_std": 0.3,
+ "fixed_std": false
+ }
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "critic": {
+ "use_huber": false,
+ "max_gradient_norm": null,
+ "value_bounds": null,
+ "num_action_samples": 1,
+ "cql_weight": 1.0,
+ "deterministic_backup": true,
+ "min_q_weight": 1.0,
+ "target_q_gap": 5.0,
+ "num_random_actions": 10,
+ "ensemble": {
+ "n": 2
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/low_dim_sparse/hbc.json b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/low_dim_sparse/hbc.json
new file mode 100644
index 0000000000000000000000000000000000000000..8326003568f871973be8161225e1f7a0af59db92
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/low_dim_sparse/hbc.json
@@ -0,0 +1,293 @@
+{
+ "algo_name": "hbc",
+ "experiment": {
+ "name": "core_hbc_lift_mg_low_dim_sparse",
+ "validate": false,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/lift/mg/low_dim_sparse_v141.hdf5",
+ "output_dir": "experiments/core/hbc/lift/mg/low_dim_sparse/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": null,
+ "hdf5_validation_filter_key": null,
+ "seq_length": 10,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 100,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "mode": "separate",
+ "actor_use_random_subgoals": false,
+ "subgoal_update_interval": 10,
+ "latent_subgoal": {
+ "enabled": false,
+ "prior_correction": {
+ "enabled": false,
+ "num_samples": 100
+ }
+ },
+ "planner": {
+ "optim_params": {
+ "goal_network": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "subgoal_horizon": 10,
+ "ae": {
+ "planner_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "vae": {
+ "enabled": true,
+ "latent_dim": 16,
+ "latent_clip": null,
+ "kl_weight": 0.0005,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": true,
+ "is_conditioned": true,
+ "use_gmm": true,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": true,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "decoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "prior_layer_dims": [
+ 1024,
+ 1024
+ ]
+ }
+ },
+ "actor": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "rnn": {
+ "enabled": true,
+ "horizon": 10,
+ "hidden_dim": 100,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ }
+ },
+ "observation": {
+ "planner": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "subgoal": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "actor": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/low_dim_sparse/iris.json b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/low_dim_sparse/iris.json
new file mode 100644
index 0000000000000000000000000000000000000000..4a0245b8234df4f658ce3dd017aa98acd8e92b87
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mg/low_dim_sparse/iris.json
@@ -0,0 +1,462 @@
+{
+ "algo_name": "iris",
+ "experiment": {
+ "name": "core_iris_lift_mg_low_dim_sparse",
+ "validate": false,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/lift/mg/low_dim_sparse_v141.hdf5",
+ "output_dir": "experiments/core/iris/lift/mg/low_dim_sparse/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": null,
+ "hdf5_validation_filter_key": null,
+ "seq_length": 10,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 100,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "mode": "separate",
+ "actor_use_random_subgoals": false,
+ "subgoal_update_interval": 10,
+ "latent_subgoal": {
+ "enabled": false,
+ "prior_correction": {
+ "enabled": false,
+ "num_samples": 100
+ }
+ },
+ "value_planner": {
+ "planner": {
+ "optim_params": {
+ "goal_network": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "subgoal_horizon": 10,
+ "ae": {
+ "planner_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "vae": {
+ "enabled": true,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 0.0005,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": true,
+ "is_conditioned": true,
+ "use_gmm": true,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": true,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "decoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "prior_layer_dims": [
+ 1024,
+ 1024
+ ]
+ }
+ },
+ "value": {
+ "optim_params": {
+ "critic": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "action_sampler": {
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "actor": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ }
+ },
+ "discount": 0.99,
+ "n_step": 1,
+ "target_tau": 0.005,
+ "infinite_horizon": false,
+ "critic": {
+ "use_huber": false,
+ "max_gradient_norm": null,
+ "value_bounds": null,
+ "num_action_samples": 10,
+ "num_action_samples_rollout": 100,
+ "ensemble": {
+ "n": 2,
+ "weight": 0.75
+ },
+ "distributional": {
+ "enabled": false,
+ "num_atoms": 51
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "action_sampler": {
+ "actor_layer_dims": [
+ 300,
+ 400
+ ],
+ "gmm": {
+ "enabled": false,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": true,
+ "latent_dim": 16,
+ "latent_clip": null,
+ "kl_weight": 0.5,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "freeze_encoder_epoch": -1
+ },
+ "actor": {
+ "enabled": true,
+ "perturbation_scale": 0.05,
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ }
+ },
+ "num_samples": 100
+ },
+ "actor": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [],
+ "rnn": {
+ "enabled": true,
+ "horizon": 10,
+ "hidden_dim": 400,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ }
+ },
+ "observation": {
+ "value_planner": {
+ "planner": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "subgoal": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "value": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ }
+ },
+ "actor": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mh/image/bc.json b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mh/image/bc.json
new file mode 100644
index 0000000000000000000000000000000000000000..61f282f8871c2cba5e487bd2ab6334b5bcc47706
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mh/image/bc.json
@@ -0,0 +1,236 @@
+{
+ "algo_name": "bc",
+ "experiment": {
+ "name": "core_bc_lift_mh_image",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 20,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 500,
+ "validation_epoch_every_n_steps": 50,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 500,
+ "rate": 20,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/lift/mh/image_v141.hdf5",
+ "output_dir": "experiments/core/bc/lift/mh/image/trained_models",
+ "num_data_workers": 2,
+ "hdf5_cache_mode": "low_dim",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": false,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 16,
+ "num_epochs": 600,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "gaussian": {
+ "enabled": false,
+ "fixed_std": false,
+ "init_std": 0.1,
+ "min_std": 0.01,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "gmm": {
+ "enabled": true,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": false,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 1.0,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "rnn": {
+ "enabled": false,
+ "horizon": 10,
+ "hidden_dim": 400,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos"
+ ],
+ "rgb": [
+ "agentview_image",
+ "robot0_eye_in_hand_image"
+ ],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {
+ "feature_dimension": 64,
+ "backbone_class": "ResNet18Conv",
+ "backbone_kwargs": {
+ "pretrained": false,
+ "input_coord_conv": false
+ },
+ "pool_class": "SpatialSoftmax",
+ "pool_kwargs": {
+ "num_kp": 32,
+ "learnable_temperature": false,
+ "temperature": 1.0,
+ "noise_std": 0.0
+ }
+ },
+ "obs_randomizer_class": "CropRandomizer",
+ "obs_randomizer_kwargs": {
+ "crop_height": 76,
+ "crop_width": 76,
+ "num_crops": 1,
+ "pos_enc": false
+ }
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mh/image/bc_rnn.json b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mh/image/bc_rnn.json
new file mode 100644
index 0000000000000000000000000000000000000000..a2433bb084514829e941e6131ca7d4b4bef7b955
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mh/image/bc_rnn.json
@@ -0,0 +1,233 @@
+{
+ "algo_name": "bc",
+ "experiment": {
+ "name": "core_bc_rnn_lift_mh_image",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 20,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 500,
+ "validation_epoch_every_n_steps": 50,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 500,
+ "rate": 20,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/lift/mh/image_v141.hdf5",
+ "output_dir": "experiments/core/bc_rnn/lift/mh/image/trained_models",
+ "num_data_workers": 2,
+ "hdf5_cache_mode": "low_dim",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": false,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 10,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 16,
+ "num_epochs": 600,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [],
+ "gaussian": {
+ "enabled": false,
+ "fixed_std": false,
+ "init_std": 0.1,
+ "min_std": 0.01,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "gmm": {
+ "enabled": true,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": false,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 1.0,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "rnn": {
+ "enabled": true,
+ "horizon": 10,
+ "hidden_dim": 1000,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos"
+ ],
+ "rgb": [
+ "agentview_image",
+ "robot0_eye_in_hand_image"
+ ],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {
+ "feature_dimension": 64,
+ "backbone_class": "ResNet18Conv",
+ "backbone_kwargs": {
+ "pretrained": false,
+ "input_coord_conv": false
+ },
+ "pool_class": "SpatialSoftmax",
+ "pool_kwargs": {
+ "num_kp": 32,
+ "learnable_temperature": false,
+ "temperature": 1.0,
+ "noise_std": 0.0
+ }
+ },
+ "obs_randomizer_class": "CropRandomizer",
+ "obs_randomizer_kwargs": {
+ "crop_height": 76,
+ "crop_width": 76,
+ "num_crops": 1,
+ "pos_enc": false
+ }
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mh/image/bcq.json b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mh/image/bcq.json
new file mode 100644
index 0000000000000000000000000000000000000000..a53558c48f2108b92e8fb0dd835baa6689f274a3
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mh/image/bcq.json
@@ -0,0 +1,256 @@
+{
+ "algo_name": "bcq",
+ "experiment": {
+ "name": "core_bcq_lift_mh_image",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 20,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 500,
+ "validation_epoch_every_n_steps": 50,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 500,
+ "rate": 20,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/lift/mh/image_v141.hdf5",
+ "output_dir": "experiments/core/bcq/lift/mh/image/trained_models",
+ "num_data_workers": 2,
+ "hdf5_cache_mode": "low_dim",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 16,
+ "num_epochs": 600,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "critic": {
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "action_sampler": {
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "actor": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ }
+ },
+ "discount": 0.99,
+ "n_step": 1,
+ "target_tau": 0.0005,
+ "infinite_horizon": false,
+ "critic": {
+ "use_huber": false,
+ "max_gradient_norm": null,
+ "value_bounds": null,
+ "num_action_samples": 10,
+ "num_action_samples_rollout": 100,
+ "ensemble": {
+ "n": 2,
+ "weight": 0.75
+ },
+ "distributional": {
+ "enabled": false,
+ "num_atoms": 51
+ },
+ "layer_dims": [
+ 1024,
+ 1024
+ ]
+ },
+ "action_sampler": {
+ "actor_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "gmm": {
+ "enabled": false,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": true,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 0.05,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "decoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "freeze_encoder_epoch": -1
+ },
+ "actor": {
+ "enabled": false,
+ "perturbation_scale": 0.05,
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos"
+ ],
+ "rgb": [
+ "agentview_image",
+ "robot0_eye_in_hand_image"
+ ],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {
+ "feature_dimension": 64,
+ "backbone_class": "ResNet18Conv",
+ "backbone_kwargs": {
+ "pretrained": false,
+ "input_coord_conv": false
+ },
+ "pool_class": "SpatialSoftmax",
+ "pool_kwargs": {
+ "num_kp": 32,
+ "learnable_temperature": false,
+ "temperature": 1.0,
+ "noise_std": 0.0
+ }
+ },
+ "obs_randomizer_class": "CropRandomizer",
+ "obs_randomizer_kwargs": {
+ "crop_height": 76,
+ "crop_width": 76,
+ "num_crops": 1,
+ "pos_enc": false
+ }
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mh/image/cql.json b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mh/image/cql.json
new file mode 100644
index 0000000000000000000000000000000000000000..e198678928f7fa882daf32ad9c46bc29cb4eee0f
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mh/image/cql.json
@@ -0,0 +1,203 @@
+{
+ "algo_name": "cql",
+ "experiment": {
+ "name": "core_cql_lift_mh_image",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 20,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 500,
+ "validation_epoch_every_n_steps": 50,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 500,
+ "rate": 20,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/lift/mh/image_v141.hdf5",
+ "output_dir": "experiments/core/cql/lift/mh/image/trained_models",
+ "num_data_workers": 2,
+ "hdf5_cache_mode": "low_dim",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 8,
+ "num_epochs": 600,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "critic": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.0,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ },
+ "actor": {
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.0,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "discount": 0.99,
+ "n_step": 1,
+ "target_tau": 0.005,
+ "actor": {
+ "bc_start_steps": 0,
+ "target_entropy": "default",
+ "max_gradient_norm": null,
+ "net": {
+ "type": "gaussian",
+ "common": {
+ "std_activation": "exp",
+ "use_tanh": true,
+ "low_noise_eval": true
+ },
+ "gaussian": {
+ "init_last_fc_weight": 0.001,
+ "init_std": 0.3,
+ "fixed_std": false
+ }
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "critic": {
+ "use_huber": false,
+ "max_gradient_norm": null,
+ "value_bounds": null,
+ "num_action_samples": 1,
+ "cql_weight": 1.0,
+ "deterministic_backup": true,
+ "min_q_weight": 1.0,
+ "target_q_gap": 5.0,
+ "num_random_actions": 10,
+ "ensemble": {
+ "n": 2
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos"
+ ],
+ "rgb": [
+ "agentview_image",
+ "robot0_eye_in_hand_image"
+ ],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {
+ "feature_dimension": 64,
+ "backbone_class": "ResNet18Conv",
+ "backbone_kwargs": {
+ "pretrained": false,
+ "input_coord_conv": false
+ },
+ "pool_class": "SpatialSoftmax",
+ "pool_kwargs": {
+ "num_kp": 32,
+ "learnable_temperature": false,
+ "temperature": 1.0,
+ "noise_std": 0.0
+ }
+ },
+ "obs_randomizer_class": "CropRandomizer",
+ "obs_randomizer_kwargs": {
+ "crop_height": 76,
+ "crop_width": 76,
+ "num_crops": 1,
+ "pos_enc": false
+ }
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mh/low_dim/bc.json b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mh/low_dim/bc.json
new file mode 100644
index 0000000000000000000000000000000000000000..a1ac0eb4028214921704d64370045458eb938d87
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mh/low_dim/bc.json
@@ -0,0 +1,215 @@
+{
+ "algo_name": "bc",
+ "experiment": {
+ "name": "core_bc_lift_mh_low_dim",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 500,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/lift/mh/low_dim_v141.hdf5",
+ "output_dir": "experiments/core/bc/lift/mh/low_dim/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": false,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 100,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "gaussian": {
+ "enabled": false,
+ "fixed_std": false,
+ "init_std": 0.1,
+ "min_std": 0.01,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "gmm": {
+ "enabled": true,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": false,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 1.0,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "rnn": {
+ "enabled": false,
+ "horizon": 10,
+ "hidden_dim": 400,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mh/low_dim/bc_rnn.json b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mh/low_dim/bc_rnn.json
new file mode 100644
index 0000000000000000000000000000000000000000..3481ba216419c988f98818573eba998baceaee98
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mh/low_dim/bc_rnn.json
@@ -0,0 +1,212 @@
+{
+ "algo_name": "bc",
+ "experiment": {
+ "name": "core_bc_rnn_lift_mh_low_dim",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 500,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/lift/mh/low_dim_v141.hdf5",
+ "output_dir": "experiments/core/bc_rnn/lift/mh/low_dim/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": false,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 10,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 100,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [],
+ "gaussian": {
+ "enabled": false,
+ "fixed_std": false,
+ "init_std": 0.1,
+ "min_std": 0.01,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "gmm": {
+ "enabled": true,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": false,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 1.0,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "rnn": {
+ "enabled": true,
+ "horizon": 10,
+ "hidden_dim": 400,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mh/low_dim/bcq.json b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mh/low_dim/bcq.json
new file mode 100644
index 0000000000000000000000000000000000000000..abc49d74365a705b1308e94c1dc7fb3dbb3c5875
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mh/low_dim/bcq.json
@@ -0,0 +1,235 @@
+{
+ "algo_name": "bcq",
+ "experiment": {
+ "name": "core_bcq_lift_mh_low_dim",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 500,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/lift/mh/low_dim_v141.hdf5",
+ "output_dir": "experiments/core/bcq/lift/mh/low_dim/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 100,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "critic": {
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "action_sampler": {
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "actor": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ }
+ },
+ "discount": 0.99,
+ "n_step": 1,
+ "target_tau": 0.0005,
+ "infinite_horizon": false,
+ "critic": {
+ "use_huber": false,
+ "max_gradient_norm": null,
+ "value_bounds": null,
+ "num_action_samples": 10,
+ "num_action_samples_rollout": 100,
+ "ensemble": {
+ "n": 2,
+ "weight": 0.75
+ },
+ "distributional": {
+ "enabled": false,
+ "num_atoms": 51
+ },
+ "layer_dims": [
+ 1024,
+ 1024
+ ]
+ },
+ "action_sampler": {
+ "actor_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "gmm": {
+ "enabled": false,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": true,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 0.5,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": true,
+ "is_conditioned": true,
+ "use_gmm": true,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": true,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "decoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "prior_layer_dims": [
+ 1024,
+ 1024
+ ]
+ },
+ "freeze_encoder_epoch": -1
+ },
+ "actor": {
+ "enabled": false,
+ "perturbation_scale": 0.05,
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mh/low_dim/cql.json b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mh/low_dim/cql.json
new file mode 100644
index 0000000000000000000000000000000000000000..55b1b5cbefe1e105f9c16834249fb4a7b3230252
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mh/low_dim/cql.json
@@ -0,0 +1,182 @@
+{
+ "algo_name": "cql",
+ "experiment": {
+ "name": "core_cql_lift_mh_low_dim",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 500,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/lift/mh/low_dim_v141.hdf5",
+ "output_dir": "experiments/core/cql/lift/mh/low_dim/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 1024,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "critic": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.0,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ },
+ "actor": {
+ "learning_rate": {
+ "initial": 0.0003,
+ "decay_factor": 0.0,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "discount": 0.99,
+ "n_step": 1,
+ "target_tau": 0.005,
+ "actor": {
+ "bc_start_steps": 0,
+ "target_entropy": "default",
+ "max_gradient_norm": null,
+ "net": {
+ "type": "gaussian",
+ "common": {
+ "std_activation": "exp",
+ "use_tanh": true,
+ "low_noise_eval": true
+ },
+ "gaussian": {
+ "init_last_fc_weight": 0.001,
+ "init_std": 0.3,
+ "fixed_std": false
+ }
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "critic": {
+ "use_huber": false,
+ "max_gradient_norm": null,
+ "value_bounds": null,
+ "num_action_samples": 1,
+ "cql_weight": 1.0,
+ "deterministic_backup": true,
+ "min_q_weight": 1.0,
+ "target_q_gap": 5.0,
+ "num_random_actions": 10,
+ "ensemble": {
+ "n": 2
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mh/low_dim/hbc.json b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mh/low_dim/hbc.json
new file mode 100644
index 0000000000000000000000000000000000000000..1538d4bb55ae90ea628ebb4a55689de62b170463
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mh/low_dim/hbc.json
@@ -0,0 +1,290 @@
+{
+ "algo_name": "hbc",
+ "experiment": {
+ "name": "core_hbc_lift_mh_low_dim",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 500,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/lift/mh/low_dim_v141.hdf5",
+ "output_dir": "experiments/core/hbc/lift/mh/low_dim/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 10,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 100,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "mode": "separate",
+ "actor_use_random_subgoals": false,
+ "subgoal_update_interval": 10,
+ "latent_subgoal": {
+ "enabled": false,
+ "prior_correction": {
+ "enabled": false,
+ "num_samples": 100
+ }
+ },
+ "planner": {
+ "optim_params": {
+ "goal_network": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "subgoal_horizon": 10,
+ "ae": {
+ "planner_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "vae": {
+ "enabled": true,
+ "latent_dim": 16,
+ "latent_clip": null,
+ "kl_weight": 0.0005,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": true,
+ "is_conditioned": true,
+ "use_gmm": true,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": true,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "decoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "prior_layer_dims": [
+ 1024,
+ 1024
+ ]
+ }
+ },
+ "actor": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [],
+ "rnn": {
+ "enabled": true,
+ "horizon": 10,
+ "hidden_dim": 400,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ }
+ },
+ "observation": {
+ "planner": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "subgoal": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "actor": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mh/low_dim/iris.json b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mh/low_dim/iris.json
new file mode 100644
index 0000000000000000000000000000000000000000..4afbdae425c7d12f5f237dc63cc2a1e41b774d0b
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/mh/low_dim/iris.json
@@ -0,0 +1,462 @@
+{
+ "algo_name": "iris",
+ "experiment": {
+ "name": "core_iris_lift_mh_low_dim",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 500,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/lift/mh/low_dim_v141.hdf5",
+ "output_dir": "experiments/core/iris/lift/mh/low_dim/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 10,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 100,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "mode": "separate",
+ "actor_use_random_subgoals": false,
+ "subgoal_update_interval": 10,
+ "latent_subgoal": {
+ "enabled": false,
+ "prior_correction": {
+ "enabled": false,
+ "num_samples": 100
+ }
+ },
+ "value_planner": {
+ "planner": {
+ "optim_params": {
+ "goal_network": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "subgoal_horizon": 10,
+ "ae": {
+ "planner_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "vae": {
+ "enabled": true,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 0.0005,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": true,
+ "is_conditioned": true,
+ "use_gmm": true,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": true,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "decoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "prior_layer_dims": [
+ 1024,
+ 1024
+ ]
+ }
+ },
+ "value": {
+ "optim_params": {
+ "critic": {
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "action_sampler": {
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "actor": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ }
+ },
+ "discount": 0.99,
+ "n_step": 1,
+ "target_tau": 0.0005,
+ "infinite_horizon": false,
+ "critic": {
+ "use_huber": false,
+ "max_gradient_norm": null,
+ "value_bounds": null,
+ "num_action_samples": 10,
+ "num_action_samples_rollout": 100,
+ "ensemble": {
+ "n": 2,
+ "weight": 0.75
+ },
+ "distributional": {
+ "enabled": false,
+ "num_atoms": 51
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "action_sampler": {
+ "actor_layer_dims": [
+ 300,
+ 400
+ ],
+ "gmm": {
+ "enabled": false,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": true,
+ "latent_dim": 16,
+ "latent_clip": null,
+ "kl_weight": 0.05,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "freeze_encoder_epoch": -1
+ },
+ "actor": {
+ "enabled": false,
+ "perturbation_scale": 0.05,
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ }
+ },
+ "num_samples": 100
+ },
+ "actor": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [],
+ "rnn": {
+ "enabled": true,
+ "horizon": 10,
+ "hidden_dim": 400,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ }
+ },
+ "observation": {
+ "value_planner": {
+ "planner": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "subgoal": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "value": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ }
+ },
+ "actor": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/lift/ph/image/bc.json b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/ph/image/bc.json
new file mode 100644
index 0000000000000000000000000000000000000000..69bbd4f38dfb56f8734fb8177f803be560a940db
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/ph/image/bc.json
@@ -0,0 +1,236 @@
+{
+ "algo_name": "bc",
+ "experiment": {
+ "name": "core_bc_lift_ph_image",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 20,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 500,
+ "validation_epoch_every_n_steps": 50,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 20,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/lift/ph/image_v141.hdf5",
+ "output_dir": "experiments/core/bc/lift/ph/image/trained_models",
+ "num_data_workers": 2,
+ "hdf5_cache_mode": "low_dim",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": false,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 16,
+ "num_epochs": 600,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "gaussian": {
+ "enabled": false,
+ "fixed_std": false,
+ "init_std": 0.1,
+ "min_std": 0.01,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "gmm": {
+ "enabled": true,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": false,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 1.0,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "rnn": {
+ "enabled": false,
+ "horizon": 10,
+ "hidden_dim": 400,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos"
+ ],
+ "rgb": [
+ "agentview_image",
+ "robot0_eye_in_hand_image"
+ ],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {
+ "feature_dimension": 64,
+ "backbone_class": "ResNet18Conv",
+ "backbone_kwargs": {
+ "pretrained": false,
+ "input_coord_conv": false
+ },
+ "pool_class": "SpatialSoftmax",
+ "pool_kwargs": {
+ "num_kp": 32,
+ "learnable_temperature": false,
+ "temperature": 1.0,
+ "noise_std": 0.0
+ }
+ },
+ "obs_randomizer_class": "CropRandomizer",
+ "obs_randomizer_kwargs": {
+ "crop_height": 76,
+ "crop_width": 76,
+ "num_crops": 1,
+ "pos_enc": false
+ }
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/lift/ph/image/bc_rnn.json b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/ph/image/bc_rnn.json
new file mode 100644
index 0000000000000000000000000000000000000000..fc78eb6f6f525dad0ee15e853a8dd591b6c30400
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/ph/image/bc_rnn.json
@@ -0,0 +1,233 @@
+{
+ "algo_name": "bc",
+ "experiment": {
+ "name": "core_bc_rnn_lift_ph_image",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 20,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 500,
+ "validation_epoch_every_n_steps": 50,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 20,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/lift/ph/image_v141.hdf5",
+ "output_dir": "experiments/core/bc_rnn/lift/ph/image/trained_models",
+ "num_data_workers": 2,
+ "hdf5_cache_mode": "low_dim",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": false,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 10,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 16,
+ "num_epochs": 600,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [],
+ "gaussian": {
+ "enabled": false,
+ "fixed_std": false,
+ "init_std": 0.1,
+ "min_std": 0.01,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "gmm": {
+ "enabled": true,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": false,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 1.0,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "rnn": {
+ "enabled": true,
+ "horizon": 10,
+ "hidden_dim": 1000,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos"
+ ],
+ "rgb": [
+ "agentview_image",
+ "robot0_eye_in_hand_image"
+ ],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {
+ "feature_dimension": 64,
+ "backbone_class": "ResNet18Conv",
+ "backbone_kwargs": {
+ "pretrained": false,
+ "input_coord_conv": false
+ },
+ "pool_class": "SpatialSoftmax",
+ "pool_kwargs": {
+ "num_kp": 32,
+ "learnable_temperature": false,
+ "temperature": 1.0,
+ "noise_std": 0.0
+ }
+ },
+ "obs_randomizer_class": "CropRandomizer",
+ "obs_randomizer_kwargs": {
+ "crop_height": 76,
+ "crop_width": 76,
+ "num_crops": 1,
+ "pos_enc": false
+ }
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/lift/ph/image/bcq.json b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/ph/image/bcq.json
new file mode 100644
index 0000000000000000000000000000000000000000..28931624a29c3239316c332bfe2d96da93afd962
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/ph/image/bcq.json
@@ -0,0 +1,256 @@
+{
+ "algo_name": "bcq",
+ "experiment": {
+ "name": "core_bcq_lift_ph_image",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 20,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 500,
+ "validation_epoch_every_n_steps": 50,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 20,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/lift/ph/image_v141.hdf5",
+ "output_dir": "experiments/core/bcq/lift/ph/image/trained_models",
+ "num_data_workers": 2,
+ "hdf5_cache_mode": "low_dim",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 16,
+ "num_epochs": 600,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "critic": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "action_sampler": {
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "actor": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ }
+ },
+ "discount": 0.99,
+ "n_step": 1,
+ "target_tau": 0.0005,
+ "infinite_horizon": false,
+ "critic": {
+ "use_huber": false,
+ "max_gradient_norm": null,
+ "value_bounds": null,
+ "num_action_samples": 10,
+ "num_action_samples_rollout": 100,
+ "ensemble": {
+ "n": 2,
+ "weight": 0.75
+ },
+ "distributional": {
+ "enabled": false,
+ "num_atoms": 51
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "action_sampler": {
+ "actor_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "gmm": {
+ "enabled": false,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": true,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 0.05,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "decoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "freeze_encoder_epoch": -1
+ },
+ "actor": {
+ "enabled": false,
+ "perturbation_scale": 0.05,
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos"
+ ],
+ "rgb": [
+ "agentview_image",
+ "robot0_eye_in_hand_image"
+ ],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {
+ "feature_dimension": 64,
+ "backbone_class": "ResNet18Conv",
+ "backbone_kwargs": {
+ "pretrained": false,
+ "input_coord_conv": false
+ },
+ "pool_class": "SpatialSoftmax",
+ "pool_kwargs": {
+ "num_kp": 32,
+ "learnable_temperature": false,
+ "temperature": 1.0,
+ "noise_std": 0.0
+ }
+ },
+ "obs_randomizer_class": "CropRandomizer",
+ "obs_randomizer_kwargs": {
+ "crop_height": 76,
+ "crop_width": 76,
+ "num_crops": 1,
+ "pos_enc": false
+ }
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/lift/ph/image/cql.json b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/ph/image/cql.json
new file mode 100644
index 0000000000000000000000000000000000000000..def138f6c8dd8d37f6052b1b2f32e31f8b95e3d1
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/ph/image/cql.json
@@ -0,0 +1,203 @@
+{
+ "algo_name": "cql",
+ "experiment": {
+ "name": "core_cql_lift_ph_image",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 20,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 500,
+ "validation_epoch_every_n_steps": 50,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 20,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/lift/ph/image_v141.hdf5",
+ "output_dir": "experiments/core/cql/lift/ph/image/trained_models",
+ "num_data_workers": 2,
+ "hdf5_cache_mode": "low_dim",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 8,
+ "num_epochs": 600,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "critic": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.0,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ },
+ "actor": {
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.0,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "discount": 0.99,
+ "n_step": 1,
+ "target_tau": 0.005,
+ "actor": {
+ "bc_start_steps": 0,
+ "target_entropy": "default",
+ "max_gradient_norm": null,
+ "net": {
+ "type": "gaussian",
+ "common": {
+ "std_activation": "exp",
+ "use_tanh": true,
+ "low_noise_eval": true
+ },
+ "gaussian": {
+ "init_last_fc_weight": 0.001,
+ "init_std": 0.3,
+ "fixed_std": false
+ }
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "critic": {
+ "use_huber": false,
+ "max_gradient_norm": null,
+ "value_bounds": null,
+ "num_action_samples": 1,
+ "cql_weight": 1.0,
+ "deterministic_backup": true,
+ "min_q_weight": 1.0,
+ "target_q_gap": 5.0,
+ "num_random_actions": 10,
+ "ensemble": {
+ "n": 2
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos"
+ ],
+ "rgb": [
+ "agentview_image",
+ "robot0_eye_in_hand_image"
+ ],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {
+ "feature_dimension": 64,
+ "backbone_class": "ResNet18Conv",
+ "backbone_kwargs": {
+ "pretrained": false,
+ "input_coord_conv": false
+ },
+ "pool_class": "SpatialSoftmax",
+ "pool_kwargs": {
+ "num_kp": 32,
+ "learnable_temperature": false,
+ "temperature": 1.0,
+ "noise_std": 0.0
+ }
+ },
+ "obs_randomizer_class": "CropRandomizer",
+ "obs_randomizer_kwargs": {
+ "crop_height": 76,
+ "crop_width": 76,
+ "num_crops": 1,
+ "pos_enc": false
+ }
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/lift/ph/low_dim/bc.json b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/ph/low_dim/bc.json
new file mode 100644
index 0000000000000000000000000000000000000000..d5d31362acddb280087de67fdeea35acf7fe208b
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/ph/low_dim/bc.json
@@ -0,0 +1,215 @@
+{
+ "algo_name": "bc",
+ "experiment": {
+ "name": "core_bc_lift_ph_low_dim",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/lift/ph/low_dim_v141.hdf5",
+ "output_dir": "experiments/core/bc/lift/ph/low_dim/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": false,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 100,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "gaussian": {
+ "enabled": false,
+ "fixed_std": false,
+ "init_std": 0.1,
+ "min_std": 0.01,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "gmm": {
+ "enabled": true,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": false,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 1.0,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "rnn": {
+ "enabled": false,
+ "horizon": 10,
+ "hidden_dim": 400,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/lift/ph/low_dim/bc_rnn.json b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/ph/low_dim/bc_rnn.json
new file mode 100644
index 0000000000000000000000000000000000000000..3a686acb60eb4f7f0cd5d47eaf09eb9616f7b15f
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/ph/low_dim/bc_rnn.json
@@ -0,0 +1,212 @@
+{
+ "algo_name": "bc",
+ "experiment": {
+ "name": "core_bc_rnn_lift_ph_low_dim",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/lift/ph/low_dim_v141.hdf5",
+ "output_dir": "experiments/core/bc_rnn/lift/ph/low_dim/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": false,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 10,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 100,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [],
+ "gaussian": {
+ "enabled": false,
+ "fixed_std": false,
+ "init_std": 0.1,
+ "min_std": 0.01,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "gmm": {
+ "enabled": true,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": false,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 1.0,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "rnn": {
+ "enabled": true,
+ "horizon": 10,
+ "hidden_dim": 400,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/lift/ph/low_dim/bcq.json b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/ph/low_dim/bcq.json
new file mode 100644
index 0000000000000000000000000000000000000000..d6a579a8fc61a0d64e86b3a1a9f63469e6ce0fc5
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/ph/low_dim/bcq.json
@@ -0,0 +1,235 @@
+{
+ "algo_name": "bcq",
+ "experiment": {
+ "name": "core_bcq_lift_ph_low_dim",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/lift/ph/low_dim_v141.hdf5",
+ "output_dir": "experiments/core/bcq/lift/ph/low_dim/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 100,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "critic": {
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "action_sampler": {
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "actor": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ }
+ },
+ "discount": 0.99,
+ "n_step": 1,
+ "target_tau": 0.0005,
+ "infinite_horizon": false,
+ "critic": {
+ "use_huber": false,
+ "max_gradient_norm": null,
+ "value_bounds": null,
+ "num_action_samples": 10,
+ "num_action_samples_rollout": 100,
+ "ensemble": {
+ "n": 2,
+ "weight": 0.75
+ },
+ "distributional": {
+ "enabled": false,
+ "num_atoms": 51
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "action_sampler": {
+ "actor_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "gmm": {
+ "enabled": false,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": true,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 0.05,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "freeze_encoder_epoch": -1
+ },
+ "actor": {
+ "enabled": false,
+ "perturbation_scale": 0.05,
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/lift/ph/low_dim/cql.json b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/ph/low_dim/cql.json
new file mode 100644
index 0000000000000000000000000000000000000000..6956a1384c6f0a4ed96c744693fb51ba6b7347d8
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/ph/low_dim/cql.json
@@ -0,0 +1,182 @@
+{
+ "algo_name": "cql",
+ "experiment": {
+ "name": "core_cql_lift_ph_low_dim",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/lift/ph/low_dim_v141.hdf5",
+ "output_dir": "experiments/core/cql/lift/ph/low_dim/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 1024,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "critic": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.0,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ },
+ "actor": {
+ "learning_rate": {
+ "initial": 0.0003,
+ "decay_factor": 0.0,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "discount": 0.99,
+ "n_step": 1,
+ "target_tau": 0.005,
+ "actor": {
+ "bc_start_steps": 0,
+ "target_entropy": "default",
+ "max_gradient_norm": null,
+ "net": {
+ "type": "gaussian",
+ "common": {
+ "std_activation": "exp",
+ "use_tanh": true,
+ "low_noise_eval": true
+ },
+ "gaussian": {
+ "init_last_fc_weight": 0.001,
+ "init_std": 0.3,
+ "fixed_std": false
+ }
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "critic": {
+ "use_huber": false,
+ "max_gradient_norm": null,
+ "value_bounds": null,
+ "num_action_samples": 1,
+ "cql_weight": 1.0,
+ "deterministic_backup": true,
+ "min_q_weight": 1.0,
+ "target_q_gap": 5.0,
+ "num_random_actions": 10,
+ "ensemble": {
+ "n": 2
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/lift/ph/low_dim/hbc.json b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/ph/low_dim/hbc.json
new file mode 100644
index 0000000000000000000000000000000000000000..09000617acf636c175e318c56d808c633cb85104
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/ph/low_dim/hbc.json
@@ -0,0 +1,290 @@
+{
+ "algo_name": "hbc",
+ "experiment": {
+ "name": "core_hbc_lift_ph_low_dim",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/lift/ph/low_dim_v141.hdf5",
+ "output_dir": "experiments/core/hbc/lift/ph/low_dim/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 10,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 100,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "mode": "separate",
+ "actor_use_random_subgoals": false,
+ "subgoal_update_interval": 10,
+ "latent_subgoal": {
+ "enabled": false,
+ "prior_correction": {
+ "enabled": false,
+ "num_samples": 100
+ }
+ },
+ "planner": {
+ "optim_params": {
+ "goal_network": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "subgoal_horizon": 10,
+ "ae": {
+ "planner_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "vae": {
+ "enabled": true,
+ "latent_dim": 16,
+ "latent_clip": null,
+ "kl_weight": 0.0005,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": true,
+ "is_conditioned": true,
+ "use_gmm": true,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": true,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "decoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "prior_layer_dims": [
+ 1024,
+ 1024
+ ]
+ }
+ },
+ "actor": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [],
+ "rnn": {
+ "enabled": true,
+ "horizon": 10,
+ "hidden_dim": 400,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ }
+ },
+ "observation": {
+ "planner": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "subgoal": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "actor": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/lift/ph/low_dim/iris.json b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/ph/low_dim/iris.json
new file mode 100644
index 0000000000000000000000000000000000000000..aa872b20846c651d7e4fe065c1b10bda232b1f65
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/lift/ph/low_dim/iris.json
@@ -0,0 +1,462 @@
+{
+ "algo_name": "iris",
+ "experiment": {
+ "name": "core_iris_lift_ph_low_dim",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/lift/ph/low_dim_v141.hdf5",
+ "output_dir": "experiments/core/iris/lift/ph/low_dim/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 10,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 100,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "mode": "separate",
+ "actor_use_random_subgoals": false,
+ "subgoal_update_interval": 10,
+ "latent_subgoal": {
+ "enabled": false,
+ "prior_correction": {
+ "enabled": false,
+ "num_samples": 100
+ }
+ },
+ "value_planner": {
+ "planner": {
+ "optim_params": {
+ "goal_network": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "subgoal_horizon": 10,
+ "ae": {
+ "planner_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "vae": {
+ "enabled": true,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 0.0005,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": true,
+ "is_conditioned": true,
+ "use_gmm": true,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": true,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "decoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "prior_layer_dims": [
+ 1024,
+ 1024
+ ]
+ }
+ },
+ "value": {
+ "optim_params": {
+ "critic": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "action_sampler": {
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "actor": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ }
+ },
+ "discount": 0.99,
+ "n_step": 1,
+ "target_tau": 0.0005,
+ "infinite_horizon": false,
+ "critic": {
+ "use_huber": false,
+ "max_gradient_norm": null,
+ "value_bounds": null,
+ "num_action_samples": 10,
+ "num_action_samples_rollout": 100,
+ "ensemble": {
+ "n": 2,
+ "weight": 0.75
+ },
+ "distributional": {
+ "enabled": false,
+ "num_atoms": 51
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "action_sampler": {
+ "actor_layer_dims": [
+ 300,
+ 400
+ ],
+ "gmm": {
+ "enabled": false,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": true,
+ "latent_dim": 16,
+ "latent_clip": null,
+ "kl_weight": 0.5,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "freeze_encoder_epoch": -1
+ },
+ "actor": {
+ "enabled": false,
+ "perturbation_scale": 0.05,
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ }
+ },
+ "num_samples": 100
+ },
+ "actor": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [],
+ "rnn": {
+ "enabled": true,
+ "horizon": 10,
+ "hidden_dim": 400,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ }
+ },
+ "observation": {
+ "value_planner": {
+ "planner": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "subgoal": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "value": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ }
+ },
+ "actor": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/lift_real/ph/raw/bc_rnn.json b/code_src/rise_robomimic/robomimic/exps/paper/core/lift_real/ph/raw/bc_rnn.json
new file mode 100644
index 0000000000000000000000000000000000000000..d1d7bd66f13d80f92f72707d2b806b8a98c98257
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/lift_real/ph/raw/bc_rnn.json
@@ -0,0 +1,232 @@
+{
+ "algo_name": "bc",
+ "experiment": {
+ "name": "core_bc_rnn_lift_real_ph_raw",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 20,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 500,
+ "validation_epoch_every_n_steps": 50,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": false,
+ "n": 50,
+ "horizon": 1000,
+ "rate": 20,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/lift_real/ph/demo.hdf5",
+ "output_dir": "experiments/core/bc_rnn/lift_real/ph/raw/trained_models",
+ "num_data_workers": 2,
+ "hdf5_cache_mode": "low_dim",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": false,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 10,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 16,
+ "num_epochs": 600,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [],
+ "gaussian": {
+ "enabled": false,
+ "fixed_std": false,
+ "init_std": 0.1,
+ "min_std": 0.01,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "gmm": {
+ "enabled": true,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": false,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 1.0,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "rnn": {
+ "enabled": true,
+ "horizon": 10,
+ "hidden_dim": 1000,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "ee_pose",
+ "gripper_position"
+ ],
+ "rgb": [
+ "image",
+ "image_wrist"
+ ],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {
+ "feature_dimension": 64,
+ "backbone_class": "ResNet18Conv",
+ "backbone_kwargs": {
+ "pretrained": false,
+ "input_coord_conv": false
+ },
+ "pool_class": "SpatialSoftmax",
+ "pool_kwargs": {
+ "num_kp": 32,
+ "learnable_temperature": false,
+ "temperature": 1.0,
+ "noise_std": 0.0
+ }
+ },
+ "obs_randomizer_class": "CropRandomizer",
+ "obs_randomizer_kwargs": {
+ "crop_height": 108,
+ "crop_width": 108,
+ "num_crops": 1,
+ "pos_enc": false
+ }
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/square/mh/image/bc.json b/code_src/rise_robomimic/robomimic/exps/paper/core/square/mh/image/bc.json
new file mode 100644
index 0000000000000000000000000000000000000000..8ac134ff4191c3cc3e602b28e59fd36cb1fac535
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/square/mh/image/bc.json
@@ -0,0 +1,236 @@
+{
+ "algo_name": "bc",
+ "experiment": {
+ "name": "core_bc_square_mh_image",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 20,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 500,
+ "validation_epoch_every_n_steps": 50,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 500,
+ "rate": 20,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/square/mh/image_v141.hdf5",
+ "output_dir": "experiments/core/bc/square/mh/image/trained_models",
+ "num_data_workers": 2,
+ "hdf5_cache_mode": "low_dim",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": false,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 16,
+ "num_epochs": 600,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "gaussian": {
+ "enabled": false,
+ "fixed_std": false,
+ "init_std": 0.1,
+ "min_std": 0.01,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "gmm": {
+ "enabled": true,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": false,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 1.0,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "rnn": {
+ "enabled": false,
+ "horizon": 10,
+ "hidden_dim": 400,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos"
+ ],
+ "rgb": [
+ "agentview_image",
+ "robot0_eye_in_hand_image"
+ ],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {
+ "feature_dimension": 64,
+ "backbone_class": "ResNet18Conv",
+ "backbone_kwargs": {
+ "pretrained": false,
+ "input_coord_conv": false
+ },
+ "pool_class": "SpatialSoftmax",
+ "pool_kwargs": {
+ "num_kp": 32,
+ "learnable_temperature": false,
+ "temperature": 1.0,
+ "noise_std": 0.0
+ }
+ },
+ "obs_randomizer_class": "CropRandomizer",
+ "obs_randomizer_kwargs": {
+ "crop_height": 76,
+ "crop_width": 76,
+ "num_crops": 1,
+ "pos_enc": false
+ }
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/square/mh/image/bc_rnn.json b/code_src/rise_robomimic/robomimic/exps/paper/core/square/mh/image/bc_rnn.json
new file mode 100644
index 0000000000000000000000000000000000000000..b5eeb7ddfb98190ee16e0e9fd4ba9bb9c2a219af
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/square/mh/image/bc_rnn.json
@@ -0,0 +1,233 @@
+{
+ "algo_name": "bc",
+ "experiment": {
+ "name": "core_bc_rnn_square_mh_image",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 20,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 500,
+ "validation_epoch_every_n_steps": 50,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 500,
+ "rate": 20,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/square/mh/image_v141.hdf5",
+ "output_dir": "experiments/core/bc_rnn/square/mh/image/trained_models",
+ "num_data_workers": 2,
+ "hdf5_cache_mode": "low_dim",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": false,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 10,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 16,
+ "num_epochs": 600,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [],
+ "gaussian": {
+ "enabled": false,
+ "fixed_std": false,
+ "init_std": 0.1,
+ "min_std": 0.01,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "gmm": {
+ "enabled": true,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": false,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 1.0,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "rnn": {
+ "enabled": true,
+ "horizon": 10,
+ "hidden_dim": 1000,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos"
+ ],
+ "rgb": [
+ "agentview_image",
+ "robot0_eye_in_hand_image"
+ ],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {
+ "feature_dimension": 64,
+ "backbone_class": "ResNet18Conv",
+ "backbone_kwargs": {
+ "pretrained": false,
+ "input_coord_conv": false
+ },
+ "pool_class": "SpatialSoftmax",
+ "pool_kwargs": {
+ "num_kp": 32,
+ "learnable_temperature": false,
+ "temperature": 1.0,
+ "noise_std": 0.0
+ }
+ },
+ "obs_randomizer_class": "CropRandomizer",
+ "obs_randomizer_kwargs": {
+ "crop_height": 76,
+ "crop_width": 76,
+ "num_crops": 1,
+ "pos_enc": false
+ }
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/square/mh/image/bcq.json b/code_src/rise_robomimic/robomimic/exps/paper/core/square/mh/image/bcq.json
new file mode 100644
index 0000000000000000000000000000000000000000..a669720db87e084189af4760f793788adf195330
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/square/mh/image/bcq.json
@@ -0,0 +1,256 @@
+{
+ "algo_name": "bcq",
+ "experiment": {
+ "name": "core_bcq_square_mh_image",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 20,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 500,
+ "validation_epoch_every_n_steps": 50,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 500,
+ "rate": 20,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/square/mh/image_v141.hdf5",
+ "output_dir": "experiments/core/bcq/square/mh/image/trained_models",
+ "num_data_workers": 2,
+ "hdf5_cache_mode": "low_dim",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 16,
+ "num_epochs": 600,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "critic": {
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "action_sampler": {
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "actor": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ }
+ },
+ "discount": 0.99,
+ "n_step": 1,
+ "target_tau": 0.0005,
+ "infinite_horizon": false,
+ "critic": {
+ "use_huber": false,
+ "max_gradient_norm": null,
+ "value_bounds": null,
+ "num_action_samples": 10,
+ "num_action_samples_rollout": 100,
+ "ensemble": {
+ "n": 2,
+ "weight": 0.75
+ },
+ "distributional": {
+ "enabled": false,
+ "num_atoms": 51
+ },
+ "layer_dims": [
+ 1024,
+ 1024
+ ]
+ },
+ "action_sampler": {
+ "actor_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "gmm": {
+ "enabled": false,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": true,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 0.05,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "decoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "freeze_encoder_epoch": -1
+ },
+ "actor": {
+ "enabled": false,
+ "perturbation_scale": 0.05,
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos"
+ ],
+ "rgb": [
+ "agentview_image",
+ "robot0_eye_in_hand_image"
+ ],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {
+ "feature_dimension": 64,
+ "backbone_class": "ResNet18Conv",
+ "backbone_kwargs": {
+ "pretrained": false,
+ "input_coord_conv": false
+ },
+ "pool_class": "SpatialSoftmax",
+ "pool_kwargs": {
+ "num_kp": 32,
+ "learnable_temperature": false,
+ "temperature": 1.0,
+ "noise_std": 0.0
+ }
+ },
+ "obs_randomizer_class": "CropRandomizer",
+ "obs_randomizer_kwargs": {
+ "crop_height": 76,
+ "crop_width": 76,
+ "num_crops": 1,
+ "pos_enc": false
+ }
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/square/mh/image/cql.json b/code_src/rise_robomimic/robomimic/exps/paper/core/square/mh/image/cql.json
new file mode 100644
index 0000000000000000000000000000000000000000..644e2461fb696282059d4354aa37204f5817f42a
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/square/mh/image/cql.json
@@ -0,0 +1,203 @@
+{
+ "algo_name": "cql",
+ "experiment": {
+ "name": "core_cql_square_mh_image",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 20,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 500,
+ "validation_epoch_every_n_steps": 50,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 500,
+ "rate": 20,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/square/mh/image_v141.hdf5",
+ "output_dir": "experiments/core/cql/square/mh/image/trained_models",
+ "num_data_workers": 2,
+ "hdf5_cache_mode": "low_dim",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 8,
+ "num_epochs": 600,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "critic": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.0,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ },
+ "actor": {
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.0,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "discount": 0.99,
+ "n_step": 1,
+ "target_tau": 0.005,
+ "actor": {
+ "bc_start_steps": 0,
+ "target_entropy": "default",
+ "max_gradient_norm": null,
+ "net": {
+ "type": "gaussian",
+ "common": {
+ "std_activation": "exp",
+ "use_tanh": true,
+ "low_noise_eval": true
+ },
+ "gaussian": {
+ "init_last_fc_weight": 0.001,
+ "init_std": 0.3,
+ "fixed_std": false
+ }
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "critic": {
+ "use_huber": false,
+ "max_gradient_norm": null,
+ "value_bounds": null,
+ "num_action_samples": 1,
+ "cql_weight": 1.0,
+ "deterministic_backup": true,
+ "min_q_weight": 1.0,
+ "target_q_gap": 5.0,
+ "num_random_actions": 10,
+ "ensemble": {
+ "n": 2
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos"
+ ],
+ "rgb": [
+ "agentview_image",
+ "robot0_eye_in_hand_image"
+ ],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {
+ "feature_dimension": 64,
+ "backbone_class": "ResNet18Conv",
+ "backbone_kwargs": {
+ "pretrained": false,
+ "input_coord_conv": false
+ },
+ "pool_class": "SpatialSoftmax",
+ "pool_kwargs": {
+ "num_kp": 32,
+ "learnable_temperature": false,
+ "temperature": 1.0,
+ "noise_std": 0.0
+ }
+ },
+ "obs_randomizer_class": "CropRandomizer",
+ "obs_randomizer_kwargs": {
+ "crop_height": 76,
+ "crop_width": 76,
+ "num_crops": 1,
+ "pos_enc": false
+ }
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/square/mh/low_dim/bc.json b/code_src/rise_robomimic/robomimic/exps/paper/core/square/mh/low_dim/bc.json
new file mode 100644
index 0000000000000000000000000000000000000000..e4bd97aa94c1a83975ea502097ff838ad57acb3a
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/square/mh/low_dim/bc.json
@@ -0,0 +1,215 @@
+{
+ "algo_name": "bc",
+ "experiment": {
+ "name": "core_bc_square_mh_low_dim",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 500,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/square/mh/low_dim_v141.hdf5",
+ "output_dir": "experiments/core/bc/square/mh/low_dim/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": false,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 100,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "gaussian": {
+ "enabled": false,
+ "fixed_std": false,
+ "init_std": 0.1,
+ "min_std": 0.01,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "gmm": {
+ "enabled": true,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": false,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 1.0,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "rnn": {
+ "enabled": false,
+ "horizon": 10,
+ "hidden_dim": 400,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/square/mh/low_dim/bc_rnn.json b/code_src/rise_robomimic/robomimic/exps/paper/core/square/mh/low_dim/bc_rnn.json
new file mode 100644
index 0000000000000000000000000000000000000000..236eca9eea7f9fbaeeb44ae8bf3f4d13faefa49f
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/square/mh/low_dim/bc_rnn.json
@@ -0,0 +1,212 @@
+{
+ "algo_name": "bc",
+ "experiment": {
+ "name": "core_bc_rnn_square_mh_low_dim",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 500,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/square/mh/low_dim_v141.hdf5",
+ "output_dir": "experiments/core/bc_rnn/square/mh/low_dim/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": false,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 10,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 100,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [],
+ "gaussian": {
+ "enabled": false,
+ "fixed_std": false,
+ "init_std": 0.1,
+ "min_std": 0.01,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "gmm": {
+ "enabled": true,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": false,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 1.0,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "rnn": {
+ "enabled": true,
+ "horizon": 10,
+ "hidden_dim": 400,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/square/mh/low_dim/bcq.json b/code_src/rise_robomimic/robomimic/exps/paper/core/square/mh/low_dim/bcq.json
new file mode 100644
index 0000000000000000000000000000000000000000..d0b8a0515d4468eafad6b2979661796730d8e068
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/square/mh/low_dim/bcq.json
@@ -0,0 +1,235 @@
+{
+ "algo_name": "bcq",
+ "experiment": {
+ "name": "core_bcq_square_mh_low_dim",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 500,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/square/mh/low_dim_v141.hdf5",
+ "output_dir": "experiments/core/bcq/square/mh/low_dim/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 100,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "critic": {
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "action_sampler": {
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "actor": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ }
+ },
+ "discount": 0.99,
+ "n_step": 1,
+ "target_tau": 0.0005,
+ "infinite_horizon": false,
+ "critic": {
+ "use_huber": false,
+ "max_gradient_norm": null,
+ "value_bounds": null,
+ "num_action_samples": 10,
+ "num_action_samples_rollout": 100,
+ "ensemble": {
+ "n": 2,
+ "weight": 0.75
+ },
+ "distributional": {
+ "enabled": false,
+ "num_atoms": 51
+ },
+ "layer_dims": [
+ 1024,
+ 1024
+ ]
+ },
+ "action_sampler": {
+ "actor_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "gmm": {
+ "enabled": false,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": true,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 0.5,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": true,
+ "is_conditioned": true,
+ "use_gmm": true,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": true,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "decoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "prior_layer_dims": [
+ 1024,
+ 1024
+ ]
+ },
+ "freeze_encoder_epoch": -1
+ },
+ "actor": {
+ "enabled": false,
+ "perturbation_scale": 0.05,
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/square/mh/low_dim/cql.json b/code_src/rise_robomimic/robomimic/exps/paper/core/square/mh/low_dim/cql.json
new file mode 100644
index 0000000000000000000000000000000000000000..5f33317d95f8b93f2baaec668f29e13436962ff9
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/square/mh/low_dim/cql.json
@@ -0,0 +1,182 @@
+{
+ "algo_name": "cql",
+ "experiment": {
+ "name": "core_cql_square_mh_low_dim",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 500,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/square/mh/low_dim_v141.hdf5",
+ "output_dir": "experiments/core/cql/square/mh/low_dim/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 1024,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "critic": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.0,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ },
+ "actor": {
+ "learning_rate": {
+ "initial": 0.0003,
+ "decay_factor": 0.0,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "discount": 0.99,
+ "n_step": 1,
+ "target_tau": 0.005,
+ "actor": {
+ "bc_start_steps": 0,
+ "target_entropy": "default",
+ "max_gradient_norm": null,
+ "net": {
+ "type": "gaussian",
+ "common": {
+ "std_activation": "exp",
+ "use_tanh": true,
+ "low_noise_eval": true
+ },
+ "gaussian": {
+ "init_last_fc_weight": 0.001,
+ "init_std": 0.3,
+ "fixed_std": false
+ }
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "critic": {
+ "use_huber": false,
+ "max_gradient_norm": null,
+ "value_bounds": null,
+ "num_action_samples": 1,
+ "cql_weight": 1.0,
+ "deterministic_backup": true,
+ "min_q_weight": 1.0,
+ "target_q_gap": 5.0,
+ "num_random_actions": 10,
+ "ensemble": {
+ "n": 2
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/square/mh/low_dim/hbc.json b/code_src/rise_robomimic/robomimic/exps/paper/core/square/mh/low_dim/hbc.json
new file mode 100644
index 0000000000000000000000000000000000000000..5005e6973c009ac2662f26497993544be7592e0b
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/square/mh/low_dim/hbc.json
@@ -0,0 +1,290 @@
+{
+ "algo_name": "hbc",
+ "experiment": {
+ "name": "core_hbc_square_mh_low_dim",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 500,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/square/mh/low_dim_v141.hdf5",
+ "output_dir": "experiments/core/hbc/square/mh/low_dim/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 10,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 100,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "mode": "separate",
+ "actor_use_random_subgoals": false,
+ "subgoal_update_interval": 10,
+ "latent_subgoal": {
+ "enabled": false,
+ "prior_correction": {
+ "enabled": false,
+ "num_samples": 100
+ }
+ },
+ "planner": {
+ "optim_params": {
+ "goal_network": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "subgoal_horizon": 10,
+ "ae": {
+ "planner_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "vae": {
+ "enabled": true,
+ "latent_dim": 16,
+ "latent_clip": null,
+ "kl_weight": 0.0005,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": true,
+ "is_conditioned": true,
+ "use_gmm": true,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": true,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "decoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "prior_layer_dims": [
+ 1024,
+ 1024
+ ]
+ }
+ },
+ "actor": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [],
+ "rnn": {
+ "enabled": true,
+ "horizon": 10,
+ "hidden_dim": 400,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ }
+ },
+ "observation": {
+ "planner": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "subgoal": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "actor": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/square/mh/low_dim/iris.json b/code_src/rise_robomimic/robomimic/exps/paper/core/square/mh/low_dim/iris.json
new file mode 100644
index 0000000000000000000000000000000000000000..91227b4e6c9a4b9fe4b987f6b806771aba4dbc43
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/square/mh/low_dim/iris.json
@@ -0,0 +1,462 @@
+{
+ "algo_name": "iris",
+ "experiment": {
+ "name": "core_iris_square_mh_low_dim",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 50,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 100,
+ "validation_epoch_every_n_steps": 10,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 500,
+ "rate": 50,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/square/mh/low_dim_v141.hdf5",
+ "output_dir": "experiments/core/iris/square/mh/low_dim/trained_models",
+ "num_data_workers": 0,
+ "hdf5_cache_mode": "all",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 10,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 100,
+ "num_epochs": 2000,
+ "seed": 1
+ },
+ "algo": {
+ "mode": "separate",
+ "actor_use_random_subgoals": false,
+ "subgoal_update_interval": 10,
+ "latent_subgoal": {
+ "enabled": false,
+ "prior_correction": {
+ "enabled": false,
+ "num_samples": 100
+ }
+ },
+ "value_planner": {
+ "planner": {
+ "optim_params": {
+ "goal_network": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "subgoal_horizon": 10,
+ "ae": {
+ "planner_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "vae": {
+ "enabled": true,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 0.0005,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": true,
+ "is_conditioned": true,
+ "use_gmm": true,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": true,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "decoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "prior_layer_dims": [
+ 1024,
+ 1024
+ ]
+ }
+ },
+ "value": {
+ "optim_params": {
+ "critic": {
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "action_sampler": {
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "actor": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ }
+ },
+ "discount": 0.99,
+ "n_step": 1,
+ "target_tau": 0.0005,
+ "infinite_horizon": false,
+ "critic": {
+ "use_huber": false,
+ "max_gradient_norm": null,
+ "value_bounds": null,
+ "num_action_samples": 10,
+ "num_action_samples_rollout": 100,
+ "ensemble": {
+ "n": 2,
+ "weight": 0.75
+ },
+ "distributional": {
+ "enabled": false,
+ "num_atoms": 51
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "action_sampler": {
+ "actor_layer_dims": [
+ 300,
+ 400
+ ],
+ "gmm": {
+ "enabled": false,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": true,
+ "latent_dim": 16,
+ "latent_clip": null,
+ "kl_weight": 0.05,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "freeze_encoder_epoch": -1
+ },
+ "actor": {
+ "enabled": false,
+ "perturbation_scale": 0.05,
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ }
+ },
+ "num_samples": 100
+ },
+ "actor": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [],
+ "rnn": {
+ "enabled": true,
+ "horizon": 10,
+ "hidden_dim": 400,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ }
+ },
+ "observation": {
+ "value_planner": {
+ "planner": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "subgoal": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "value": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ }
+ },
+ "actor": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos",
+ "object"
+ ],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/square/ph/image/bc.json b/code_src/rise_robomimic/robomimic/exps/paper/core/square/ph/image/bc.json
new file mode 100644
index 0000000000000000000000000000000000000000..26a60e210ed7fc057e65cf211dcfec69a4d28916
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/square/ph/image/bc.json
@@ -0,0 +1,236 @@
+{
+ "algo_name": "bc",
+ "experiment": {
+ "name": "core_bc_square_ph_image",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 20,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 500,
+ "validation_epoch_every_n_steps": 50,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 20,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/square/ph/image_v141.hdf5",
+ "output_dir": "experiments/core/bc/square/ph/image/trained_models",
+ "num_data_workers": 2,
+ "hdf5_cache_mode": "low_dim",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": false,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 16,
+ "num_epochs": 600,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "gaussian": {
+ "enabled": false,
+ "fixed_std": false,
+ "init_std": 0.1,
+ "min_std": 0.01,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "gmm": {
+ "enabled": true,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": false,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 1.0,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "rnn": {
+ "enabled": false,
+ "horizon": 10,
+ "hidden_dim": 400,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos"
+ ],
+ "rgb": [
+ "agentview_image",
+ "robot0_eye_in_hand_image"
+ ],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {
+ "feature_dimension": 64,
+ "backbone_class": "ResNet18Conv",
+ "backbone_kwargs": {
+ "pretrained": false,
+ "input_coord_conv": false
+ },
+ "pool_class": "SpatialSoftmax",
+ "pool_kwargs": {
+ "num_kp": 32,
+ "learnable_temperature": false,
+ "temperature": 1.0,
+ "noise_std": 0.0
+ }
+ },
+ "obs_randomizer_class": "CropRandomizer",
+ "obs_randomizer_kwargs": {
+ "crop_height": 76,
+ "crop_width": 76,
+ "num_crops": 1,
+ "pos_enc": false
+ }
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/square/ph/image/bc_rnn.json b/code_src/rise_robomimic/robomimic/exps/paper/core/square/ph/image/bc_rnn.json
new file mode 100644
index 0000000000000000000000000000000000000000..ff105ad32bdfca7a31a3a0d3d43d22327ae0b81b
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/square/ph/image/bc_rnn.json
@@ -0,0 +1,233 @@
+{
+ "algo_name": "bc",
+ "experiment": {
+ "name": "core_bc_rnn_square_ph_image",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 20,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 500,
+ "validation_epoch_every_n_steps": 50,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 20,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/square/ph/image_v141.hdf5",
+ "output_dir": "experiments/core/bc_rnn/square/ph/image/trained_models",
+ "num_data_workers": 2,
+ "hdf5_cache_mode": "low_dim",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": false,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 10,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 16,
+ "num_epochs": 600,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "policy": {
+ "optimizer_type": "adam",
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": [],
+ "scheduler_type": "multistep"
+ },
+ "regularization": {
+ "L2": 0.0
+ }
+ }
+ },
+ "loss": {
+ "l2_weight": 1.0,
+ "l1_weight": 0.0,
+ "cos_weight": 0.0
+ },
+ "actor_layer_dims": [],
+ "gaussian": {
+ "enabled": false,
+ "fixed_std": false,
+ "init_std": 0.1,
+ "min_std": 0.01,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "gmm": {
+ "enabled": true,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": false,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 1.0,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "decoder_layer_dims": [
+ 300,
+ 400
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "rnn": {
+ "enabled": true,
+ "horizon": 10,
+ "hidden_dim": 1000,
+ "rnn_type": "LSTM",
+ "num_layers": 2,
+ "open_loop": false,
+ "kwargs": {
+ "bidirectional": false
+ }
+ },
+ "transformer": {
+ "enabled": false,
+ "context_length": 10,
+ "embed_dim": 512,
+ "num_layers": 6,
+ "num_heads": 8,
+ "emb_dropout": 0.1,
+ "attn_dropout": 0.1,
+ "block_output_dropout": 0.1,
+ "sinusoidal_embedding": false,
+ "activation": "gelu",
+ "supervise_all_steps": false,
+ "nn_parameter_for_timesteps": true
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos"
+ ],
+ "rgb": [
+ "agentview_image",
+ "robot0_eye_in_hand_image"
+ ],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {
+ "feature_dimension": 64,
+ "backbone_class": "ResNet18Conv",
+ "backbone_kwargs": {
+ "pretrained": false,
+ "input_coord_conv": false
+ },
+ "pool_class": "SpatialSoftmax",
+ "pool_kwargs": {
+ "num_kp": 32,
+ "learnable_temperature": false,
+ "temperature": 1.0,
+ "noise_std": 0.0
+ }
+ },
+ "obs_randomizer_class": "CropRandomizer",
+ "obs_randomizer_kwargs": {
+ "crop_height": 76,
+ "crop_width": 76,
+ "num_crops": 1,
+ "pos_enc": false
+ }
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file
diff --git a/code_src/rise_robomimic/robomimic/exps/paper/core/square/ph/image/bcq.json b/code_src/rise_robomimic/robomimic/exps/paper/core/square/ph/image/bcq.json
new file mode 100644
index 0000000000000000000000000000000000000000..b0cda8875ec0f3a82559328d068893bc30b10b24
--- /dev/null
+++ b/code_src/rise_robomimic/robomimic/exps/paper/core/square/ph/image/bcq.json
@@ -0,0 +1,256 @@
+{
+ "algo_name": "bcq",
+ "experiment": {
+ "name": "core_bcq_square_ph_image",
+ "validate": true,
+ "logging": {
+ "terminal_output_to_txt": true,
+ "log_tb": true,
+ "log_wandb": false,
+ "wandb_proj_name": "debug"
+ },
+ "save": {
+ "enabled": true,
+ "every_n_seconds": null,
+ "every_n_epochs": 20,
+ "epochs": [],
+ "on_best_validation": false,
+ "on_best_rollout_return": false,
+ "on_best_rollout_success_rate": true
+ },
+ "epoch_every_n_steps": 500,
+ "validation_epoch_every_n_steps": 50,
+ "env": null,
+ "additional_envs": null,
+ "render": false,
+ "render_video": true,
+ "keep_all_videos": false,
+ "video_skip": 5,
+ "rollout": {
+ "enabled": true,
+ "n": 50,
+ "horizon": 400,
+ "rate": 20,
+ "warmstart": 0,
+ "terminate_on_success": true
+ }
+ },
+ "train": {
+ "data": "/home/kevin/ood/robomimic/robomimic/../datasets/square/ph/image_v141.hdf5",
+ "output_dir": "experiments/core/bcq/square/ph/image/trained_models",
+ "num_data_workers": 2,
+ "hdf5_cache_mode": "low_dim",
+ "hdf5_use_swmr": true,
+ "hdf5_load_next_obs": true,
+ "hdf5_normalize_obs": false,
+ "hdf5_filter_key": "train",
+ "hdf5_validation_filter_key": "valid",
+ "seq_length": 1,
+ "pad_seq_length": true,
+ "frame_stack": 1,
+ "pad_frame_stack": true,
+ "dataset_keys": [
+ "actions",
+ "rewards",
+ "dones"
+ ],
+ "goal_mode": null,
+ "cuda": true,
+ "batch_size": 16,
+ "num_epochs": 600,
+ "seed": 1
+ },
+ "algo": {
+ "optim_params": {
+ "critic": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "action_sampler": {
+ "learning_rate": {
+ "initial": 0.0001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ },
+ "actor": {
+ "learning_rate": {
+ "initial": 0.001,
+ "decay_factor": 0.1,
+ "epoch_schedule": []
+ },
+ "regularization": {
+ "L2": 0.0
+ },
+ "start_epoch": -1,
+ "end_epoch": -1
+ }
+ },
+ "discount": 0.99,
+ "n_step": 1,
+ "target_tau": 0.0005,
+ "infinite_horizon": false,
+ "critic": {
+ "use_huber": false,
+ "max_gradient_norm": null,
+ "value_bounds": null,
+ "num_action_samples": 10,
+ "num_action_samples_rollout": 100,
+ "ensemble": {
+ "n": 2,
+ "weight": 0.75
+ },
+ "distributional": {
+ "enabled": false,
+ "num_atoms": 51
+ },
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "action_sampler": {
+ "actor_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "gmm": {
+ "enabled": false,
+ "num_modes": 5,
+ "min_std": 0.0001,
+ "std_activation": "softplus",
+ "low_noise_eval": true
+ },
+ "vae": {
+ "enabled": true,
+ "latent_dim": 14,
+ "latent_clip": null,
+ "kl_weight": 0.05,
+ "decoder": {
+ "is_conditioned": true,
+ "reconstruction_sum_across_elements": false
+ },
+ "prior": {
+ "learn": false,
+ "is_conditioned": false,
+ "use_gmm": false,
+ "gmm_num_modes": 10,
+ "gmm_learn_weights": false,
+ "use_categorical": false,
+ "categorical_dim": 10,
+ "categorical_gumbel_softmax_hard": false,
+ "categorical_init_temp": 1.0,
+ "categorical_temp_anneal_step": 0.001,
+ "categorical_min_temp": 0.3
+ },
+ "encoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "decoder_layer_dims": [
+ 1024,
+ 1024
+ ],
+ "prior_layer_dims": [
+ 300,
+ 400
+ ]
+ },
+ "freeze_encoder_epoch": -1
+ },
+ "actor": {
+ "enabled": false,
+ "perturbation_scale": 0.05,
+ "layer_dims": [
+ 300,
+ 400
+ ]
+ }
+ },
+ "observation": {
+ "modalities": {
+ "obs": {
+ "low_dim": [
+ "robot0_eef_pos",
+ "robot0_eef_quat",
+ "robot0_gripper_qpos"
+ ],
+ "rgb": [
+ "agentview_image",
+ "robot0_eye_in_hand_image"
+ ],
+ "depth": [],
+ "scan": []
+ },
+ "goal": {
+ "low_dim": [],
+ "rgb": [],
+ "depth": [],
+ "scan": []
+ }
+ },
+ "encoder": {
+ "low_dim": {
+ "core_class": null,
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "rgb": {
+ "core_class": "VisualCore",
+ "core_kwargs": {
+ "feature_dimension": 64,
+ "backbone_class": "ResNet18Conv",
+ "backbone_kwargs": {
+ "pretrained": false,
+ "input_coord_conv": false
+ },
+ "pool_class": "SpatialSoftmax",
+ "pool_kwargs": {
+ "num_kp": 32,
+ "learnable_temperature": false,
+ "temperature": 1.0,
+ "noise_std": 0.0
+ }
+ },
+ "obs_randomizer_class": "CropRandomizer",
+ "obs_randomizer_kwargs": {
+ "crop_height": 76,
+ "crop_width": 76,
+ "num_crops": 1,
+ "pos_enc": false
+ }
+ },
+ "depth": {
+ "core_class": "VisualCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ },
+ "scan": {
+ "core_class": "ScanCore",
+ "core_kwargs": {},
+ "obs_randomizer_class": null,
+ "obs_randomizer_kwargs": {}
+ }
+ }
+ },
+ "meta": {
+ "hp_base_config_file": null,
+ "hp_keys": [],
+ "hp_values": []
+ }
+}
\ No newline at end of file