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

Get rid of Python script #29

Open
mikesperber opened this issue Jan 18, 2023 · 2 comments
Open

Get rid of Python script #29

mikesperber opened this issue Jan 18, 2023 · 2 comments

Comments

@mikesperber
Copy link

The presence of the Python script complicates CI as it requires having Python installed, typically another copy of TensorFlow, with the associated library-path issues etc.

It would be nice if this functionality (i.e. the call to the relevant C++ functionality) could be moved to Haskell.

@tomsmeding
Copy link
Member

The particular API used by the script is TFLiteConverter, which seems to be actually implemented in Python, and there doesn't seem to be a C++ reimplementation.

Making converter.py use Tensorflow copy in the submodules would be possible, but would require building more of Tensorflow than we currently do; TFLite can be built using cmake but the rest requires Bazel, which requires Java.

On the other hand, converter.py currently just uses the system-installed Tensorflow (absent specific measures to prevent this), which need not even be the same version as the embedded one. Fixing this might by itself be a reason to swallow the Java dependency.

@tomsmeding
Copy link
Member

The latest state: converter.py must remain a Python script, because the relevant API is only available in Python (as shown in my comment above). However, we do now build a full Tensorflow copy from the embedded TF submodule, including the Python wheel, and register that in a virtualenv that converter.py can then use. Hence we do not need any system-installed TF any more.

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

No branches or pull requests

2 participants