Closed Ling-Jun closed 1 year ago
the expected_type in get_key_def() function may not have the intended behaviour (assume it's forcing the return value to have the expected_type),
for example: learning_rate = get_key_def(['training', 'lr'], cfg, default=None, expected_type=str) would return a float and not raise any exception.
Thanks to have reported that bug, we can see some place where it fail. We will need to clean and adjust our code.
the expected_type in get_key_def() function may not have the intended behaviour (assume it's forcing the return value to have the expected_type),
for example: learning_rate = get_key_def(['training', 'lr'], cfg, default=None, expected_type=str) would return a float and not raise any exception.