NRCan / geo-deep-learning

Deep learning applied to georeferenced datasets
https://geo-deep-learning.readthedocs.io/en/latest/
MIT License
150 stars 50 forks source link

expected_type argument in get_key_def() doesn't do anything #476

Closed Ling-Jun closed 1 year ago

Ling-Jun commented 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. 

CharlesAuthier commented 1 year ago

Thanks to have reported that bug, we can see some place where it fail. We will need to clean and adjust our code.