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

Adding context to class wrappers #6

Open
HamidrezaKmK opened this issue Dec 31, 2022 · 1 comment
Open

Adding context to class wrappers #6

HamidrezaKmK opened this issue Dec 31, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@HamidrezaKmK
Copy link
Collaborator

Sometimes we need to add a context to a class wrapper for calling it later on from other sections of the code:

# context can be a list of multiple contexts to consider
@dyw.dynamize(add_contexts=['torch'])
class A:
    layer = dyw.composite('nn.Linear`, in_features=10, out_features=100)
@HamidrezaKmK HamidrezaKmK added the enhancement New feature or request label Dec 31, 2022
@vahidzee
Copy link
Owner

This could also be done for each field or method as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants