-
Notifications
You must be signed in to change notification settings - Fork 139
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
[Desktop] MacOS support #87
Conversation
@PaulTR all examples are verified to run on M1 Pro. Currently, I am using a TF Lite binary locally build via Make. It would be nice if the libraries for desktop could be hosted somewhere (or is there already a place for this?). Given the binaries I will check / add support for Linux / Windows. Maybe support via WASM via web would also be possible. |
Can you share the files with [email protected]? I can find a place to host them and can link to them in the docs. Thanks! |
Also can you run |
Basically ran into this issue: [!] Flutter (Channel stable, 3.10.3, on macOS 13.4 22F66 darwin-arm64, locale en) fixed with |
Thanks for the feedback. I will do so in the coming days. |
@PaulTR I ran |
I shared a google drive folder with the email you gave me. Notes:
|
Looks like there's a few things breaking when CI runs :) I also received your files, but am asking internally if we have official 'source of truth' files that we host somewhere first just so we're not duplicating efforts and potentially building with the wrong thing. Will keep you posted. |
Alright so you'll have to forgive my ignorance a bit here - how are the binaries used for this? Is it something every dev will need when using the plugin for MacOS, or just for building the plugin? And can you put in documentation for both use-cases in your main readme? :) I'm assuming it's something every dev on MacOS would need based on your initial comment, which makes this a bit more difficult, but also I really hate the idea of us having to say just go out and read this massive document to make it work. Basically the eng team for TFLite said they expect users to build their own binaries any time they need them, so I want to make sure I understand the whole situation before advocating for a solution. Thanks! |
With the CI I can take a look but it seems really weird that it says all those things are not defined. But I am not sure when I would get around to this. |
No worries, happy if I can contribute back to make TF a bit greater!
To be honest, I think it would be a bad idea to make every user build their own version using CMake or bazel. I opened an issue how to build TF Lite using CMake on windows and their is still no answer, thus I cannot / do not know how to build on Windows (tensorflow/tensorflow#55970).
I would like if either |
fixed the |
@PaulTR It would be nice if we could agree on a way to distribute and include the TF Lite binaries on desktop. How about using the same approach as the flutter docs recommend? It is slightly more effort on the first setup, but the libraries can be chosen by the user. |
Yeah I think that test went in during this PR being written. I'll read over that documentation on Monday and get back to you. Thanks! |
So I brought up hosting the binaries and got some pushback. I do think our best bet right now is giving people directions for building them if they want desktop support, unfortunately. I'm guessing it shouldn't be too difficult from the documentation I've seen, but it's definitely not ideal. I'm kind of under the impression that desktop won't be a very commonly used feature, but super valuable to those that need it, so the extra step shouldn't be a blocker. |
Does that mean I should remove RL completely? |
Yeah it doesn't need to be in this PR since it's going in under another (RL shouldn't be in yours is my guess, it exists in that folder because I pulled a separate PR to test, then it leaves the empty directories) |
Will check the new examples today, and update the check list at the beginning. I will add the tf lite binary in Xcode as a relative path to a folder called tf_lite_plugin
This way the examples should work by just adding the binary in the main folder. If this is not desired let me know. |
Having devs add the binary to the folder sounds like a good plan to me. Thanks! |
The text classification example already has the desktop binaries included. Is there a reason for that? |
Need to revise this, that does not work on win / lin therefore gonna add a blobs folder to each example (for some reason text classification already has it). |
Oof, so it is. No reason - that's an oversight that I'll fix after this merge. |
I guess the problem is again about me not using the newest flutter version. But I cannot currently change the version. |
No worries. I'm going to merge this one and try to fix it on my side since I have a little downtime right now before leaving Europe. Thanks for sticking through on this and getting it made, it's a huge addition! |
Thank you for your effort. I am currently on vacation for the next 3 weeks. Therefore, I cannot do much. However, when this landed and I am back, I will work on windows and Linux support. |
This PR should add desktop MacOS support.
Environment:
Changes:
Todo:
Notes:
Progress: