Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deduplicating Inputs #16785

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

deduplicating Inputs #16785

wants to merge 3 commits into from

Conversation

zzstoatzz
Copy link
Collaborator

@zzstoatzz zzstoatzz commented Jan 20, 2025

closes #16773

Copy link

codspeed-hq bot commented Jan 20, 2025

CodSpeed Performance Report

Merging #16785 will not alter performance

Comparing redundant-inputs (52961f0) with main (e047607)

Summary

✅ 2 untouched benchmarks

raise TypeError("Can only subtract strings from key policies.")

# Subtract from each sub-policy; this may stack new Inputs(...) layers
new_subpolicies: list[CachePolicy] = [p - other for p in self.policies]
Copy link

@a14e a14e Jan 20, 2025

Choose a reason for hiding this comment

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

@zzstoatzz
p - other can create a new CompoundCachePolicy with nested Inputs.
This can cause unintended layering of Inputs within CompoundCachePolicy.
You might need to recursively update the exclude field for nested Inputs as well.

Perhaps at this level, it would make sense to also unpack all nested CompoundCachePolicy objects?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

hi @a14e - the initial draft was updated via #16786 - feel free to take a look now!

@github-actions github-actions bot added the bug Something isn't working label Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cache Policy. DEFAULT - "self" doesn't work
3 participants