From 4d2de1ec8eb5a420533f7e1e02b9c7cb61983463 Mon Sep 17 00:00:00 2001 From: Kelly Guo Date: Mon, 6 Apr 2026 22:37:06 +0000 Subject: [PATCH 1/6] feat: add release version and extension.toml versions to benchmark output MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The VersionInfoRecorder now reads: 1. The top-level VERSION file (e.g. '3.0.0') and records it as 'isaaclab_release' — this is the overall Isaac Lab release version. 2. Each sub-package's config/extension.toml version, recorded as '_ext' (e.g. 'isaaclab_tasks_ext: 1.5.18'). This supplements the existing pip metadata versions (which reflect what's installed in the current environment) with the source-of-truth versions from the repository files. This is useful for: - Tracking benchmark results against specific releases - Detecting version mismatches between installed packages and source - Reproducing benchmark results from a specific codebase state The extension.toml versions are read using tomllib (Python 3.11+) with a fallback to the tomli backport for older Python versions. --- .../recorders/record_version_info.py | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/source/isaaclab/isaaclab/test/benchmark/recorders/record_version_info.py b/source/isaaclab/isaaclab/test/benchmark/recorders/record_version_info.py index d297dffbb86d..9e35fa02c792 100644 --- a/source/isaaclab/isaaclab/test/benchmark/recorders/record_version_info.py +++ b/source/isaaclab/isaaclab/test/benchmark/recorders/record_version_info.py @@ -7,14 +7,23 @@ import os import subprocess +try: + import tomllib +except ModuleNotFoundError: + import tomli as tomllib # Python < 3.11 + from isaaclab.test.benchmark.interfaces import MeasurementData, MeasurementDataRecorder from isaaclab.test.benchmark.measurements import DictMetadata, StringMetadata +# Path to the repository root (relative to this file: recorders/ -> benchmark/ -> test/ -> isaaclab/ -> isaaclab/ -> source/ -> repo) +_REPO_ROOT = os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), *[".."] * 6)) + class VersionInfoRecorder(MeasurementDataRecorder): def __init__(self): self._version_info = {} self._dev_info = {} + self._get_release_version() self._get_version_info() self._get_git_info() @@ -49,6 +58,39 @@ def _record(self, key: str, version: str | None) -> None: if version: self._version_info[key] = version + def _get_release_version(self) -> None: + """Read the top-level VERSION file and each sub-package's extension.toml version. + + The VERSION file at the repository root contains the Isaac Lab release version + (e.g. ``3.0.0``). Each sub-package under ``source/`` has its own version in + ``config/extension.toml``. + """ + # Read root VERSION file + version_file = os.path.join(_REPO_ROOT, "VERSION") + if os.path.isfile(version_file): + try: + with open(version_file) as f: + version = f.read().strip() + if version: + self._record("isaaclab_release", version) + except Exception: + pass + + # Read extension.toml versions from each source sub-package + source_dir = os.path.join(_REPO_ROOT, "source") + if os.path.isdir(source_dir): + for entry in sorted(os.listdir(source_dir)): + toml_path = os.path.join(source_dir, entry, "config", "extension.toml") + if os.path.isfile(toml_path): + try: + with open(toml_path, "rb") as f: + data = tomllib.load(f) + version = data.get("package", {}).get("version") + if version: + self._record(f"{entry}_ext", version) + except Exception: + pass + def _get_version_info(self) -> None: # isaaclab self._record("isaaclab", self._get_version("isaaclab")) From dafa04a9f22cc74a0139467f3c457242cded5fee Mon Sep 17 00:00:00 2001 From: Antoine Richard Date: Wed, 8 Apr 2026 13:54:42 +0200 Subject: [PATCH 2/6] Simplify version recorder: use tomllib directly, merge into _get_version_info - Remove tomli fallback since Python 3.11+ is minimum - Replace _get_release_version with _get_ext_version helper - Integrate release version and extension.toml reads into _get_version_info --- .../recorders/record_version_info.py | 65 ++++++++----------- 1 file changed, 27 insertions(+), 38 deletions(-) diff --git a/source/isaaclab/isaaclab/test/benchmark/recorders/record_version_info.py b/source/isaaclab/isaaclab/test/benchmark/recorders/record_version_info.py index 9e35fa02c792..1f25b8c2df82 100644 --- a/source/isaaclab/isaaclab/test/benchmark/recorders/record_version_info.py +++ b/source/isaaclab/isaaclab/test/benchmark/recorders/record_version_info.py @@ -7,15 +7,12 @@ import os import subprocess -try: - import tomllib -except ModuleNotFoundError: - import tomli as tomllib # Python < 3.11 +import tomllib from isaaclab.test.benchmark.interfaces import MeasurementData, MeasurementDataRecorder from isaaclab.test.benchmark.measurements import DictMetadata, StringMetadata -# Path to the repository root (relative to this file: recorders/ -> benchmark/ -> test/ -> isaaclab/ -> isaaclab/ -> source/ -> repo) +# Path to the repository root (6 levels up from this file). _REPO_ROOT = os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), *[".."] * 6)) @@ -23,7 +20,6 @@ class VersionInfoRecorder(MeasurementDataRecorder): def __init__(self): self._version_info = {} self._dev_info = {} - self._get_release_version() self._get_version_info() self._get_git_info() @@ -58,38 +54,15 @@ def _record(self, key: str, version: str | None) -> None: if version: self._version_info[key] = version - def _get_release_version(self) -> None: - """Read the top-level VERSION file and each sub-package's extension.toml version. - - The VERSION file at the repository root contains the Isaac Lab release version - (e.g. ``3.0.0``). Each sub-package under ``source/`` has its own version in - ``config/extension.toml``. - """ - # Read root VERSION file - version_file = os.path.join(_REPO_ROOT, "VERSION") - if os.path.isfile(version_file): - try: - with open(version_file) as f: - version = f.read().strip() - if version: - self._record("isaaclab_release", version) - except Exception: - pass - - # Read extension.toml versions from each source sub-package - source_dir = os.path.join(_REPO_ROOT, "source") - if os.path.isdir(source_dir): - for entry in sorted(os.listdir(source_dir)): - toml_path = os.path.join(source_dir, entry, "config", "extension.toml") - if os.path.isfile(toml_path): - try: - with open(toml_path, "rb") as f: - data = tomllib.load(f) - version = data.get("package", {}).get("version") - if version: - self._record(f"{entry}_ext", version) - except Exception: - pass + def _get_ext_version(self, pkg_name: str) -> str | None: + """Read the version from a sub-package's ``config/extension.toml``.""" + toml_path = os.path.join(_REPO_ROOT, "source", pkg_name, "config", "extension.toml") + try: + with open(toml_path, "rb") as f: + data = tomllib.load(f) + return data.get("package", {}).get("version") + except Exception: + return None def _get_version_info(self) -> None: # isaaclab @@ -138,6 +111,22 @@ def _get_version_info(self) -> None: self._record("cuda_bindings", self._get_pkg_version("cuda-bindings")) self._record("usd_core", self._get_pkg_version("usd-core")) + # Release version from root VERSION file + version_file = os.path.join(_REPO_ROOT, "VERSION") + try: + with open(version_file) as f: + self._record("isaaclab_release", f.read().strip()) + except Exception: + pass + + # Extension.toml versions from source sub-packages + source_dir = os.path.join(_REPO_ROOT, "source") + if os.path.isdir(source_dir): + for entry in sorted(os.listdir(source_dir)): + version = self._get_ext_version(entry) + if version: + self._record(f"{entry}_ext", version) + def _get_git_info(self) -> None: """Get git repository information.""" script_dir = os.path.dirname(os.path.abspath(__file__)) From 83a0fb939668d498bf06c79ef22776083fa58574 Mon Sep 17 00:00:00 2001 From: Antoine Richard Date: Wed, 8 Apr 2026 15:20:23 +0200 Subject: [PATCH 3/6] Address review findings: simplify comment, harden os.listdir - Remove fragile level-count from _REPO_ROOT comment - Wrap os.listdir loop in try-except for consistency with the rest of the file's defensive error handling --- .../test/benchmark/recorders/record_version_info.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/isaaclab/isaaclab/test/benchmark/recorders/record_version_info.py b/source/isaaclab/isaaclab/test/benchmark/recorders/record_version_info.py index 1f25b8c2df82..36599c7a6314 100644 --- a/source/isaaclab/isaaclab/test/benchmark/recorders/record_version_info.py +++ b/source/isaaclab/isaaclab/test/benchmark/recorders/record_version_info.py @@ -12,7 +12,7 @@ from isaaclab.test.benchmark.interfaces import MeasurementData, MeasurementDataRecorder from isaaclab.test.benchmark.measurements import DictMetadata, StringMetadata -# Path to the repository root (6 levels up from this file). +# Path to the repository root. _REPO_ROOT = os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), *[".."] * 6)) @@ -121,11 +121,13 @@ def _get_version_info(self) -> None: # Extension.toml versions from source sub-packages source_dir = os.path.join(_REPO_ROOT, "source") - if os.path.isdir(source_dir): + try: for entry in sorted(os.listdir(source_dir)): version = self._get_ext_version(entry) if version: self._record(f"{entry}_ext", version) + except Exception: + pass def _get_git_info(self) -> None: """Get git repository information.""" From cf88fd32c58692019a0ff8ac1fdc7c8d2421b100 Mon Sep 17 00:00:00 2001 From: Antoine Richard Date: Wed, 8 Apr 2026 15:20:58 +0200 Subject: [PATCH 4/6] Add changelog entry and bump version to 4.5.27 Document the addition of release version and extension.toml versions to VersionInfoRecorder benchmark output. --- source/isaaclab/config/extension.toml | 2 +- source/isaaclab/docs/CHANGELOG.rst | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/source/isaaclab/config/extension.toml b/source/isaaclab/config/extension.toml index 24d3151cda98..1d45bce0e5cd 100644 --- a/source/isaaclab/config/extension.toml +++ b/source/isaaclab/config/extension.toml @@ -1,7 +1,7 @@ [package] # Note: Semantic Versioning is used: https://semver.org/ -version = "4.5.26" +version = "4.5.27" # Description title = "Isaac Lab framework for Robot Learning" diff --git a/source/isaaclab/docs/CHANGELOG.rst b/source/isaaclab/docs/CHANGELOG.rst index 5a98e8b997ba..198dfb6a8fa9 100644 --- a/source/isaaclab/docs/CHANGELOG.rst +++ b/source/isaaclab/docs/CHANGELOG.rst @@ -1,6 +1,16 @@ Changelog --------- +4.5.27 (2026-04-08) +~~~~~~~~~~~~~~~~~~~ + +Added +^^^^^ + +* Added release version and extension.toml versions to + :class:`~isaaclab.test.benchmark.recorders.VersionInfoRecorder` output. + + 4.5.26 (2026-04-08) ~~~~~~~~~~~~~~~~~~~ From 707374eed8a7c4e3b47b5ded8b273f89c15e3bf7 Mon Sep 17 00:00:00 2001 From: Kelly Guo Date: Wed, 8 Apr 2026 17:56:20 +0000 Subject: [PATCH 5/6] Remove extension.toml version recording, keep only VERSION file --- .../recorders/record_version_info.py | 22 ------------------- 1 file changed, 22 deletions(-) diff --git a/source/isaaclab/isaaclab/test/benchmark/recorders/record_version_info.py b/source/isaaclab/isaaclab/test/benchmark/recorders/record_version_info.py index 36599c7a6314..a4396371b3d3 100644 --- a/source/isaaclab/isaaclab/test/benchmark/recorders/record_version_info.py +++ b/source/isaaclab/isaaclab/test/benchmark/recorders/record_version_info.py @@ -7,8 +7,6 @@ import os import subprocess -import tomllib - from isaaclab.test.benchmark.interfaces import MeasurementData, MeasurementDataRecorder from isaaclab.test.benchmark.measurements import DictMetadata, StringMetadata @@ -54,16 +52,6 @@ def _record(self, key: str, version: str | None) -> None: if version: self._version_info[key] = version - def _get_ext_version(self, pkg_name: str) -> str | None: - """Read the version from a sub-package's ``config/extension.toml``.""" - toml_path = os.path.join(_REPO_ROOT, "source", pkg_name, "config", "extension.toml") - try: - with open(toml_path, "rb") as f: - data = tomllib.load(f) - return data.get("package", {}).get("version") - except Exception: - return None - def _get_version_info(self) -> None: # isaaclab self._record("isaaclab", self._get_version("isaaclab")) @@ -119,16 +107,6 @@ def _get_version_info(self) -> None: except Exception: pass - # Extension.toml versions from source sub-packages - source_dir = os.path.join(_REPO_ROOT, "source") - try: - for entry in sorted(os.listdir(source_dir)): - version = self._get_ext_version(entry) - if version: - self._record(f"{entry}_ext", version) - except Exception: - pass - def _get_git_info(self) -> None: """Get git repository information.""" script_dir = os.path.dirname(os.path.abspath(__file__)) From 57545c81cb950600d93564c59d3d1c6ce4e9c660 Mon Sep 17 00:00:00 2001 From: Kelly Guo Date: Wed, 8 Apr 2026 11:01:32 -0700 Subject: [PATCH 6/6] Apply suggestion from @kellyguo11 Signed-off-by: Kelly Guo --- source/isaaclab/docs/CHANGELOG.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/isaaclab/docs/CHANGELOG.rst b/source/isaaclab/docs/CHANGELOG.rst index 198dfb6a8fa9..b0838fc98c8d 100644 --- a/source/isaaclab/docs/CHANGELOG.rst +++ b/source/isaaclab/docs/CHANGELOG.rst @@ -7,7 +7,7 @@ Changelog Added ^^^^^ -* Added release version and extension.toml versions to +* Added release version to :class:`~isaaclab.test.benchmark.recorders.VersionInfoRecorder` output.