-
Notifications
You must be signed in to change notification settings - Fork 4
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
get_value resource exhausted #76
Comments
Or the library should handle the error more elagantly by for example catching the RESOURCE_EXHAUSTED error and falling back to reconstructing the value with get_value_at_indices calls by itself. |
Yes I think we should fall back to a streaming method if the message size is exceeded. |
The list flood model has a lot of nans adding compression support can give a intermediate fix. See https://grpc.github.io/grpc/python/grpc.html?highlight=compression#grpc.insecure_channel for Python client support. |
I think this is probably the best option for now. Can you pass this option to grpc4bmi already in some way? Or do we need an update to grpc4bmi? |
Nevermind turning on compression results in same error: import grpc
from grpc4bmi.bmi_grpc_client import BmiClient
model = BmiClient(grpc.insecure_channel("localhost:55555", compression=grpc.Compression.Deflate))
from grpc4bmi.reserve import reserve_values
varname = model.get_output_var_names()[0]
client = model
client.get_value(varname, reserve_values(client, varname)) |
To not have to rebuild the Docker images with grpc4bmi I will implement it client side only using indices to chunk the value. |
v0.2.8 and v0.3.1 have get_value which does chunking when needed. |
For lisflood we have a global model with
To get the discharge I use
which results in an error
Using
get_value_at_indices
I am able to fetch 500k blocks anything more gives same error.It would be nice if the
get_value()
andget_value_at_indices()
had streaming implementation now I have to iterate (11x) myself.The text was updated successfully, but these errors were encountered: