Skip to content

updated cached property#141

Merged
yuecideng merged 1 commit intomainfrom
yhn/cached_property
Feb 14, 2026
Merged

updated cached property#141
yuecideng merged 1 commit intomainfrom
yhn/cached_property

Conversation

@yhnsu
Copy link
Collaborator

@yhnsu yhnsu commented Feb 14, 2026

Description

Update cached properties for Articulation for saving unnecessary costs.

Copilot AI review requested due to automatic review settings February 14, 2026 08:21
@yhnsu yhnsu requested a review from yuecideng February 14, 2026 08:21
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR optimizes the Articulation class by converting several read-only property accessors to cached properties, reducing unnecessary method calls and improving performance.

Changes:

  • Converted 6 properties in the Articulation class from @property to @cached_property for properties that return immutable data (dof, num_links, link_names, root_link_name, joint_names, all_joint_names)
  • Removed trailing whitespace in embodied_env.py

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.

File Description
embodichain/lab/sim/objects/articulation.py Changed 6 properties to cached_property to avoid redundant computation of immutable articulation metadata
embodichain/lab/gym/envs/embodied_env.py Minor whitespace cleanup (removed trailing whitespace)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@yuecideng yuecideng merged commit 99a4d92 into main Feb 14, 2026
11 checks passed
@yuecideng yuecideng deleted the yhn/cached_property branch February 14, 2026 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants