Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Informative error messages in async generator and type change in GenAI exception #57

Merged
merged 6 commits into from
Jun 23, 2023

Conversation

onkarbhardwaj
Copy link
Contributor

@onkarbhardwaj onkarbhardwaj commented Jun 22, 2023

Status

READY

Description

More informative error messages in async response generator for users to see http response when they do

logging.basicConfig(level="ERROR")

Impacted Areas in Library

Async response generator

Which issue(s) does this pull-request fix?

Contributes to: #39

It is not a complete fix for #39 but gives users much more information with logging enabled. For example:

ERROR:genai.services.async_generator:Exception raised async_generate and casting : 'results', response = {'status_code': 400, 'error': 'Bad Request', 'message': '<MESSAGE>', 'extensions': {'code': 'INVALID_INPUT', 'reason': "<REASON>"}}, inputs = ['PROMPT']

Checklist

  • Automated tests exist
  • Updated Package Requirements (if required, and with maintainers' approval)
  • Local unit tests performed
  • [] Documentation exists link
  • Local pre-commit hooks performed
  • Desired commit message set as PR title and description set above
  • Link to relevant GitHub issue provided

@onkarbhardwaj onkarbhardwaj changed the title Informative error messages in async generator Informative error messages in async generator and type change in GenAI exception Jun 22, 2023
@onkarbhardwaj onkarbhardwaj marked this pull request as draft June 22, 2023 23:39
@coveralls
Copy link

Pull Request Test Coverage Report for Build 5351548055

  • 5 of 5 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.1%) to 94.275%

Totals Coverage Status
Change from base Build 5336561405: 0.1%
Covered Lines: 1021
Relevant Lines: 1083

💛 - Coveralls

src/genai/services/async_generator.py Outdated Show resolved Hide resolved
src/genai/services/async_generator.py Outdated Show resolved Hide resolved
@coveralls
Copy link

coveralls commented Jun 23, 2023

Pull Request Test Coverage Report for Build 5356094260

  • 3 of 3 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.09%) to 94.265%

Totals Coverage Status
Change from base Build 5336561405: 0.09%
Covered Lines: 1019
Relevant Lines: 1081

💛 - Coveralls

@onkarbhardwaj onkarbhardwaj marked this pull request as ready for review June 23, 2023 14:55
@jayolee jayolee self-requested a review June 23, 2023 14:55
@onkarbhardwaj onkarbhardwaj merged commit 8ff0a05 into IBM:develop Jun 23, 2023
4 checks passed
@onkarbhardwaj onkarbhardwaj deleted the fix/error-messages branch June 23, 2023 14:58
onkarbhardwaj added a commit that referenced this pull request Jun 23, 2023
* Informative error messages in async generator and type change in GenAI exception (#57)

* update greedy examples removing incompatible params (#59)

* Fix/setup cfg (#49)

* fix: including README in pypi deployment

* fix: adding build dependency and changing workflow to use it


Signed-off-by: James Sutton <james.sutton@uk.ibm.com>
Co-authored-by: Mírian Silva <mirianfrsilva@ibm.com>
Co-authored-by: James Sutton <1068763+jpwsutton@users.noreply.github.com>
moneill0 pushed a commit to moneill0/ibm-generative-ai that referenced this pull request Jun 29, 2023
* Informative error messages in async generator and type change in GenAI exception (IBM#57)

* update greedy examples removing incompatible params (IBM#59)

* Fix/setup cfg (IBM#49)

* fix: including README in pypi deployment

* fix: adding build dependency and changing workflow to use it


Signed-off-by: James Sutton <james.sutton@uk.ibm.com>
Co-authored-by: Mírian Silva <mirianfrsilva@ibm.com>
Co-authored-by: James Sutton <1068763+jpwsutton@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants