Change a comment

This commit is contained in:
oobabooga 2023-09-15 20:16:30 -07:00
parent 2c1b548cea
commit f5fb1ee666

View File

@ -50,10 +50,11 @@ default_req_params = {
def get_default_req_params():
return copy.deepcopy(default_req_params)
# little helper to get defaults if arg is present but None and should be the same type as default.
def default(dic, key, default):
'''
little helper to get defaults if arg is present but None and should be the same type as default.
'''
val = dic.get(key, default)
if not isinstance(val, type(default)):
# maybe it's just something like 1 instead of 1.0