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

Ensure request is chained before payload is logged #4301

Merged
merged 3 commits into from
Sep 5, 2022

Conversation

adriangonz
Copy link
Contributor

What this PR does / why we need it:
Ensure responsed is chained to the next request before logging the request. Otherwise, we will log as "request" the response from the previous model in the inference graph. In the V2 payload, since the request and response have different fields, this currently ends up in an error later on at the request logger.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

@seldondev seldondev added size/S and removed size/XS labels Aug 26, 2022
@@ -228,7 +228,6 @@ github.com/jstemmer/go-junit-report
github.com/jtolds/gls
github.com/julienschmidt/httprouter
github.com/jung-kurt/gofpdf
github.com/kedacore/keda
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this from a missed license run from a different PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It seems that way. Either that, or some subdep got updated. The linter failed within the GH Action, and re-generating the licenses file locally fixed it.

@@ -100,6 +100,11 @@ func (p *PredictorProcess) transformInput(node *v1.PredictiveUnit, msg payload.S
modelName := p.getModelName(node)

if callModel || callTransformInput {
msg, err := p.Client.Chain(p.Ctx, modelName, msg)
Copy link
Contributor

Choose a reason for hiding this comment

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

This makes sense, also for the Tensorflow protocol - thinking it may be worth also implementing this for the transformOutput method?

Copy link
Contributor

Choose a reason for hiding this comment

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

Here if the chain function fails and throws an error, the message will not be logged, is that a concern?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good spot @axsaucedo , just added the same for transformOutput.

@SachinVarghese that's a good point. Although if the chaining fails, the request will also fail. Should we log the request if we know it's gonna fail?

Copy link
Contributor

Choose a reason for hiding this comment

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

I had a look at this again, current behavior seems to be good.

@axsaucedo
Copy link
Contributor

/test integration

@seldondev
Copy link
Collaborator

@adriangonz: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
integration 2a5414a link /test integration

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the jenkins-x/lighthouse repository. I understand the commands that are listed here.

Copy link
Contributor

@SachinVarghese SachinVarghese left a comment

Choose a reason for hiding this comment

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

LGTM

@seldondev
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: SachinVarghese

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

@seldondev
Copy link
Collaborator

Failed to merge this PR due to:

failed merging [4301]: [Method Not Allowed]

3 similar comments
@seldondev
Copy link
Collaborator

Failed to merge this PR due to:

failed merging [4301]: [Method Not Allowed]

@seldondev
Copy link
Collaborator

Failed to merge this PR due to:

failed merging [4301]: [Method Not Allowed]

@seldondev
Copy link
Collaborator

Failed to merge this PR due to:

failed merging [4301]: [Method Not Allowed]

@axsaucedo axsaucedo merged commit 4b4b5ca into SeldonIO:master Sep 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants