Skip to content

Error building SGNN model #9795

@jasonw247

Description

@jasonw247

Prerequisites

Please answer the following questions for yourself before submitting an issue.

  • [ y ] I am using the latest TensorFlow Model Garden release and TensorFlow 2.
  • [ y ] I am reporting the issue to the correct repository. (Model Garden official or research directory)
  • [ y ] I checked to make sure that this issue has not already been filed.

1. The entire URL of the file you are using

https://github.com/tensorflow/models/tree/master/research/seq_flow_lite

2. Describe the bug

I am unable to run the SGNN trainer or tflite examples. I receive the error:

ERROR: /home/ubuntu/models/research/seq_flow_lite/models/sgnn/BUILD:48:11: in py_library rule //models/sgnn:sgnn: target '@org_tflite_support//tensorflow_lite_support/custom_ops/python:tflite_text_api' is not visible from target '//models/sgnn:sgnn'. Check the visibility declaration of the former target if you think the dependency is legitimate
ERROR: Analysis of target '//models/sgnn:train' failed; build aborted: Analysis failed

When attempting to build. I can run SGNN by not building the tensorflow_lite_support ops, and using tf_text or the python functions at: https://github.com/tensorflow/tflite-support/blob/master/tensorflow_lite_support/custom_ops/python/tflite_text_api.py directly, but am unable to build/use the tf_text custom_operations for tflite inference.

3. Steps to reproduce

In https://github.com/tensorflow/models/tree/master/research/seq_flow_lite:

run:

bazel run -c opt models/sgnn:train -- --logtostderr --output_dir=/tmp/sgnn

(Note, the documentation states: bazel run -c opt sgnn:train -- --logtostderr --output_dir=/tmp/sgnn but the dir has been moved.)

4. Expected behavior

I expect the tflite (tf_text) operations for SGNN to be built and able to be used in the run_tflite.py example here: https://github.com/tensorflow/models/blob/master/research/seq_flow_lite/models/sgnn/run_tflite.py

5. Additional context

Result of bazel run command:

ubuntu@ip-10-22-2-134:~/models/research/seq_flow_lite$ bazel run -c opt models/sgnn:train -- --logtostderr --output_dir=/tmp/sgnn
INFO: Options provided by the client:
  Inherited 'common' options: --isatty=1 --terminal_columns=204
INFO: Reading rc options for 'run' from /home/ubuntu/models/research/seq_flow_lite/.bazelrc:
  Inherited 'common' options: --experimental_repo_remote_exec
INFO: Reading rc options for 'run' from /home/ubuntu/models/research/seq_flow_lite/.bazelrc:
  Inherited 'build' options: --define=grpc_no_ares=true --action_env=PYTHON_BIN_PATH=/usr/bin/python3 --repo_env=PYTHON_BIN_PATH=/usr/bin/python3 --python_path=/usr/bin/python3 --enable_platform_specific_config -c opt --cxxopt=-std=c++14 --cxxopt=-D_GLIBCXX_USE_CXX11_ABI=0 --auto_output_filter=subpackages --copt=-Wall --copt=-Wno-sign-compare --linkopt=-lrt -lm --cxxopt=-DNDEBUG --define=use_fast_cpp_protos=true --define=allow_oversize_protos=true --spawn_strategy=standalone -c opt --cxxopt=-D_GLIBCXX_USE_CXX11_ABI=0 --announce_rc --define=grpc_no_ares=true --noincompatible_remove_legacy_whole_archive --noincompatible_prohibit_aapt1 --enable_platform_specific_config
ERROR: /home/ubuntu/models/research/seq_flow_lite/models/sgnn/BUILD:48:11: in py_library rule //models/sgnn:sgnn: target '@org_tflite_support//tensorflow_lite_support/custom_ops/python:tflite_text_api' is not visible from target '//models/sgnn:sgnn'. Check the visibility declaration of the former target if you think the dependency is legitimate
ERROR: Analysis of target '//models/sgnn:train' failed; build aborted: Analysis failed
INFO: Elapsed time: 0.114s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (1 packages loaded, 1 target configured)
FAILED: Build did NOT complete successfully (1 packages loaded, 1 target configured)

6. System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 18.04
  • Mobile device name if the issue happens on a mobile device: N/A
  • TensorFlow installed from (source or binary): pip
  • TensorFlow version (use command below): 2.4.1
  • Python version: 3.6.9
  • Bazel version (if compiling from source): 3.5.0
  • GCC/Compiler version (if compiling from source): gcc version 7.5.0
  • CUDA/cuDNN version: 11.0
  • GPU model and memory: NVIDIA V100

Metadata

Metadata

Labels

models:researchmodels that come under research directorytype:bugBug in the code

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions