Datasets:

ArXiv:
Elron commited on
Commit
ed63e1a
1 Parent(s): 1eca22c

Upload settings_utils.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. settings_utils.py +4 -1
settings_utils.py CHANGED
@@ -67,9 +67,12 @@ class Settings:
67
  actual_key = key[:-4] # Remove the "_key" suffix
68
  return self.environment_variable_key_name(actual_key)
69
 
70
- env_value = os.getenv(self.environment_variable_key_name(key))
 
71
 
72
  if env_value is not None:
 
 
73
  return env_value
74
 
75
  if key in self._settings:
 
67
  actual_key = key[:-4] # Remove the "_key" suffix
68
  return self.environment_variable_key_name(actual_key)
69
 
70
+ key_name = self.environment_variable_key_name(key)
71
+ env_value = os.getenv(key_name)
72
 
73
  if env_value is not None:
74
+ if key in self._types:
75
+ env_value = cast_to_type(env_value, self._types[key])
76
  return env_value
77
 
78
  if key in self._settings: