Add scikit-learn support (joblib) and xgboost support

This commit is contained in:
allegroai
2019-07-31 00:30:12 +03:00
parent 1bb06c0190
commit 19c5f05912
15 changed files with 403 additions and 40 deletions

View File

@@ -144,7 +144,11 @@ class Session(TokenManager):
# update api version from server response
try:
api_version = jwt.decode(self.token, verify=False).get('api_version', Session.api_version)
token_dict = jwt.decode(self.token, verify=False)
api_version = token_dict.get('api_version')
if not api_version:
api_version = '2.2' if token_dict.get('env', '') == 'prod' else Session.api_version
Session.api_version = str(api_version)
except (jwt.DecodeError, ValueError):
pass