question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

tensorflow_text operations not registered in BulkInferrer component

See original GitHub issue

System information

  • Have I specified the code to reproduce the issue (Yes, No): No
  • Environment in which the code is executed (e.g., Local(Linux/macOS/Windows), Interactive Notebook, Google Cloud, etc): Kubeflow
  • TensorFlow version: 2.4.1
  • TFX Version: 1.0.0rc0
  • Python version: 3.7.1

I’m trying to use the BulkInferrer component in my TFX pipeline. My model has a BERT component and this relies on tensorflow-text. Components that require this module to run i.e. the Transform and Trainer components complete successfully. The exported model is passed directly to the BulkInferrer component at which point the following error is received, Op type not registered 'RegexSplitWithOffsets' in binary . This is an operation that is imported with tensorflow-text so I feel like something is going wrong here. tensorflow-text is installed in the image using the following dockerfile:

FROM tensorflow/tfx:1.0.0rc0
WORKDIR /pipeline
COPY ./ ./
ENV PYTHONPATH="/pipeline:${PYTHONPATH}"
RUN /usr/bin/python3 -m pip install --upgrade pip
RUN pip install -r requirements.txt
RUN pip install tensorflow-text --no-dependencies
RUN python -c 'import tensorflow_text # Registers the ops.'

I see in the executor of BulkInferrer there’s this line here, this import tensorflow_text as _ should be all that is required to register the operations with tensorflow. I’ve looked at the logs of my component and I don’t see any exception raised signaling that this failed.

I’m fairly sure this isn’t a TFX version issue as I’ve experienced the same error using TFX 0.27.0.

Could anyone from the TFX team please advise where I can look to try and figure out this issue? At this point, I’m stumped, since this has worked throughout the rest of my pipeline.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:5
  • Comments:16 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jiyongjung0commented, Jun 10, 2021

tensorflow_text support in tensorflow/serving is a different story and it seems like supported. Please see https://github.com/tensorflow/serving/issues/1490

The problem in BulkInferrer is that ‘tensorflow_text’ package is not loaded well in the bulk inferrer workers although it is imported in the BulkInferrer executor.

0reactions
google-ml-butler[bot]commented, Jul 1, 2021

Are you satisfied with the resolution of your issue? Yes No

Read more comments on GitHub >

github_iconTop Results From Across the Web

The BulkInferrer TFX Pipeline Component - TensorFlow
A BulkInferrer TFX component is used to perform batch inference on unlabeled tf.Examples. It is typically deployed after an Evaluator ...
Read more >
How do I get a dataframe or database write from TFX ...
Set the BulkInferrer to write to output_examples rather than inference_result by adding a output_example_spec to the component construction.
Read more >
BERT sentiment analysis on Vertex AI using TFX - DLabs.AI
BulkInferrer component can perform batch predictions using a trained model. Resolver nodes can find artifacts from previous pipeline runs (for example previous ...
Read more >
Modify BulkInferrer Component - Google Groups
I would like to submit a RFC for modifying bulkinferrer component. Looking for feedbacks and thoughts on the below listed changes before ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found