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

Multipart form data not passed between chain of seldon components #1899

Closed
divyadilip91 opened this issue May 29, 2020 · 8 comments · Fixed by #1900
Closed

Multipart form data not passed between chain of seldon components #1899

divyadilip91 opened this issue May 29, 2020 · 8 comments · Fixed by #1900
Assignees
Milestone

Comments

@divyadilip91
Copy link

Hi,
I just found that form data is not passed from one seldon component to another. I have tried passing normal data of content-type "application/json" between components and it works fine,but form data doesnt seem to be transfered between seldon components.

I have two programs,one has input transformer and the other has model component. I have used transform_input_raw and predict_raw methods. I pass an audio file input with keyword "binData" . I am able to process the input in transformer and the input passed can be seen in logs...The transformer returns a dictionary containing the binary data which is to be received as input by the predict method in model.py file.But the model receives an empty dictionary and throws a key error.
PFA the method used in 2 program screenshots

image

image

Someone please do look into this and do reply

@divyadilip91 divyadilip91 added bug triage Needs to be triaged and prioritised accordingly labels May 29, 2020
@ukclivecox
Copy link
Contributor

Which version of Seldon Core are you running?

@ukclivecox
Copy link
Contributor

The content-type from the first response should be json so it should work when its passed to the second. The only reason would be if that was not the case its being kept as form-urlencoded for some reason.

@divyadilip91
Copy link
Author

Which version of Seldon Core are you running?

I am running seldon version 1.1.0

@divyadilip91
Copy link
Author

The content-type from the first response should be json so it should work when its passed to the second. The only reason would be if that was not the case its being kept as form-urlencoded for some reason.

Yes..since transform_input_raw returns a json , I ensured that the type of data returned is a dictionary..but model program with predict_raw method is not receiving the input..it received an empty dictionary

@ukclivecox
Copy link
Contributor

@divyadilip91
Copy link
Author

can you set DEBUG on your components: https://docs.seldon.io/projects/seldon-core/en/latest/analytics/log_level.html?highlight=SELDON_LOG_LEVEL#setting-log-level-in-a-python-wrapper

I also suggest testing locally.

Ok sure. I would try this and let you know.

@divyadilip91
Copy link
Author

Hi Clive,
I tried debugging by setting the log level for each container .PFA the screenshots
Logs of transformer
image

image

image

Logs of model
image

image

As you can see that transformer has the response in proper json format...but the output doesnt reach the model. The model receives an empty dictionary.

@ukclivecox
Copy link
Contributor

There does seem to be an issue that the content-type is being kept as multipart for all calls in the graph. Its a bug in how headers are handled.

@ukclivecox ukclivecox added priority/p1 and removed triage Needs to be triaged and prioritised accordingly labels May 30, 2020
@ukclivecox ukclivecox self-assigned this May 30, 2020
@ukclivecox ukclivecox added this to the 1.2 milestone May 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants