Skip to content

Dag-level cache#139

Open
bkorycki wants to merge 5 commits into
mainfrom
dag-cache
Open

Dag-level cache#139
bkorycki wants to merge 5 commits into
mainfrom
dag-cache

Conversation

@bkorycki
Copy link
Copy Markdown
Contributor

Every node has its own cache but the caching mechanics are managed by the composer.

@bkorycki bkorycki requested review from rogthefrog and superdosh May 18, 2026 22:00
@bkorycki bkorycki requested a review from a team as a code owner May 18, 2026 22:00
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 18, 2026

MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅

)
self._nodes[node.name] = node
self._validated = False
if isinstance(node, CacheableComposerNode):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It looks like two things inherently go together: the node being a CacheableComposerNode and the cache_path being a path. The former without the latter is a degenerate case that should probably fail early, and the latter without the former is pointless.

Is that something worth capturing in one place, instead of having two tests of the cache object's integrity? (i.e. isinstance(node, CacheableComposerNode) and then if self._cache_path )

(unless I'm misunderstanding NullCache and it is a legitimate caching node that behaves differently from a non-caching node).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I don't think a CacheableComposerNode without a cache path is a degenerate case! If there is no cache path, then the cacheable node behaves as a regular node (the NullCache is no-op, nothing is ever written).

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