-
Notifications
You must be signed in to change notification settings - Fork 910
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce a sentinel value _NO_VALUE to improve Global resolvers to s…
…upport defaults `0` or `None` (#2976) * Add None support to globals Signed-off-by: Ankita Katiyar <ankitakatiyar2401@gmail.com> * Add warning when default value is used Signed-off-by: Ankita Katiyar <ankitakatiyar2401@gmail.com> * Check keys Signed-off-by: Ankita Katiyar <ankitakatiyar2401@gmail.com> * Nok's suggestions Signed-off-by: Ankita Katiyar <ankitakatiyar2401@gmail.com> * Create the test to check the non-existing keys Signed-off-by: Nok <nok.lam.chan@quantumblack.com> * add more tests to catch case when global key is not a dict Signed-off-by: Nok <nok.lam.chan@quantumblack.com> * Fix the null test Signed-off-by: Nok <nok.lam.chan@quantumblack.com> * Introduce sentinel value _NO_VALUE Signed-off-by: Nok <nok.lam.chan@quantumblack.com> * rename test Signed-off-by: Nok <nok.lam.chan@quantumblack.com> * Improve error mesasge and raise InterpolationResolutionError when key does not exist and no default Signed-off-by: Nok <nok.lam.chan@quantumblack.com> * Fix non exist default test Signed-off-by: Nok <nok.lam.chan@quantumblack.com> * Fix test Signed-off-by: Nok <nok.lam.chan@quantumblack.com> * Use omegaconf to replace the custom resolving logic Signed-off-by: Nok <nok.lam.chan@quantumblack.com> * uncommented some tests Signed-off-by: Nok <nok.lam.chan@quantumblack.com> * Remove dead code Signed-off-by: Ankita Katiyar <ankitakatiyar2401@gmail.com> * Update error message Signed-off-by: Ankita Katiyar <ankitakatiyar2401@gmail.com> --------- Signed-off-by: Ankita Katiyar <ankitakatiyar2401@gmail.com> Signed-off-by: Nok <nok.lam.chan@quantumblack.com> Co-authored-by: Nok <nok.lam.chan@quantumblack.com>
- Loading branch information
Showing
2 changed files
with
62 additions
and
23 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