I was trying to install tflite-model-maker in google colab using the below code
!pip install -q tflite-model-maker
!pip install -q tflite-support
but the install runs for ever until the google colab storage becomes full.
Up until a few days back there was no problem. But now i am not able to install it due to this
Hi, I have same issue with installing model maker in colab. I try fall down the Python version to 3.9.x, but the installation is still not successful. Moreover, after the downgrade, other modules come out of compatibility error. May I know more information about the issue? Thank you.
Moreover, after the downgrade, other modules come out of compatibility error.
You can safely ignore compatibility issues as long as you can execute and complete the task. Otherwise, you should install the corresponding package using pip.
Hello, is this a permanent solution? Or are you still working on the installation problem with tflite model maker? It would be nice if that would work again. Thank you for your answer.
Hello @chunduriv, running the example you provided for mediapipe model maker give me this error:
Traceback (most recent call last):
File "c:/Users/froze/Desktop/poutses/kapota.py", line 1, in <module>
from mediapipe_model_maker import object_detector
File "C:\Users\froze\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\mediapipe_model_maker\__init__.py", line 17, in <module>
from mediapipe_model_maker.python.vision import image_classifier
File "C:\Users\froze\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\mediapipe_model_maker\python\vision\image_classifier\__init__.py", line 16, in <module>
from mediapipe_model_maker.python.vision.image_classifier import dataset
File "C:\Users\froze\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\mediapipe_model_maker\python\vision\image_classifier\dataset.py", line 21, in <module>
import tensorflow_datasets as tfds
File "C:\Users\froze\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\tensorflow_datasets\__init__.py", line 43, in <module>
import tensorflow_datasets.core.logging as _tfds_logging
File "C:\Users\froze\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\tensorflow_datasets\core\__init__.py", line 22, in <module>
from tensorflow_datasets.core import community
File "C:\Users\froze\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\tensorflow_datasets\core\community\__init__.py", line 18, in <module>
from tensorflow_datasets.core.community.huggingface_wrapper import mock_builtin_to_use_gfile
File "C:\Users\froze\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\tensorflow_datasets\core\community\huggingface_wrapper.py", line 31, in <module>
from tensorflow_datasets.core import dataset_builder
File "C:\Users\froze\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\tensorflow_datasets\core\dataset_builder.py", line 34, in <module>
from tensorflow_datasets.core import dataset_info
File "C:\Users\froze\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\tensorflow_datasets\core\dataset_info.py", line 47, in <module>
from tensorflow_datasets.core import file_adapters
File "C:\Users\froze\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\tensorflow_datasets\core\file_adapters.py", line 29, in <module>
from array_record.python import array_record_module
ImportError: cannot import name 'array_record_module' from 'array_record.python' (C:\Users\froze\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\array_record\python\__init__.py)
Traceback (most recent call last):
File "c:\Users\froze\Desktop\poutses\kapota.py", line 1, in <module>
from mediapipe_model_maker import object_detector
ImportError: cannot import name 'object_detector' from 'mediapipe_model_maker' (C:\Users\froze\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\mediapipe_model_maker\__init__.py)
I wonder if it is because im using tf-nightly. Im forced to use it cause the normal one doesnt detect my gpu
Even though you can make a conda environment in colab, it will still always use the colab runtime python version. But you can force it to use the environment by using a bash script and activate it every time you need to use it. Unfortunately this means that you can’t use cells for python code, but instead you can just have it run a python file with all the code you need to use.
I’ve got it working in this notebook. There was a few dependencies like numpy that needed a specific version installation, but after that it was working and training as you can see in the screenshot. Just make your own python file to run for training and you should be good to go.