add scikit-learn recipe and dependencies
Adding support for one of the most popular machine-learning frameworks in python.
Cool, but I get this error:
/home/neizvestnyj/<APP>/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/<APP>/armeabi-v7a/joblib/_multiprocessing_helpers.py:45: UserWarning: [Errno 38] Function not implemented. joblib will operate in serial mode
03-16 22:12:19.140 21637 22044 I python : Traceback (most recent call last):
03-16 22:12:19.140 21637 22044 I python : File "/home/neizvestnyj/<APP>/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/python3/armeabi-v7a__ndk_target_21/python3/Lib/multiprocessing/synchronize.py", line 28, in <module>
03-16 22:12:19.140 21637 22044 I python : ImportError: cannot import name 'sem_unlink' from '_multiprocessing' (/data/user/0/org.kivy.<APP>/files/app/_python_bundle/modules/_multiprocessing.cpython-38.so)
03-16 22:12:19.140 21637 22044 I python :
03-16 22:12:19.141 21637 22044 I python : During handling of the above exception, another exception occurred:
03-16 22:12:19.141 21637 22044 I python :
03-16 22:12:19.141 21637 22044 I python : Traceback (most recent call last):
03-16 22:12:19.141 21637 22044 I python : File "/home/neizvestnyj/<APP>/.buildozer/android/app/modes/skin/no_face_skin_detection.py", line 2, in <module>
03-16 22:12:19.141 21637 22044 I python : File "/home/neizvestnyj/<APP>/.buildozer/android/app/modes/skin/face_detection.py", line 3, in <module>
03-16 22:12:19.141 21637 22044 I python : File "/home/neizvestnyj/<APP>/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/<APP>/armeabi-v7a/sklearn/__init__.py", line 80, in <module>
03-16 22:12:19.141 21637 22044 I python : File "/home/neizvestnyj/<APP>/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/<APP>/armeabi-v7a/sklearn/base.py", line 21, in <module>
03-16 22:12:19.141 21637 22044 I python : File "/home/neizvestnyj/<APP>/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/<APP>/armeabi-v7a/sklearn/utils/__init__.py", line 23, in <module>
03-16 22:12:19.142 21637 22044 I python : File "/home/neizvestnyj/<APP>/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/<APP>/armeabi-v7a/sklearn/utils/class_weight.py", line 7, in <module>
03-16 22:12:19.142 21637 22044 I python : File "/home/neizvestnyj/<APP>/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/<APP>/armeabi-v7a/sklearn/utils/validation.py", line 21, in <module>
03-16 22:12:19.142 21637 22044 I python : File "/home/neizvestnyj/<APP>/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/<APP>/armeabi-v7a/joblib/__init__.py", line 120, in <module>
03-16 22:12:19.142 21637 22044 I python : File "/home/neizvestnyj/<APP>/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/<APP>/armeabi-v7a/joblib/parallel.py", line 30, in <module>
03-16 22:12:19.142 21637 22044 I python : File "/home/neizvestnyj/<APP>/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/<APP>/armeabi-v7a/joblib/externals/loky/__init__.py", line 11, in <module>
03-16 22:12:19.142 21637 22044 I python : File "/home/neizvestnyj/<APP>/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/<APP>/armeabi-v7a/joblib/externals/loky/backend/__init__.py", line 13, in <module>
03-16 22:12:19.142 21637 22044 I python : File "<frozen zipimport>", line 259, in load_module
03-16 22:12:19.142 21637 22044 I python : File "/home/neizvestnyj/<APP>/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/python3/armeabi-v7a__ndk_target_21/python3/Lib/multiprocessing/synchronize.py", line 30, in <module>
03-16 22:12:19.142 21637 22044 I python : ImportError: This platform lacks a functioning sem_open implementation, therefore, the required synchronization primitives needed will not function, see issue 3770.
joblib/multiprocessing functionality of sklearn does not work due to the sem_open issue.
I tested this and it seems to work fine! Although, joblib still throws the warning that it will run in serial mode. Perhaps sklearn version can be bumped also to 1.x?
Thank you @mzakharo
Move to ndk 23 in develop branch breaks fortran build. Not sure how to overvome this.
On Sat, Jun 4, 2022, 1:13 PM Nemanja Milosevic @.***> wrote:
I tested this and it seems to work fine! Although, joblib still throws the warning that it will run in serial mode. Perhaps sklearn version can be bumped also to 1.x?
Thank you @mzakharo https://github.com/mzakharo
— Reply to this email directly, view it on GitHub https://github.com/kivy/python-for-android/pull/2539#issuecomment-1146652159, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEKUO4TZEHBPFTOCEGCBNLVNOFCZANCNFSM5L6V5R3A . You are receiving this because you were mentioned.Message ID: @.***>
Move to ndk 23 in develop branch breaks fortran build. Not sure how to overvome this. …
Yeah, unfortunately even if I tried, FORTRAN support on Android with the new build tools (which does not have GCC support) is hard. See: https://github.com/kivy/python-for-android/pull/2550#issuecomment-1090604078
Maybe we can talk about an "alternative" way to support it on python-for-android? (Like keeping support for NDK 19c even if not marked as "recommended")
Edit: Feel free to ping me for a chat on Discord #dev channel
https://github.com/kivy/python-for-android/pull/2615 for scipy/lapack hopefully overcomes the limitations of the latest NDK releases