Skip to content

Commit

Permalink
Improving error message formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
drylks committed Mar 19, 2021
1 parent dd2bec5 commit bc2d26d
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

A Powerful Serverless Analysis Toolkit That Takes *Trial And Error* Out of Machine Learning Projects
====================================================================================================
.. image:: https://img.shields.io/badge/license-AGPLv3%2B-blue
.. image:: https://img.shields.io/badge/license-GPLv3%2B-blue
:alt: License
:target: https://www.gnu.org/licenses/agpl-3.0.en.html
.. image:: https://img.shields.io/pypi/v/kxy.svg
Expand Down
8 changes: 4 additions & 4 deletions kxy/post_learning/improvability.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ def data_driven_improvability(data_df, target_column, new_variables, problem_typ
try:
response = api_response.json()
if 'message' in response:
logging.error('%s' % response['message'])
logging.error('\n%s' % response['message'])
except:
logging.error('Data-driven improvability failed. Last HTTP code: %s' % api_response.status_code)
logging.error('\nData-driven improvability failed. Last HTTP code: %s' % api_response.status_code)

return None

Expand Down Expand Up @@ -276,9 +276,9 @@ def model_driven_improvability(data_df, target_column, prediction_column, proble
try:
response = api_response.json()
if 'message' in response:
logging.error('%s' % response['message'])
logging.error('\n%s' % response['message'])
except:
logging.error('Model-driven improvability failed. Last HTTP code: %s' % api_response.status_code)
logging.error('\nModel-driven improvability failed. Last HTTP code: %s' % api_response.status_code)

return None

Expand Down
4 changes: 2 additions & 2 deletions kxy/post_learning/model_explanation.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,9 @@ def model_explanation(data_df, prediction_column, problem_type):
try:
response = api_response.json()
if 'message' in response:
logging.error('%s' % response['message'])
logging.error('\n%s' % response['message'])
except:
logging.error('Model explanation failed. Last HTTP code: %s, Content: %s' % (api_response.status_code, api_response.content))
logging.error('\nModel explanation failed. Last HTTP code: %s, Content: %s' % (api_response.status_code, api_response.content))

return None

Expand Down
4 changes: 2 additions & 2 deletions kxy/pre_learning/achievable_performance.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,9 @@ def data_valuation(data_df, target_column, problem_type):
try:
response = api_response.json()
if 'message' in response:
logging.error('%s' % response['message'])
logging.error('\n%s' % response['message'])
except:
logging.error('Data valuation failed. Last HTTP code: %s' % api_response.status_code)
logging.error('\nData valuation failed. Last HTTP code: %s' % api_response.status_code)

return None

Expand Down
4 changes: 2 additions & 2 deletions kxy/pre_learning/variable_selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ def variable_selection(data_df, target_column, problem_type):
try:
response = api_response.json()
if 'message' in response:
logging.error('%s' % response['message'])
logging.error('\n%s' % response['message'])
except:
logging.error('Variable selection failed. Last HTTP code: %s, Content: %s' % (api_response.status_code, api_response.content))
logging.error('\nVariable selection failed. Last HTTP code: %s, Content: %s' % (api_response.status_code, api_response.content))

return None

0 comments on commit bc2d26d

Please sign in to comment.