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

[Bug] Documentation: Liveness Custom CDN missing wasm setup instructions #5128

Closed
4 tasks done
reesscot opened this issue Apr 3, 2024 · 3 comments · Fixed by #5130
Closed
4 tasks done

[Bug] Documentation: Liveness Custom CDN missing wasm setup instructions #5128

reesscot opened this issue Apr 3, 2024 · 3 comments · Fixed by #5130
Labels
Documentation An issue or a feature-request for our Amplify UI Doc site or AWS Amplify docs Liveness

Comments

@reesscot
Copy link
Contributor

reesscot commented Apr 3, 2024

Before creating a new issue, please confirm:

On which framework/platform are you having an issue?

React

Which UI component?

Liveness

How is your app built?

N/A

What browsers are you seeing the problem on?

No response

Which region are you seeing the problem in?

No response

Please describe your bug.

Currently the documentation for setting up a custom CDN only shows instructions for how to setup the SIMD version of the tensorflow backend.

According to the documentation, Tensorflow supports regular WASM, SIMD, and SIMD + Multithreading
https://blog.tensorflow.org/2020/09/supercharging-tensorflowjs-webassembly.html

At runtime we test for SIMD and multithreading support and serve the appropriate Wasm binary. Today we serve a different binary for each of the following cases:

Default: The runtime does not support SIMD or multithreading
SIMD: The runtime supports SIMD but not multithreading
SIMD + multithreading: The runtime supports SIMD and multithreading

Customers are reporting a problem with older iPhones on iOS 15 and 16 which don't support SIMD. We need to update the instructions to include all three files in customers' custom CDN.

What's the expected behaviour?

See above

Help us reproduce the bug!

See above

Code Snippet

// Put your code below this line.

Console log output

No response

Additional information and screenshots

No response

@github-actions github-actions bot added the pending-triage Issue is pending triage label Apr 3, 2024
@reesscot reesscot added Documentation An issue or a feature-request for our Amplify UI Doc site or AWS Amplify docs Liveness and removed pending-triage Issue is pending triage labels Apr 3, 2024
@marcosconceicao
Copy link

@reesscot Hi Scott, i don't know if is something that was solved yet but we noticed that when the files are missing the SDK doesn't throw any exception, we spent a few hours testing multiple scenarios to find the error.
Even without the Custom CDN solution, if the user has a network error when loading the model, what can we do to track those cases and also improve user experience?

@hbuchel
Copy link
Contributor

hbuchel commented Apr 9, 2024

Hi @marcosconceicao Which version of react-liveness are you using? When I test with a malformed URL for the binaryPath or to the model.json file, I can see the following errors thrown which we're throwing here. :

Error: There was an error loading the TFJS WASM backend. If you are using a custom WASM path ensure that it ends with '/' and that it is not the full URL as @tensorflow/tfjs-backend-wasm will append the wasm binary file name. Read more: https://github.com/tensorflow/tfjs/blob/master/tfjs-backend-
wasm/src/backend
_wasm. ts#L475.

Initialization of backend wasm failed

@marcosconceicao
Copy link

marcosconceicao commented Apr 10, 2024

We tested with 3.0.16.
Our folder included model.json and only one binary tfjs-backend-wasm-simd.wasm.
These other 2 files were missing: tfjs-backend-wasm-threaded-simd.wasm, tfjs-backend-wasm.wasm.

The build happened without issues, and testing with iOS 17 worked well.
When we tested with iOS 16 or iOS 15 it failed (probably due to the files missing), but no errors appeared in the screen and the console.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation An issue or a feature-request for our Amplify UI Doc site or AWS Amplify docs Liveness
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants