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

Fixing Alibi Detect Server response cloud event data is json marshalled string #3907

Merged
merged 5 commits into from
Feb 3, 2022

Conversation

SachinVarghese
Copy link
Contributor

@SachinVarghese SachinVarghese commented Feb 1, 2022

Albi Detect Server logs the detector response to a configured replyURL as a cloud event. The data in the cloud event at the moment is a stringified json sting, for example if the model response is

{
	"data": {
		"outlier": {
			"is_outlier": [1]
		}
	}
}

then the binary could event data is

 b`"{\"data":{\"outlier":{\"is_outlier\":[1]}}}"`

This is because the reponse dict is converted to a json string twice using json.dumps method. This PR removes the extra string convertion, so that the expected binary cloud event data is

 b`{"data":{"outlier":{"is_outlier":[1]}}}`

Note that the detect server response remains the same and the test is updated only for the replyURL cloud event.

@seldondev seldondev added size/S and removed size/XS labels Feb 2, 2022
@SachinVarghese SachinVarghese changed the title WIP: Fixing Alibi Detect Server response cloud event data is json marshalled string Fixing Alibi Detect Server response cloud event data is json marshalled string Feb 2, 2022
@SachinVarghese SachinVarghese marked this pull request as ready for review February 2, 2022 12:04
@SachinVarghese
Copy link
Contributor Author

/test integration

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Copy link
Contributor

@axsaucedo axsaucedo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one - notebook and upgrading.md looks good

@axsaucedo axsaucedo merged commit f8e08f7 into SeldonIO:master Feb 3, 2022
@seldondev
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: axsaucedo

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants