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

Share dependency implementaiton between dependency and python.installation.dependency #14199

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

dcbaker
Copy link
Member

@dcbaker dcbaker commented Jan 28, 2025

This is the second reduced series from #13995.

This small series the function annotations are brought in line with the existing typed_kwargs call, and the dependency kwargs are moved to a shared location so the python dependency can share them.

This also attempts to handle one of the issues that has vexed me about this work, which is keeping a single source of truth for the IR classes. The interpreter provides defaults for all arguments, all the time. We also have defaults in the IR initializers, which means there's a moving source of truth (just look at CustomTarget). I've attempted to solve this by using the shared DEPENDENCY_KWS to fill in default values for dependency, which gives us a single source of truth. It does lead to a bit of ugly imports, but I like the result.

@dcbaker dcbaker requested a review from jpakkane as a code owner January 28, 2025 18:34
Because we're going to have None once we move to more typed_kwargs
We're going to use this in the Python module as well.
Otherwise we run into issues where the key doesn't match when some
values are empty and others are not.
@dcbaker dcbaker force-pushed the submit/dependency-share-implementation branch from cf4854a to 0af7113 Compare January 28, 2025 20:40
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.

1 participant