Skip to content

Bazel test error: "ModuleNotFoundError: No module named 'view'" #3240

@ilya-kupchenko

Description

@ilya-kupchenko

I keep getting some errors related to Python 'view' module when running 'bazel test //tensorflow/lite/micro/... --test_output=errors --repo_env=PIP_FIND_LINKS=/tmp/tflm_wheels --repo_env=PIP_DEFAULT_TIMEOUT=9000'.

Not sure if this is an artifact of my system. It happens on the freshly cloned repo. I fixed it by adding a new py_library 'view_py' with the same dependencies as py_binary 'view' in '/tensorflow/lite/micro/compression/view_tests.bzl' and adding the 'view_py' dependency to the BUILD file.

Maybe I am doing something wrong.

FAIL: //tensorflow/lite/micro/compression:view_test_keyword_scrambled_8bit_tflite (see /home/ilya/.cache/bazel/_bazel_ilya/d0b9ef8c7f11755098312dae64ee4fea/execroot/tflite_micro/bazel-out/k8-fastbuild/testlogs/tensorflow/lite/micro/compression/view_test_keyword_scrambled_8bit_tflite/test.log)
INFO: From Testing //tensorflow/lite/micro/compression:view_test_keyword_scrambled_8bit_tflite:
==================== Test output for //tensorflow/lite/micro/compression:view_test_keyword_scrambled_8bit_tflite:
Traceback (most recent call last):
  File "/home/ilya/.cache/bazel/_bazel_ilya/d0b9ef8c7f11755098312dae64ee4fea/sandbox/processwrapper-sandbox/28/execroot/tflite_micro/bazel-out/k8-fastbuild/bin/tensorflow/lite/micro/compression/view_test_keyword_scrambled_8bit_tflite.runfiles/tflite_micro/tensorflow/lite/micro/compression/view_test.py", line 16, in <module>
    import view
ModuleNotFoundError: No module named 'view'
================================================================================
FAIL: //tensorflow/lite/micro/compression:view_test_person_detect_tflite (see /home/ilya/.cache/bazel/_bazel_ilya/d0b9ef8c7f11755098312dae64ee4fea/execroot/tflite_micro/bazel-out/k8-fastbuild/testlogs/tensorflow/lite/micro/compression/view_test_person_detect_tflite/test.log)
INFO: From Testing //tensorflow/lite/micro/compression:view_test_person_detect_tflite:
==================== Test output for //tensorflow/lite/micro/compression:view_test_person_detect_tflite:
Traceback (most recent call last):
  File "/home/ilya/.cache/bazel/_bazel_ilya/d0b9ef8c7f11755098312dae64ee4fea/sandbox/processwrapper-sandbox/29/execroot/tflite_micro/bazel-out/k8-fastbuild/bin/tensorflow/lite/micro/compression/view_test_person_detect_tflite.runfiles/tflite_micro/tensorflow/lite/micro/compression/view_test.py", line 16, in <module>
    import view
ModuleNotFoundError: No module named 'view'
================================================================================

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions