Fix setting CLEARML_API_DEFAULT_REQ_METHOD raises an error

This commit is contained in:
allegroai 2022-12-05 11:18:12 +02:00
parent 18612aac4d
commit 1d5c118b70
2 changed files with 4 additions and 1 deletions

View File

@ -114,7 +114,7 @@ class Session(TokenManager):
if ENV_API_DEFAULT_REQ_METHOD.get(default=None):
# Make sure we update the config object, so we pass it into the new containers when we map them
self.config["api.http.default_method"] = ENV_API_DEFAULT_REQ_METHOD.get()
self.config.put("api.http.default_method", ENV_API_DEFAULT_REQ_METHOD.get())
# notice the default setting of Request.def_method are already set by the OS environment
elif self.config.get("api.http.default_method", None):
def_method = str(self.config.get("api.http.default_method", None)).strip()

View File

@ -294,6 +294,9 @@ class Config(object):
)
return value
def put(self, key, value):
self._config.put(key, value)
def to_dict(self):
return self._config.as_plain_ordered_dict()