Skip to content

encapsulate transport context#139

Merged
amirafzali merged 3 commits intomainfrom
transport-context-refactor
Mar 17, 2026
Merged

encapsulate transport context#139
amirafzali merged 3 commits intomainfrom
transport-context-refactor

Conversation

@amirafzali
Copy link
Member

@amirafzali amirafzali commented Mar 16, 2026

A refactor on transport context access to maintain encapsulation of concrete cache patterns

Introduces a type map locator pattern for TransportContext, and makes underlying caches implement TransportCache (which just ensures clear() behavior)

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Mar 16, 2026
@amirafzali amirafzali force-pushed the transport-context-refactor branch from 8a08905 to 5747b92 Compare March 16, 2026 19:19
# Client-side transport context (mirrors TorchStoreStrategy.transport_context)
self.transport_context = TransportContext()


Copy link
Member Author

Choose a reason for hiding this comment

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

Changes here are just cus I took this as an opportunity to remove MockTransportContext (which is no longer needed) and use fixtures for setup / teardown

@amirafzali amirafzali changed the base branch from comms-rdma-batch to main March 16, 2026 23:56
@amirafzali amirafzali force-pushed the transport-context-refactor branch from 21eceb0 to ee64303 Compare March 17, 2026 00:20
Copy link
Contributor

@allenwang28 allenwang28 left a comment

Choose a reason for hiding this comment

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

This PR encapsulates TransportContext by preventing implementation details of concrete cache patterns from leaking into client code. It enforces a better abstraction so consumers interact with transport caches through a consistent interface rather than accessing them directly.

@amirafzali amirafzali merged commit ce506b0 into main Mar 17, 2026
8 checks passed
@amirafzali amirafzali deleted the transport-context-refactor branch March 18, 2026 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants