how to upload a tflite file to firebase test lab device via gcloud?

Viewed 97

It is known that additional files can be uploaded via the other files flag in gcloud. I am trying to use the firebase test lab performance application to check the performance of a network.

The command i run is:

gcloud firebase test android run --type=game-loop --app=bazel-bin/tensorflow/lite/tools/benchmark/experimental/firebase/android/benchmark_model_firebase.apk --device model=flame,version=29 --other-files=/data/local/tmp/graph=network1.tflite

The command crashes with the error:

ERROR: gcloud crashed (InvalidUserInputError): Could not guess mime type for network1.tflite

Is there a way to circumvent the problem or somehow pass the mime type to the command line ?

1 Answers

I found a crazy workaround. I renamed the tflite file to so so the mimetypes library gave it an octet stream mime type and everything worked.

gcloud firebase test android run --type=game-loop --app=bazel-bin/tensorflow/lite/tools/benchmark/experimental/firebase/android/benchmark_model_firebase.apk --device model=flame,version=29 --other-files=/data/local/tmp/graph=network1.so

Opened an issue in google: https://issuetracker.google.com/issues/196230363

Related