Fixed
Status Update
Comments
de...@google.com <de...@google.com> #2
We read tflite model file underneath so this IOException is for that. Although Kotlin doesn't require checked exception to be caught explicitly, we still prefer to call it out.
Another small benefit is it would make the Java and Kotlin code panel UI more consistent.
Another small benefit is it would make the Java and Kotlin code panel UI more consistent.
tn...@google.com <tn...@google.com> #3
Yes, but the tflite model should always be there, right? I mean if not the build should break.
I don't think there's any advantage to making the Java and Kotlin panels consistent -- each should present the code in the most canonical way the code is written in that language; if not it looks like we don't really know Kotlin.
de...@google.com <de...@google.com> #4
Fair enough, let me double check with the team. Thanks!
jv...@google.com <jv...@google.com> #5
tn...@google.com <tn...@google.com> #7
Excellent, thank you!
Description
The model import wizard shows code snippets for Kotlin and Java.
Here's the Kotlin example:
I'm not sure why there's an IOException to be caught here. That should only happen if there's a critical packaging error (where somehow the tensor flow model isn't part of the raw assets), right?
Kotlin doesn't have checked exceptions, so basically I would expect that the Kotlin snippets should just have the code inside the try/catch, not the try/catch itself.