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

ndarray greater than 15280 bytes #248

Closed
sathiez opened this issue Oct 8, 2018 · 14 comments
Closed

ndarray greater than 15280 bytes #248

sathiez opened this issue Oct 8, 2018 · 14 comments

Comments

@sathiez
Copy link

sathiez commented Oct 8, 2018

Hi,
I am unable to send ndarray greater than 15280 bytes.

@ukclivecox
Copy link
Contributor

Is this for gRPC or REST?

@sathiez
Copy link
Author

sathiez commented Oct 9, 2018

REST

@ukclivecox
Copy link
Contributor

Can you show the error and stack trace you are seeing from either the engine (service orchestrator) or your wrapped model?

@sathiez
Copy link
Author

sathiez commented Oct 9, 2018

Hi,
Actually, if I send a ndarray with 19000 values, I am able to get a response/messag. For any array size more than 19000, I get no response/message. I don't get any error either.

@sathiez
Copy link
Author

sathiez commented Oct 9, 2018

My request is
{"data":{"ndarray":'+str(img_array.tolist())+'}}

@ukclivecox
Copy link
Contributor

What http code do you get back, 500. Does it say anything in it?
Can you check the logs of all the docker images running your graph to check for errors?

@sathiez
Copy link
Author

sathiez commented Oct 9, 2018

Hi,
I am not getting any error message or any http code even nothing is displayed in log. Does REST have any size limit?

@ukclivecox
Copy link
Contributor

You should get some response even if its a timeout.

Do you set the REST timeout explicitly?
Are you using the API Gateway or Ambassador?

I'm not aware of particular limits in the REST API flow although the individual components may have some, such as Ambassador, Flask etc.

@sathiez
Copy link
Author

sathiez commented Oct 9, 2018

No I didn't set any timeout.
Yes I am using ambassador API Gateway

@ukclivecox
Copy link
Contributor

With Ambassador you should get a timeout if the request takes more than 3secs by default.

@sathiez
Copy link
Author

sathiez commented Oct 9, 2018

Even I am unable to receive ndarray in seldon api. But If I send a minimum number of arrays I can able to get the output properly.

@sathiez
Copy link
Author

sathiez commented Oct 9, 2018

when I use curl and send the request I get "32152" . What does it mean?

@ukclivecox
Copy link
Contributor

You'll need to give more detail on the full response.

@sathiez
Copy link
Author

sathiez commented Oct 9, 2018

req.py
import cv2
import os
img_array = cv2.imread('imgpath')
os.system('curl -H "Content-Type: application/json" -d '{"data":{"ndarray":'+str(img.tolist())+'}}' http://localhost:8080/seldon/model/api/v0.1/predictions')

It doesnt give any error message or response/http message.
when i print(os.system(curl........)) it returned only 32512.

@sathiez sathiez closed this as completed Oct 9, 2018
agrski added a commit that referenced this issue Dec 2, 2022
* WIP Use timer to trigger Envoy sync

* WIP Move to channel-based batching instead of timer

This still has significant concerns to resolve: see FIXME comments.

* Add list for model-versions pending update (i.e. batch to sync)

* Rename XDS server method to reflect semantics

This method will apply updates to the internal view on routes,
but will not sync these to Envoy as the name previously suggested.

* Add model to batch when successfully to routing rules cache

* Add method to sync batch to Envoy & update statuses

* Use time-based not event-based trigger to sync batches

Concisely, this means using time.AfterFunc instead of time.After to avoid needing to
wait on a channel within an event-triggered method.

* Remove stale channel-waiting block

* Formatting

* Rename field for intent

* Rename experiment method for consistency with model method

* Fix method not renamed in tests

* Increase default batch wait duration

* Add skeleton for xDS server benchmark

* Add type cast in benchmark

* Add helper func simulating model scheduling

This creates the necessary state for the xDS server to have routes to work with.
It is lightly adapted from the IncrementalProcessor unit tests.

* Update model-ilfecycle utility to be more realistic in benchmark

Explain lifecycle in more detail.
Allow model to be on potentially many replicas at once, rather than just one.

* Fix typo assigning non-new variable name

* Use no-op logger instead of fresh one in benchmark

* Add model state as well as sending Envoy syncs in benchmark

* Reduce scale of benchmark for preliminary testing

* Fix typo in error message

* Fix call to model store broken after merging master

* Remove explicit calls to publish model events as done implicitly by model store

* Provide event hub to model store in xDS server benchmark

* Move object constuction inside benchmarking loop

* Add helper func to set up server state for benchmarking

* Use server-creation helper function in xDS server benchmark

* Add non-nil experiment server for xDS incremental processor in benchmark

* Add wait loop until all pending events sync'd to Envoy per benchmark loop

* Fix concurrency bug: remove unnecessary calls to add model routes

The call to addTraffic() happens within modelUpdate(), which is a locked context.
Calling this method manually from outside a locked context caused concurrent modification exceptions
in the Go runtime.

* Add benchmarks for varying numbers of models

* Make batch wait duration configurable for testing

* Add batch wait duration param to xDS server benchmarks

* Add more benchmarks with varying batch sizes & replica counts

* Disable benchmarks for 10K models & 10 replicas

* Add benchmark results for xDS server

* Add whitespace to distinguish logical sections in function

* Add whitespace to distinguish logical sections in functions

* Add param to server snapshot creation for copying model details

Add param to appropriate functions in call stack for snapshot creation.
Update callers.
Update tests.

* Add interface assertions for mock model stores in tests

* Add benchmark results when not copying model details in xDS functions

* Rename benchmark results for legibility

* Use bare-bones server snapshot in Envoy syncing function in xDS server

* Add benchmark results when not copying model details in Envoy sync function

* Use bare-bones server snapshot in benchmark when simulating model scheduling

* Add benchmark results when not copying model details in benchmark simulated scheduling

* Add missing error check in xDS server benchmark

* Remove anonymous assignment in benchmark to satisfy linter

* Checkout non-batchy xDS incremental processor

* Fix xDS incremental processor & tests/benchmarks for compatibility for benchmarking

* Add benchmark results without batching or model details copying in xDS server

* Add copying of model details in xDS incremental processor

This reflects the state of the incremental processor before this branch.

* Add benchmark results without batching but with model details copying in xDS server

* Rename benchmark result to better reflect scenario

* Reintroduce inclusion of model details copying in benchmark simulation of scheduling

* Add benchmark results without batching but with model details copying in simulated scheduling

* Revert "Reintroduce inclusion of model details copying in benchmark simulation of scheduling"

This reverts commit 2bf7d557081c4a6cda56ddcdfeea82085a8453ee.

* Revert "Add copying of model details in xDS incremental processor"

This reverts commit c433fb79accf02aeea55b708effd36fbb2182d34.

* Revert "Fix xDS incremental processor & tests/benchmarks for compatibility for benchmarking"

This reverts commit 781e3787d19702daaa79f88fe7ba70825c8c0228.

* Revert "Checkout non-batchy xDS incremental processor"

This reverts commit 36014186b32b45adba92acd3c09bfd4ee53cba00.

* Reinstate 10K models, 10 replicas benchmarks
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

No branches or pull requests

2 participants