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

500 is thrown when predict method is invoked #60

Open
royalnine opened this issue Jun 2, 2024 · 2 comments
Open

500 is thrown when predict method is invoked #60

royalnine opened this issue Jun 2, 2024 · 2 comments
Assignees

Comments

@royalnine
Copy link

Hi Giza

I am taking part in the gizathon and developed a model that I have deployed according to the docs. An endpoint and an agent were created in the process. However, I am getting a requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: https://endpoint-pochanga-680-4-1012eea6-7i3yxzspbq-ew.a.run.app/cairo_run when invoking the predict method of the model.

The full stack trace is:

[giza][2024-06-02 19:44:41.487] Getting logs for endpoint 250 ✅
2024-06-02T13:07:22.630118Z  INFO orion_runner: ✅ Sierra program downloaded successfully!
2024-06-02T13:07:22.630187Z  INFO orion_runner: 🚀 Server running on 0.0.0.0:8080
Default STARTUP TCP probe succeeded after 1 attempt for container "orion-runner-1" on port 8080.
The request failed because either the HTTP response was malformed or connection to the instance had an error. Additional troubleshooting documentation can be found at: https://cloud.google.com/run/docs/troubleshooting#malformed-response-or-connection-error
thread 'tokio-runtime-worker' panicked at crates/cairo_runner/src/utils.rs:16:78:
called `Result::unwrap()` on an `Err` value: FromStrError
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2024-06-02T13:08:58.008900Z  INFO orion_runner: ✅ Sierra program downloaded successfully!
2024-06-02T13:08:58.008967Z  INFO orion_runner: 🚀 Server running on 0.0.0.0:8080
Default STARTUP TCP probe succeeded after 1 attempt for container "orion-runner-1" on port 8080.
2024-06-02T14:40:30.521721Z  INFO orion_runner: ✅ Sierra program downloaded successfully!
2024-06-02T14:40:30.521788Z  INFO orion_runner: 🚀 Server running on 0.0.0.0:8080
Default STARTUP TCP probe succeeded after 1 attempt for container "orion-runner-1" on port 8080.
2024-06-02T14:40:30.557102Z ERROR orion_runner: ⛔️ Deserialize the request body failed: Error("expected `,` or `}`", line: 2, column: 82)
The request failed because either the HTTP response was malformed or connection to the instance had an error. Additional troubleshooting documentation can be found at: https://cloud.google.com/run/docs/troubleshooting#malformed-response-or-connection-error
thread 'tokio-runtime-worker' panicked at crates/cairo_runner/src/utils.rs:16:78:
called `Result::unwrap()` on an `Err` value: FromStrError
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2024-06-02T14:41:34.218334Z  INFO orion_runner: ✅ Sierra program downloaded successfully!
2024-06-02T14:41:34.218404Z  INFO orion_runner: 🚀 Server running on 0.0.0.0:8080
Default STARTUP TCP probe succeeded after 1 attempt for container "orion-runner-1" on port 8080.
2024-06-02T14:44:11.514504Z  INFO orion_runner: 🔧 Running Sierra program with request ID: d94f9ea93f004e1d8a6b9e7b5d7052a8
The error: Function expects arguments of size 2 and received 4 instead.
2024-06-02T14:44:11.734252Z ERROR orion_runner::handlers: ⛔️ Failed to run Sierra program: Function expects arguments of size 2 and received 4 instead.
2024-06-02T14:44:11.734271Z ERROR orion_runner: ⛔️ Error processing request: CairoRunnerFailed

Operating System: MacOS Sonoma 14.1

Python version: 3.11

Giza CLI/Agents-sdk version:

giza-agents==0.4.2
giza-cli==0.17.0
giza-datasets==0.3.1
giza-osiris==0.2.8
giza-sdk==0.1.2
giza-zkcook==0.2.2

Giza command used: giza endpoints logs --endpoint-id 250 after execution of the call to predict method

Python traceback: above

request_id: d94f9ea93f004e1d8a6b9e7b5d7052a8

@Gonmeso Gonmeso self-assigned this Jun 3, 2024
@royalnine
Copy link
Author

royalnine commented Jun 8, 2024

Update to this - the problem was serialisation of the parameters for the endpoint.

this error is showing in the runner "The error: Range-check validation failed, number 340282366920938463472013463322137827329 is out of valid range [0, 340282366920938463463374607431768211456]"

from discord conversation:

i think you reach this range check error because in the XGboost, all floats are multiplied by 10000. However, we should use Fixed points instead to ensure all number fit in the range . 

I will add fixed points to the XGboost implementation. 

In the meantime, you can normalize the inputs with minimax or standardnorm

@royalnine
Copy link
Author

@Gonmeso feel free to close this :)

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