Skip to content

refactor: use TensorDict NestedKey directly - #134

Merged
Xmaster6y merged 1 commit into
Xmaster6y:mainfrom
MohammedThowfiq:codex/native-nested-key
Sep 2, 2026
Merged

Xmaster6y merged 1 commit into
Xmaster6y:mainfrom
MohammedThowfiq:codex/native-nested-key

Conversation

@MohammedThowfiq

Copy link
Copy Markdown
Contributor

Replace the internal key compatibility alias with tensordict.utils.NestedKey throughout library signatures and tests. Remove the alias from _types.py and update the file-structure reference to describe the remaining helpers. Key validation and composition behavior are unchanged.

Fixes #132.

Validation on Python 3.12.13, TensorDict 0.14.0 and PyTorch 2.13.0:

  • All configured pre-commit checks passed, including Ruff checks and formatting.
  • 537 focused tests passed across key helpers, contexts, modules, hooks, descriptions, workflows, latent methods and attribution.
  • No references to the removed alias remain in source or tests; git diff --check passed.

The full notebook/integration suite was not run.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No issues found across 19 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Auto-approved: Refactor swaps the internal UnraveledKey alias for TensorDict's NestedKey across type signatures, imports, and tests, and removes the now-unused alias definition. No behavioral change is introduced; it is a bounded, clearly beneficial cleanup backed by comprehensive tests.

Re-trigger cubic

@codecov

codecov Bot commented Sep 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.45%. Comparing base (09d5dd3) to head (df9aa61).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #134   +/-   ##
=======================================
  Coverage   98.45%   98.45%           
=======================================
  Files          54       54           
  Lines        4336     4340    +4     
=======================================
+ Hits         4269     4273    +4     
  Misses         67       67           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@Xmaster6y
Xmaster6y merged commit a1ee0c7 into Xmaster6y:main Sep 2, 2026
7 checks passed
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.

[Chore] Remove the internal UnraveledKey compatibility alias

2 participants