-
Notifications
You must be signed in to change notification settings - Fork 748
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
tflite_micro python package with signal ops #2358
base: main
Are you sure you want to change the base?
Conversation
Add signal operations to the python package.
Does the CI require a rebase instead of a merge? |
No, merge is fine. |
@ericheim - Just as an FYI, I'm interested in merging this, just working out the ramifications of pinning against a specific version of the tensorflow. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ericheim, thanks for this! A few comments:
- The
signal
subpackage should be brought into the public API of thetflite_micro
package via/python/tflite_micro/__init__.py
, like the other subpackages, so it can be addressed astflite_micro.signal
. Without this, it's deeply buried by default at the ugly pathtflite_micro.python.tflite_micro.signal
. - There should be tests which exercise
signal
from an environment where the package is installed. Please see/python/tflite_micro/whl_test.sh
and expand on that idea. The integration tests don't need to revalidate aspects already covered by the unit tests. However, they should cover aspects unique to usingsignal
in an installed environment, as opposed to thebazel
environment. (E.g., to make sure modules are found at their installed paths, that addressing astflite_micro.signal
doesn't break things, that nothing was left out of the package, etc.).
Hi @rkuester , @rascani Thanks for your feedback! @rascani The pinning of the tensorflow version can probably be done somehwere in a central place. |
Understood, but we have to consider that not all users will be using the same tensorflow version. As I understand it, TF doesn't have any ABI stability guarantees between minor versions (and we're depending on C++ code), so this essentially requires all users to use 2.12. That might be okay, but we need to figure out what the policy should be for this version. |
f66395d
to
c5e43e0
Compare
I extended the Adding more code into the existing init files, e.g. directly adding the directories to |
Thanks for adding the test, @ericheim. I'm working on the import name issue. You're right, adding a subpackage to the public API via the |
@rkuester Thanks for taking care of the import name issue! |
"This PR is being marked as stale due to inactivity. Remove label or comment to prevent closure in 5 days." |
"This PR is being closed because it has been marked as |
"This PR is being marked as stale due to inactivity. Remove label or comment to prevent closure in 5 days." |
Resolved merge conflict. The solution still has to be pinned against a specific tensorflow version. |
"This PR is being marked as stale due to inactivity. Remove label or comment to prevent closure in 5 days." |
BUG=#2357
Description
The proposed solution includes
signal_ops
to the tflite_micro python package. Adding signal_ops introduces a linker dependency to the specific tensorflow-cpu version the tflite_micro package was build against. E.G. when the python package was build against tensorflow-cpu==2.12.0, the version that is used in the requirements.txt, the signal ops will only be able to work when tensorflow=2.12.0 is installed on the system. Tested the build with up to version 2.15.0Possible improvements
I added the tensorflow target version (2.12.0) to the requirements of the WHEEL and
third_party/python_requirements.in
. This should probably be done somewhere at a central place. Feedback is welcomed.