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

Fix breakage from removal of Arduino_TensorFlowLite dependency from Library Manager #43

Merged
merged 1 commit into from
Sep 1, 2022
Merged

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented Aug 31, 2022

The "Arduino_TensorFlowLite" library is a dependency of this project.

This dependency was previously included in the Arduino Library Manager index, which was used by the project in the following ways:

  • Specified as dependency in metadata to provide automated installation along with TinyTrainable
  • Referenced by name alone in the library dependencies configuration of the "Arduino Compile" GitHub Actions workflow
  • Link to the generated library reference on arduino.cc

The library was removed from the Arduino Library Manager index at the request of the TensorFlow Lite Micro maintainers (arduino/library-registry#1748), which broke all three of the usages listed above.

That breakage is hereby repaired:

Library metadata

All libraries listed in the depends field of the library.properties metadata file must be available for installation from Library Manager. The presence of Arduino_TensorFlowLite on that list causes the library installation to 'fail with Arduino IDE 2.x, or arduino-cli lib install TinyTrainable. The library is removed from the list.

GitHub Actions workflow

The previous configuration of the "Arduino Compile" GitHub Actions workflow caused it to install the dependency from Library Manager, which will now result in a failure:

Running command: /home/runner/bin/arduino-cli lib install Arduino_TensorFlowLite 
   Error installing Arduino_TensorFlowLite: Library 'Arduino_TensorFlowLite' not found

The workflow is here adjusted to install the library by cloning the official tensorflow/tflite-micro-arduino-examples repository. Since that repository does not currently provide any tags, the workflow is configured to use the version of the library from the tip of the main branch.

Note that the library does not compile with the version of the library from the tip of the main branch of the tensorflow/tflite-micro-arduino-examples repository:

Compiling sketch: examples/check/check_buzzer
  In file included from /home/runner/Arduino/libraries/TinyTrainable/src/TinyTrainable.cpp:11:0:
  /home/runner/Arduino/libraries/TinyTrainable/src/inputs/InputGesture.h:26:10: fatal error: tensorflow/lite/version.h: No such file or directory
   #include <tensorflow/lite/version.h>
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
  compilation terminated.

The header file does not (and never did) exist in the version of the library from the tensorflow/tflite-micro-arduino-examples repository:

https://github.com/tensorflow/tflite-micro-arduino-examples/tree/main/src/tensorflow/lite

So this will need to be resolved by adjusting the TinyTrainable code, which is out of scope for this PR.

Documentation

The readme is updated to specify that the "Arduino_TensorFlowLite" library must be installed manually, and the link updated from the obsolete generated reference page to the official repository for the library, which contains manual installation instructions.

…ibrary Manager

The "Arduino_TensorFlowLite" library is a dependency of this project.

This dependency was previously included in the Arduino Library Manager index, which was used by the project in the
following ways:

- Specified as dependency in metadata to provide automated installation along with TinyTrainable
- Referenced by name alone in the library dependencies configuration of the "Arduino Compile" GitHub Actions workflow
- Link to the generated library reference on arduino.cc

The library was removed from the Arduino Library Manager index at the request of the TensorFlow Lite Micro maintainers,
which broke all three of the usages listed above.

That breakage is hereby repaired:

All libraries listed in the `depends` field of the library.properties metadata file must be available for installation
from Library Manager. The presence of Arduino_TensorFlowLite on that list causes the library installation to fail with
Arduino IDE 2.x, or `arduino-cli lib install TinyTrainable`. The library is removed from the list.

The configuration of the "Arduino Compile" GitHub Actions workflow is adjusted to install the library by cloning the
official tensorflow/tflite-micro-arduino-examples library. Since that repository does not currently provide any tags,
the workflow is configured to use the version of the library from the tip of the main branch.

The readme is updated to specify that the Arduino_TensorFlowLite library must be installed manually, and the link
updated from the obsolete generated reference page to the official repository for the library, which contains manual
installation instructions.
Copy link
Owner

@montoyamoraga montoyamoraga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@montoyamoraga montoyamoraga merged commit 98719b0 into montoyamoraga:main Sep 1, 2022
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

Successfully merging this pull request may close these issues.

2 participants