diff --git a/RELEASING.md b/RELEASING.md index 0d0a7ab1a..858f84fda 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -56,14 +56,20 @@ keep both in sync. 2. Run the `get_started` tutorials on MuJoCo and at least one other backend (`--headless`) and the parity scripts; record pass/skip/xfail counts and parity numbers in the release notes. 3. Open a `chore(release): vX.Y.Z` PR that - - bumps `[project] version` in `pyproject.toml`, - - renames `## [Unreleased]` in `CHANGELOG.md` to `## [X.Y.Z] - YYYY-MM-DD` and adds a fresh - empty `## [Unreleased]`, + - bumps `[project] version` in both `pyproject.toml` files (and the `roboverse-metasim` pin at the root), + - renames `## [Unreleased]` in `CHANGELOG.md` **and** `packages/metasim/CHANGELOG.md` to + `## [X.Y.Z] - YYYY-MM-DD` and adds a fresh empty `## [Unreleased]` + (`python tools/release/changelog_check.py --version X.Y.Z --require-empty-unreleased` is what the tag path runs), + - confirms the benchmark is what it was scored on: `tools/release/lock.sh --check`, + `python tools/assets/freeze_suite_manifest.py --suite tabletop-mujoco --check`, and no change to + `roboverse_pack/suites/instances/` unless the release deliberately re-freezes a set (every row then stops being + comparable with the new ones; say so in the changelog). 4. Merge it, then tag the squash commit: `git tag -a vX.Y.Z -m "RoboVerse vX.Y.Z" && git push origin vX.Y.Z`. -5. `release.yml` runs on the tag: it verifies the tag equals the `pyproject.toml` version, builds - the sdist and wheel, checks them with `twine`, creates the GitHub Release with the matching - `CHANGELOG.md` section as body, and (when the `pypi` environment is configured, §5) publishes - to PyPI through trusted publishing. +5. `release.yml` runs on the tag: it verifies the tag equals the `pyproject.toml` version and the changelog + guard, builds both sdists and wheels, checks them with `twine` and `tools/release/wheel_check.py` (the instance + sets, manifests and NOTICE files are inside), publishes the evaluation image, creates the GitHub Release with + the two changelog sections as body, and (when the `pypi` environment is configured and `PYPI_PUBLISH` is set, + §5) publishes to PyPI through trusted publishing. 6. Announce in Discussions / Discord with the changelog link and the MetaSim version it pairs with. Patch releases: branch `release/vX.Y` from the tag, cherry-pick fixes, repeat steps 3-5 with diff --git a/docs/source/dataset_benchmark/benchmark/usage.md b/docs/source/dataset_benchmark/benchmark/usage.md index 1d010f098..40e58e448 100644 --- a/docs/source/dataset_benchmark/benchmark/usage.md +++ b/docs/source/dataset_benchmark/benchmark/usage.md @@ -162,10 +162,11 @@ the sidecar `.json` next to each set names the source file and every skipped ins revision (`tools/assets/freeze_suite_manifest.py --suite `); `bench suite run` pins downloads to it and refuses a run on other bytes unless `--allow-unpinned-assets`. Re-freezing an instance set changes the instance-pool hash, so earlier rows stop being comparable with new ones. -In `tabletop-mujoco` the demo budget tightens push_cube (216 steps), pull_cube (237) and -lift_peg_upright (534). pick_cube and stack_cube keep their 250-step time-out, because their recorded -demos run that long even when the task is solved by about step 120. Every task in the suite has a -prompt bank with 8 training and 4 held-out paraphrases. +In `tabletop-mujoco` the demo budget (3x the 75th-percentile reference-demo length of the instance set, clipped +to the task's own time-out) tightens push_cube (216 steps), pull_cube (237) and lift_peg_upright (738; its set +is scripted demos, longer than the published ones). pick_cube and stack_cube keep their 250-step time-out, +because their reference demos run that long even when the task is solved by about step 120. Every task in the +suite has a prompt bank with 8 training and 4 held-out paraphrases. ## Information-access tiers diff --git a/packages/metasim/CHANGELOG.md b/packages/metasim/CHANGELOG.md index 323904a73..7df64cebe 100644 --- a/packages/metasim/CHANGELOG.md +++ b/packages/metasim/CHANGELOG.md @@ -8,10 +8,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ### Added +- A relative path whose first segment is an installed package (`roboverse_pack/suites/instances/...`) resolves next to that package when the working directory lacks it (`metasim.utils.hf_util.shipped_path`, used by the asset, directory and demo-file resolvers), and is never fetched from the Hub: a wheel installed anywhere scores a suite on its shipped instance sets. - The wheel ships a `NOTICE` (Apache-2.0 §4(d)) naming the Isaac Lab and HandsOn code it includes, next to `LICENSE.isaaclab` and `LICENSE.handson`; `tools/release/wheel_check.py` requires it. - `submission_problems` also refuses a result whose `notes.instance_pool_hash` is not the hash recorded in the suite instance set's sidecar (`metasim.bench.instance_set_hash`; the episodes did not run on the set), a result with `num_envs != 1` (a suite's official protocol), and an access profile that borrows a preset's name but differs from it. - `SuiteTask.demos`: the instance set a suite scores a task on, a repository-relative demo file that `bench suite run` applies in both execution modes and records as `notes.demos`; `submission_problems` refuses a result scored on anything else (or on a `--demos` override the suite does not define). `metasim.utils.demo_util` reads and writes `.json.gz` trajectory files (gzip JSON: readable, no pickle), the format the repository's instance sets use. +### Fixed +- Importing MetaSim no longer prints torch's `torch.jit.script` FutureWarning on every `python -m metasim` start (torch >= 2.15): the decorators in `metasim.utils.math` are gone and the functions run as plain Python with the same results. + ## [1.0.0] - 2026-11-30 ### Added diff --git a/packages/metasim/metasim/test/test_bench_suites_general.py b/packages/metasim/metasim/test/test_bench_suites_general.py index ba46b3b70..a556590d9 100644 --- a/packages/metasim/metasim/test/test_bench_suites_general.py +++ b/packages/metasim/metasim/test/test_bench_suites_general.py @@ -1145,3 +1145,32 @@ def test_submission_gate_checks_the_set_hash_the_batch_size_and_preset_tiers(tmp assert not any("differs from that preset" in p for p in submission_problems(result, pinned)) result.protocol["access"] = {**visual, "observation": "privileged"} # a "visual" tier that sees everything assert any("named 'visual' but differs from that preset" in p for p in submission_problems(result, pinned)) + + +def test_files_shipped_inside_an_installed_package_resolve_from_any_directory(tmp_path, monkeypatch): + """A `roboverse_pack/...` path is found next to the installed package when the working directory lacks it.""" + + from metasim.utils import hf_util + from metasim.utils.demo_util.demo_util import _resolve_traj_file + from metasim.utils.trajectory import _resolve_dir, resolve_demo_file + + site = tmp_path / "site" + pkg = site / "fake_content_pack" / "suites" / "instances" / "s" / "t" + pkg.mkdir(parents=True) + (site / "fake_content_pack" / "__init__.py").write_text("") + (pkg / "bot_v2.json.gz").write_bytes(b"\x1f\x8b") + monkeypatch.syspath_prepend(str(site)) + (tmp_path / "elsewhere").mkdir() + monkeypatch.chdir(tmp_path / "elsewhere") + rel = "fake_content_pack/suites/instances/s/t/bot_v2.json.gz" + assert hf_util.shipped_path(rel) == str(pkg / "bot_v2.json.gz") + assert hf_util.shipped_path("fake_content_pack/suites/instances/s/t") == str(pkg) + assert hf_util.shipped_path("roboverse_data/robots/x.xml") is None, "the Hub store is not a package" + assert hf_util.shipped_path("no_such_package/x") is None and hf_util.shipped_path("/abs/path") is None + configured, found = resolve_demo_file(rel, []) + assert configured == rel and found == pkg / "bot_v2.json.gz", "the configured string stays repository-relative" + assert _resolve_dir("fake_content_pack/suites/instances/s/t") == pkg + assert _resolve_traj_file("fake_content_pack/suites/instances/s/t", "bot") == str(pkg / "bot_v2.json.gz") + # the Hub is never asked for a shipped file + monkeypatch.setattr(hf_util, "_find_data_repo", lambda *a, **k: pytest.fail("the Hub was asked for a shipped file")) + hf_util.check_and_download_single(rel) diff --git a/packages/metasim/metasim/test/test_cli_entry_general.py b/packages/metasim/metasim/test/test_cli_entry_general.py index 8f47c2824..5c46d2e2c 100644 --- a/packages/metasim/metasim/test/test_cli_entry_general.py +++ b/packages/metasim/metasim/test/test_cli_entry_general.py @@ -555,3 +555,25 @@ def test_command_line_is_the_invocation_main_parsed(monkeypatch, capsys): monkeypatch.setattr(registry, "list_tasks", lambda: []) assert cli.main(["bench", "list", "--filter", "a b"]) == 0 assert cli._command_line() == "python -m metasim bench list --filter 'a b'" + + +def test_importing_the_bench_raises_no_deprecation_warning(): + """`python -m metasim ...` must not greet a newcomer with a FutureWarning (torch.jit.script did, on every start).""" + import subprocess + import sys + + done = subprocess.run( + [ + sys.executable, + "-W", + "error::FutureWarning", + "-W", + "error::DeprecationWarning:metasim", + "-c", + "import metasim.bench, metasim.__main__", + ], + check=False, + capture_output=True, + text=True, + ) + assert done.returncode == 0, done.stderr[-2000:] diff --git a/packages/metasim/metasim/utils/demo_util/demo_util.py b/packages/metasim/metasim/utils/demo_util/demo_util.py index 3406c34a5..aa58e047c 100644 --- a/packages/metasim/metasim/utils/demo_util/demo_util.py +++ b/packages/metasim/metasim/utils/demo_util/demo_util.py @@ -21,6 +21,12 @@ def _resolve_traj_file(traj_filepath: str, robot_name: str | None) -> str: extensions only, so a sidecar named after the robot (``franka.json`` config, ``franka.npz`` episode) cannot shadow the trajectory. """ + if not os.path.exists(traj_filepath): + from metasim.utils.hf_util import shipped_path + + shipped = shipped_path(traj_filepath) # a file inside an installed package (a suite's instance set) + if shipped: + traj_filepath = shipped if not os.path.isdir(traj_filepath): return traj_filepath if robot_name is None: diff --git a/packages/metasim/metasim/utils/hf_util.py b/packages/metasim/metasim/utils/hf_util.py index 582fbaaad..9d71bb285 100644 --- a/packages/metasim/metasim/utils/hf_util.py +++ b/packages/metasim/metasim/utils/hf_util.py @@ -344,10 +344,41 @@ def _download_tree(relpath_posix: str) -> bool: return False +def shipped_path(value: str) -> str | None: + """Where a path that names a file inside an installed package lives on this machine, or None. + + Content packs ship files with their code: the benchmark instance sets are + ``roboverse_pack/suites/instances///_v2.json.gz``, written relative to the repository + root. A checkout run from its root finds them in the working directory; a wheel installed elsewhere does + not, so a relative path whose first segment is an importable package (and is not ``roboverse_data``, the + Hub store) is also looked up next to that package's installed location (every location of a namespace + package). Such a path is never fetched from the Hub. + """ + if not value or os.path.isabs(value): + return None + parts = value.replace(os.sep, "/").split("/") + if len(parts) < 2 or parts[0] in ("roboverse_data", ".", "..") or not parts[0].isidentifier(): + return None + try: + import importlib.util + + spec = importlib.util.find_spec(parts[0]) + except (ImportError, ValueError): + return None + if spec is None: + return None + for location in list(spec.submodule_search_locations or []): + candidate = os.path.join(os.path.dirname(location), *parts) + if os.path.exists(candidate): + return candidate + return None + + def check_and_download_single(filepath: str): """Check if the file exists in the local directory, and download it from the huggingface dataset if it doesn't exist. - A path without a file suffix is taken to be a folder (a demo directory) and its files are fetched. + A path without a file suffix is taken to be a folder (a demo directory) and its files are fetched. A path that + names a file shipped inside an installed package (:func:`shipped_path`) is never fetched. Args: filepath: the filepath to check and download. @@ -356,6 +387,9 @@ def check_and_download_single(filepath: str): log.warning("Received None filepath, skipping download check.") return local_exists = os.path.exists(filepath) + if not local_exists and shipped_path(filepath): + log.debug(f"File {filepath} ships with the installed package ({shipped_path(filepath)}).") + return if local_exists: ## In this case, the runner has the file in their local machine. log.debug(f"File {filepath} found in local directory.") diff --git a/packages/metasim/metasim/utils/math.py b/packages/metasim/metasim/utils/math.py index 631f73ed1..70b1249ec 100644 --- a/packages/metasim/metasim/utils/math.py +++ b/packages/metasim/metasim/utils/math.py @@ -4,7 +4,9 @@ # SPDX-License-Identifier: BSD-3-Clause # # Adapted from Isaac Lab (https://github.com/isaac-sim/IsaacLab). -# Changes: math utilities trimmed to the functions MetaSim uses; torch/numpy dual signatures kept. +# Changes: math utilities trimmed to the functions MetaSim uses; torch/numpy dual signatures kept; the +# @torch.jit.script decorators removed (TorchScript is deprecated and warns at import since torch 2.15; +# the functions run as plain Python with the same results). # Full license: packages/metasim/LICENSE.isaaclab """Sub-module containing utilities for various math operations.""" @@ -25,7 +27,6 @@ """ -@torch.jit.script def scale_transform(x: torch.Tensor, lower: torch.Tensor, upper: torch.Tensor) -> torch.Tensor: """Normalizes a given input tensor to a range of [-1, 1]. @@ -46,7 +47,6 @@ def scale_transform(x: torch.Tensor, lower: torch.Tensor, upper: torch.Tensor) - return 2 * (x - offset) / (upper - lower) -@torch.jit.script def unscale_transform(x: torch.Tensor, lower: torch.Tensor, upper: torch.Tensor) -> torch.Tensor: """De-normalizes a given input tensor from range of [-1, 1] to (lower, upper). @@ -67,7 +67,6 @@ def unscale_transform(x: torch.Tensor, lower: torch.Tensor, upper: torch.Tensor) return x * (upper - lower) * 0.5 + offset -@torch.jit.script def saturate(x: torch.Tensor, lower: torch.Tensor, upper: torch.Tensor) -> torch.Tensor: """Clamps a given input tensor to (lower, upper). @@ -85,7 +84,6 @@ def saturate(x: torch.Tensor, lower: torch.Tensor, upper: torch.Tensor) -> torch # same as isaaclab.utils.math.normalize -@torch.jit.script def normalize(x: torch.Tensor, eps: float = 1e-9) -> torch.Tensor: """Normalizes a given input tensor to unit length. @@ -99,7 +97,6 @@ def normalize(x: torch.Tensor, eps: float = 1e-9) -> torch.Tensor: return x / x.norm(p=2, dim=-1).clamp(min=eps, max=None).unsqueeze(-1) -@torch.jit.script def wrap_to_pi(angles: torch.Tensor) -> torch.Tensor: r"""Wraps input angles (in radians) to the range :math:`[-\pi, \pi]`. @@ -124,7 +121,6 @@ def wrap_to_pi(angles: torch.Tensor) -> torch.Tensor: return torch.where((wrapped_angle == 0) & (angles > 0), torch.pi, wrapped_angle - torch.pi) -@torch.jit.script def copysign(mag: float, other: torch.Tensor) -> torch.Tensor: """Create a new floating-point tensor with the magnitude of input and the sign of other, element-wise. @@ -148,7 +144,6 @@ def copysign(mag: float, other: torch.Tensor) -> torch.Tensor: # same as isaaclab.utils.math.matrix_from_quat -@torch.jit.script def matrix_from_quat(quaternions: torch.Tensor) -> torch.Tensor: """Convert rotations given as quaternions to rotation matrices. @@ -229,7 +224,6 @@ def convert_quat(quat: torch.Tensor | np.ndarray, to: Literal["xyzw", "wxyz"] = # same as isaaclab.utils.math.quat_from_euler_xyz -@torch.jit.script def quat_from_euler_xyz(roll: torch.Tensor, pitch: torch.Tensor, yaw: torch.Tensor) -> torch.Tensor: """Convert rotations given as Euler angles in radians to Quaternions. @@ -288,7 +282,6 @@ def quat_from_euler_np(roll: np.ndarray, pitch: np.ndarray, yaw: np.ndarray) -> return np.stack([qw, qx, qy, qz], axis=-1) -@torch.jit.script def _sqrt_positive_part(x: torch.Tensor) -> torch.Tensor: """Returns torch.sqrt(torch.max(0, x)) but with a zero sub-gradient where x is 0. @@ -301,7 +294,6 @@ def _sqrt_positive_part(x: torch.Tensor) -> torch.Tensor: return ret -@torch.jit.script def quat_from_matrix(matrix: torch.Tensor) -> torch.Tensor: """Convert rotations given as rotation matrices to quaternions. @@ -418,7 +410,6 @@ def matrix_from_euler(euler_angles: torch.Tensor, convention: str) -> torch.Tens return torch.matmul(torch.matmul(matrices[0], matrices[1]), matrices[2]) -@torch.jit.script def euler_xyz_from_quat(quat: torch.Tensor) -> tuple[torch.Tensor, torch.Tensor, torch.Tensor]: """Convert rotations given as quaternions to Euler angles in radians. @@ -458,7 +449,6 @@ def euler_xyz_from_quat(quat: torch.Tensor) -> tuple[torch.Tensor, torch.Tensor, return roll, pitch, yaw -@torch.jit.script def quat_unique(q: torch.Tensor) -> torch.Tensor: """Convert a unit quaternion to a standard form where the real part is non-negative. @@ -474,7 +464,6 @@ def quat_unique(q: torch.Tensor) -> torch.Tensor: return torch.where(q[..., 0:1] < 0, -q, q) -@torch.jit.script def quat_conjugate(q: torch.Tensor) -> torch.Tensor: """Computes the conjugate of a quaternion. @@ -489,7 +478,6 @@ def quat_conjugate(q: torch.Tensor) -> torch.Tensor: return torch.cat((q[:, 0:1], -q[:, 1:]), dim=-1).view(shape) -@torch.jit.script def quat_inv(q: torch.Tensor) -> torch.Tensor: """Compute the inverse of a quaternion. @@ -504,7 +492,6 @@ def quat_inv(q: torch.Tensor) -> torch.Tensor: # same as isaaclab.utils.math.quat_mul -@torch.jit.script def quat_mul(q1: torch.Tensor, q2: torch.Tensor) -> torch.Tensor: """Multiply two quaternions together. @@ -543,7 +530,6 @@ def quat_mul(q1: torch.Tensor, q2: torch.Tensor) -> torch.Tensor: return torch.stack([w, x, y, z], dim=-1).view(shape) -@torch.jit.script def quat_box_minus(q1: torch.Tensor, q2: torch.Tensor) -> torch.Tensor: """The box-minus operator (quaternion difference) between two quaternions. @@ -563,7 +549,6 @@ def quat_box_minus(q1: torch.Tensor, q2: torch.Tensor) -> torch.Tensor: # same as isaaclab.utils.math.yaw_quat -@torch.jit.script def yaw_quat(quat: torch.Tensor) -> torch.Tensor: """Extract the yaw component of a quaternion. @@ -588,7 +573,6 @@ def yaw_quat(quat: torch.Tensor) -> torch.Tensor: # same as isaaclab.utils.math.quat_apply -@torch.jit.script def quat_apply(quat: torch.Tensor, vec: torch.Tensor) -> torch.Tensor: """Apply a quaternion rotation to a vector. @@ -610,7 +594,6 @@ def quat_apply(quat: torch.Tensor, vec: torch.Tensor) -> torch.Tensor: return (vec + quat[:, 0:1] * t + xyz.cross(t, dim=-1)).view(shape) -@torch.jit.script def quat_apply_yaw(quat: torch.Tensor, vec: torch.Tensor) -> torch.Tensor: """Rotate a vector only around the yaw-direction. @@ -625,7 +608,6 @@ def quat_apply_yaw(quat: torch.Tensor, vec: torch.Tensor) -> torch.Tensor: return quat_apply(quat_yaw, vec) -@torch.jit.script def quat_rotate(q: torch.Tensor, v: torch.Tensor) -> torch.Tensor: """Rotate a vector by a quaternion along the last dimension of q and v. @@ -649,7 +631,6 @@ def quat_rotate(q: torch.Tensor, v: torch.Tensor) -> torch.Tensor: # same as isaaclab.utils.math.quat_rotate_inverse -@torch.jit.script def quat_rotate_inverse(q: torch.Tensor, v: torch.Tensor) -> torch.Tensor: """Rotate a vector by the inverse of a quaternion along the last dimension of q and v. @@ -672,7 +653,6 @@ def quat_rotate_inverse(q: torch.Tensor, v: torch.Tensor) -> torch.Tensor: return a - b + c -@torch.jit.script def quat_from_angle_axis(angle: torch.Tensor, axis: torch.Tensor) -> torch.Tensor: """Convert rotations given as angle-axis to quaternions. @@ -690,7 +670,6 @@ def quat_from_angle_axis(angle: torch.Tensor, axis: torch.Tensor) -> torch.Tenso # same as isaaclab.utils.math.axis_angle_from_quat -@torch.jit.script def axis_angle_from_quat(quat: torch.Tensor, eps: float = 1.0e-6) -> torch.Tensor: """Convert rotations given as quaternions to axis/angle. @@ -722,7 +701,6 @@ def axis_angle_from_quat(quat: torch.Tensor, eps: float = 1.0e-6) -> torch.Tenso return quat[..., 1:4] / sin_half_angles_over_angles.unsqueeze(-1) -@torch.jit.script def quat_error_magnitude(q1: torch.Tensor, q2: torch.Tensor) -> torch.Tensor: """Computes the rotation difference between two quaternions. @@ -737,7 +715,6 @@ def quat_error_magnitude(q1: torch.Tensor, q2: torch.Tensor) -> torch.Tensor: return torch.norm(axis_angle_from_quat(quat_diff), dim=-1) -@torch.jit.script def skew_symmetric_matrix(vec: torch.Tensor) -> torch.Tensor: """Computes the skew-symmetric matrix of a vector. @@ -918,7 +895,6 @@ def compute_pose_error( raise ValueError(f"Unsupported orientation error type: {rot_error_type}. Valid: 'quat', 'axis_angle'.") -@torch.jit.script def apply_delta_pose( source_pos: torch.Tensor, source_rot: torch.Tensor, delta_pose: torch.Tensor, eps: float = 1.0e-6 ) -> tuple[torch.Tensor, torch.Tensor]: @@ -1036,7 +1012,6 @@ def transform_points( """ -@torch.jit.script def orthogonalize_perspective_depth(depth: torch.Tensor, intrinsics: torch.Tensor) -> torch.Tensor: """Converts perspective depth image to orthogonal depth image. @@ -1128,7 +1103,6 @@ def orthogonalize_perspective_depth(depth: torch.Tensor, intrinsics: torch.Tenso return orthogonal_depth -@torch.jit.script def unproject_depth(depth: torch.Tensor, intrinsics: torch.Tensor, is_ortho: bool = True) -> torch.Tensor: r"""Un-project depth image into a pointcloud. @@ -1215,7 +1189,6 @@ def unproject_depth(depth: torch.Tensor, intrinsics: torch.Tensor, is_ortho: boo return points_xyz -@torch.jit.script def project_points(points: torch.Tensor, intrinsics: torch.Tensor) -> torch.Tensor: r"""Projects 3D points into 2D image plane. @@ -1279,7 +1252,6 @@ def project_points(points: torch.Tensor, intrinsics: torch.Tensor) -> torch.Tens """ -@torch.jit.script def default_orientation(num: int, device: str) -> torch.Tensor: """Returns identity rotation transform. @@ -1296,7 +1268,6 @@ def default_orientation(num: int, device: str) -> torch.Tensor: return quat -@torch.jit.script def random_orientation(num: int, device: str) -> torch.Tensor: """Returns sampled rotation in 3D as quaternion. @@ -1316,7 +1287,6 @@ def random_orientation(num: int, device: str) -> torch.Tensor: return torch.nn.functional.normalize(quat, p=2.0, dim=-1, eps=1e-12) -@torch.jit.script def random_yaw_orientation(num: int, device: str) -> torch.Tensor: """Returns sampled rotation around z-axis. diff --git a/packages/metasim/metasim/utils/trajectory.py b/packages/metasim/metasim/utils/trajectory.py index 3594ba321..0d2a36e48 100644 --- a/packages/metasim/metasim/utils/trajectory.py +++ b/packages/metasim/metasim/utils/trajectory.py @@ -193,7 +193,10 @@ def _resolve_asset(value: str) -> Path | None: candidate = Path(data_dir).expanduser() / rel if candidate.is_file(): return candidate - return None + from metasim.utils.hf_util import shipped_path + + shipped = shipped_path(value) # a file inside an installed package (a suite's instance set) + return Path(shipped) if shipped and Path(shipped).is_file() else None def _resolve_dir(value: str) -> Path | None: @@ -208,7 +211,10 @@ def _resolve_dir(value: str) -> Path | None: candidate = Path(data_dir).expanduser() / rel if candidate.is_dir(): return candidate - return None + from metasim.utils.hf_util import shipped_path + + shipped = shipped_path(value) + return Path(shipped) if shipped and Path(shipped).is_dir() else None def resolve_demo_file(traj: str, robot_names: Sequence[str]) -> tuple[str, Path] | None: diff --git a/requirements/bench-cpu.in b/requirements/bench-cpu.in index 6bebbe3d5..1be1eeef4 100644 --- a/requirements/bench-cpu.in +++ b/requirements/bench-cpu.in @@ -2,7 +2,9 @@ # Compiled into bench-cpu.lock.txt by tools/release/lock.sh (uv pip compile); the two RoboVerse packages # themselves are installed from the checkout with --no-deps on top of the lock. The engine versions are the # `tested` ones of packages/metasim/metasim/sim/_versions.py, pinned here so a re-run in a year resolves the -# same bytes; test_backend_versions_general.py keeps the two in step. +# same bytes; test_backend_versions_general.py keeps the two in step. Install the lock with pip +# (`python -m pip install --no-deps -r requirements/bench-cpu.lock.txt`, as the Dockerfile does); uv's default +# first-match index strategy does not see the `+cpu` builds on the PyTorch index (`--index-strategy unsafe-best-match`). -e ./packages/metasim[mujoco,dev] -e .[mujoco,dev] mujoco==3.17.0 diff --git a/results/README.md b/results/README.md index ba033e7cf..e3f1521a4 100644 --- a/results/README.md +++ b/results/README.md @@ -7,10 +7,18 @@ pull request; CI validates every file against the result schema and regenerates What a submission must contain: -- the result files themselves (`bench validate` passes), unmodified; -- a run under one information-access tier per file (the tier is recorded in `protocol.access`); -- a served or packaged policy that a maintainer can re-run: `policy.spec`, `checkpoint_sha256` or the - server metadata are in the file; a row is marked verified once the nightly runner reproduces it. +- the result files themselves (`bench validate --suite ` passes), unmodified; +- a `bench suite run` on the suite's instance set (`roboverse_pack/suites/instances///`, recorded as + `notes.demos` with the set's instance-pool hash), under the suite's protocol with `num_envs=1`, on the suite's + backend, from a clean commit on main's history; +- a run under one information-access tier per file (the tier is recorded in `protocol.access`; a preset's name + means that preset); +- a served or packaged policy that a maintainer can re-run: `policy.spec`, `checkpoint_sha256` + `checkpoint_url` + or the server metadata are in the file; a row is marked verified once `tools/bench/verify_submission.py` (the + weekly `verify-submissions` workflow, or the submitter against their own server) reproduces it. + +`python -m metasim bench submit --suite --name -` assembles the directory and runs +these checks. A run that cannot meet them is listed apart and unranked with `PROVISIONAL.md` saying why. The first submission, `tabletop-mujoco/2026-11-27-poc`, is the methods x perspectives proof of concept: replay, hold, random, scripted skills, an LLM agent under two tiers, and OpenVLA-7B zero-shot, 10 episodes