-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
redefinition -> defaults kept in config
Summary: This is an internal change in the config systen. It allows redefining a pluggable implementation with new default values. This is useful in notebooks / interactive use. For example, this now works. class A(ReplaceableBase): pass registry.register class B(A): i: int = 4 class C(Configurable): a: A a_class_type: str = "B" def __post_init__(self): run_auto_creation(self) expand_args_fields(C) registry.register class B(A): i: int = 5 c = C() assert c.a.i == 5 Reviewed By: shapovalov Differential Revision: D38219371 fbshipit-source-id: 72911a9bd3426d3359cf8802cc016fc7f6d7713b
- Loading branch information
1 parent
cb49550
commit 6b48159
Showing
2 changed files
with
49 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters