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

Updating request-response logging structure #886

Merged
merged 1 commit into from
Sep 26, 2019

Conversation

SachinVarghese
Copy link
Contributor

Update Request Logger for Text, Image, Tabular prefix
Related to https://github.com/SeldonIO/seldon-deploy/issues/460

@seldondev
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: ryandawsonuk

If they are not already assigned, you can assign the PR to them by writing /assign @ryandawsonuk in a comment when ready.

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

@SachinVarghese
Copy link
Contributor Author

New log format

{
	"request": {
		"dataType": "tabular",
		"tabular": {
			"meta": {
				"puid": "45q10f52lodc0sqb86udsvn7a7"
			},
			"data": {
				"names": ["Age", "Workclass", "Education", "Marital Status", "Occupation", "Relationship", "Race", "Sex", "Capital Gain", "Capital Loss", "Hours per week", "Country"],
				"ndarray": [
					[22.0, 7.0, 1.0, 1.0, 1.0, 1.0, 4.0, 1.0, 2174.0, 0.0, 40.0, 4.0]
				]
			},
			"dataType": "tabular"
		}
	},
	"response": {
		"dataType": "tabular",
		"tabular": {
			"meta": {
				"puid": "45q10f52lodc0sqb86udsvn7a7",
				"requestPath": {
					"income-default": "seldonio/sklearnserver_rest:0.2"
				}
			},
			"data": {
				"names": ["t:0", "t:1"],
				"ndarray": [
					[1.0, 0.0]
				]
			},
			"dataType": "tabular"
		}
	},
	"sdepName": "income",
	"namespace": "default",
	"request_elements": {
		"Age": [22.0],
		"Workclass": [7.0],
		"Education": [1.0],
		"Marital Status": [1.0],
		"Occupation": [1.0],
		"Relationship": [1.0],
		"Race": [4.0],
		"Sex": [1.0],
		"Capital Gain": [2174.0],
		"Capital Loss": [0.0],
		"Hours per week": [40.0],
		"Country": [4.0]
	},
	"response_elements": {
		"t:0": [1.0],
		"t:1": [0.0]
	}
}

@ryandawsonuk
Copy link
Contributor

ryandawsonuk commented Sep 26, 2019

This is definitely an improvement. It should resolve the problem we were having that if we ran a request with tabular float data first then fields could be inferred by elastic as float type and this would then lead to failures on a request for a string/text type.

There might in the future be a risk where two different models use tabular data and a field has the same name but a different type. That could lead to another type conflict. But that is much less likely and if were to happen then renaming one of the fields would address it.

@ryandawsonuk ryandawsonuk merged commit 45f52e2 into SeldonIO:master Sep 26, 2019
@SachinVarghese SachinVarghese deleted the request-logger branch September 26, 2019 10:58
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.

3 participants