FileNotFoundError: Op type not registered 'SentencepieceOp' in binary running on MacBook-Air. Make sure the Op and Kernel are registered in the binary running in this process. Note that if you are loading a saved graph which used ops from tf.contrib, accessing (e.g.) `tf.contrib.resampler` should be done before importing the graph, as contrib ops are lazily registered when the module is first accessed.
You may be trying to load on a different device from the computational device. Consider setting the `experimental_io_device` option in `tf.saved_model.LoadOptions` to the io_device such as '/job:localhost'.
ERROR: Could not find a version that satisfies the requirement tensorflow-text (from versions: none)
ERROR: No matching distribution found for tensorflow-text
Additionally, I tried to load the model by
import spacy
nlp = spacy.load('xx_use_md')
which raised the error
OSError: [E050] Can't find model 'xx_use_md'. It doesn't seem to be a Python package or a valid path to a data directory.
Then, I used the command pip3 install https://github.com/MartinoMensio/spacy-universal-sentence-encoder-tfhub/releases/download/xx_use_md-0.2.1/xx_use_md-0.2.1.tar.gz#xx_use_md-0.2.1 on https://pypi.org/project/spacy-universal-sentence-encoder/0.2.1/ . Another error happened:
ERROR: Could not find a version that satisfies the requirement tensorflow==2.1.0 (from spacy-universal-sentence-encoder) (from versions: none)
ERROR: No matching distribution found for tensorflow==2.1.0
It is impossible to use the 'xx_use_md' model by import spacy or import spacy_universal_sentence_encoder in the virtualenv. However, when I tried with the same code on Colab, similar errors occurred and were resolved by installing and importing tensowflow_text.
System information
Describe the problem To use the
xx_use_md
model, I started a virtualenv.I tried to load the model by
Then, I encountered the error:
Guided by the discussion here: https://github.com/tensorflow/tensorflow/issues/38597, I tried to install
tensorflow-text
in the virtualenv via pip3, but this raised another error:Additionally, I tried to load the model by
which raised the error
Then, I used the command
pip3 install https://github.com/MartinoMensio/spacy-universal-sentence-encoder-tfhub/releases/download/xx_use_md-0.2.1/xx_use_md-0.2.1.tar.gz#xx_use_md-0.2.1
on https://pypi.org/project/spacy-universal-sentence-encoder/0.2.1/ . Another error happened:It is impossible to use the 'xx_use_md' model by
import spacy
orimport spacy_universal_sentence_encoder
in the virtualenv. However, when I tried with the same code on Colab, similar errors occurred and were resolved by installing and importingtensowflow_text
.Relevant issue: https://github.com/tensorflow/text/issues/89#issuecomment-1015848485