Skip to content

Dag-level cache#139

Merged
bkorycki merged 6 commits into
mainfrom
dag-cache
May 20, 2026
Merged

Dag-level cache#139
bkorycki merged 6 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 ✍️ ✅

Comment thread src/modelplane/evaluator/dag.py Outdated
)
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).

Comment thread src/modelplane/evaluator/safety.py Outdated
Copy link
Copy Markdown
Contributor

@superdosh superdosh left a comment

Choose a reason for hiding this comment

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

Very nice!

@superdosh
Copy link
Copy Markdown
Contributor

See my comment in the other PR when you get a chance before merging this one.

@bkorycki bkorycki merged commit 61e8d50 into main May 20, 2026
4 checks passed
@bkorycki bkorycki deleted the dag-cache branch May 20, 2026 23:02
@github-actions github-actions Bot locked and limited conversation to collaborators May 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants