tensorflow.python.framework.errors_impl.NotFoundError: Graph ops missing from the python registry ({'Einsum'}) are also absent from the c++ registry.
I am trying to creat tensorflow-hub Module using locally saved ALBER pre-trained model and I am getting this error : tensorflow.python.framework.errors_impl.NotFoundError: Graph ops missing from the python registry ({'Einsum'}) are also absent from the c++ registry. I have: tensorflow: 1.14.0 tensorflow-hub: 0.7.0 opt-einsum= 3.1.0 I am working on MAC OS High Sierra 10.13.6
In order to expedite the trouble-shooting process, please provide a code snippet to reproduce the issue reported here. Thanks!
@rmothukuru thanks for your response. this is the code for creating module: import tensorflow_hub as hub import tensorflow as tf embed= hub.Module(“/path/to/saved/locally/pre-trained/ALBERT/Model/ALBERT_xxlarge")
this is the error that I got
Traceback (most recent call last):
File "/Users/……/python/helpers/pydev/pydevd.py", line 1741, in
I downloaded pre-trained ALBERT model from: https://tfhub.dev/google/albert_xxlarge/2?tf-hub-format=compressed
thanks.
Could reproduce the error with TF Version 1.14, TF Hub Version 0.7 and opt-einsum version 3.1.0. Here is the Gist. Thanks!
@ntaherkhani Thanks for using TF Hub!
Adding an import statement to import numpy appears to fix the immediate issue -- see this Gist.
Please take a look and comment back on this thread in case that doesn't fix the issue.
@j-grimstad thanks for your response . I imported numpy but didnt help.
@ntaherkhani
Turns out this model only works with TF 1.15 installed -- see Gist.
I'll get in contact with the model owner to make sure this is clear in the model documentation going forward. Please let me know if this fixes the issue.
@j-grimstad thanks for your solution. I upgraded my Tensorflow to 1.15 and it is working now and I can create hub Module for pre-trained ALBERT V1 and V2 models. however, when I am trying to embed the textual data and create feature vector using following code: embeddings=embed(["sample of textual data."]) I am getting error "ValueError: Signature 'default' is missing from meta graph."
@ntaherkhani
Take a closer look at the "Example Use" section in https://tfhub.dev/google/albert_xxlarge/2, specifically, you'll need to specify signatures='tokens'.
The longer form demonstration also is useful (see beginning line 54 for where to specify signature='tokens' within the larger workflow): https://github.com/google-research/google-research/blob/master/albert/run_classifier_with_tfhub.py
I'll close this bug for now, since you're running into intended errors thus far -- if you need help with error troubleshooting, you'll likely receive timelier responses on StackOverflow.
use tensorflow version 1.15
@ntaherkhani Were you able to resolve this issue ? Cant seem to find a solution for this. I tried adding signature='tokens' but it gives me a "Signature expects multiple inputs. Use a dict." error
I'm running tensorflow 1.15.4 via Docker and still get this error
Note that I do have to install tensorflow hub outside of this to run it at all.