Closed njzjz closed 5 months ago
can you try the old protobuf, just pin it in the recipe to see
can you try the old protobuf, just pin it in the recipe to see
libprotobuf 3.21 has the same issue. So I am not sure what the problem is
https://github.com/tensorflow/tensorflow/pull/51450 says a similar error happens when tensorflow and protobuf use the same instance of libprotobuf. It was fixed, but it seems the issue reappears...
I confirm it is an upstream issue. I submit https://github.com/tensorflow/tensorflow/pull/62684 to fix it. Not sure what we should do for conda-forge packages.
We could rebuild.....
I patch the downstream package to load _pywrap_tensorflow_internal.so
before importing tensorflow, which could bypass this error.
# workaround to fix https://github.com/conda-forge/tensorflow-feedstock/issues/364
import ctypes
import importlib
from pathlib import (
Path,
)
module_spec = importlib.util.find_spec("tensorflow")
ctypes.CDLL(
str(Path(module_spec.origin).parent / "python" / "_pywrap_tensorflow_internal.so")
)
Should we rebuild and include this fix. I forgot about this error
Is there anything we could add to the recipe tests to ensure this is fixed?
@xhochy The code below should reproduce the error:
import tensorflow as tf
graph = tf.function(lambda x:x).get_concrete_function(1.).graph
tf.compat.v1.train.export_meta_graph(graph=graph, graph_def=graph.as_graph_def())
In a single line:
python -c "import tensorflow as tf;graph = tf.function(lambda x:x).get_concrete_function(1.).graph;tf.compat.v1.train.export_meta_graph(graph=graph,graph_def=graph.as_graph_def())"
Solution to issue cannot be found in the documentation.
Issue
I got this issue when rebuilding for TF 2.15: https://github.com/conda-forge/deepmd-kit-feedstock/pull/66
TF 2.14 or the pypi package don't have this issue, so this may be related to #361.
Installed packages
Environment info