google-deepmind / reverb

Reverb is an efficient and easy-to-use data storage and transport system designed for machine learning research
Apache License 2.0
704 stars 92 forks source link

Various later versions of Reverb fail on import. #13

Closed jmacglashan closed 4 years ago

jmacglashan commented 4 years ago

If I use Tensorflow 2.3.0 and the latest reverb nightly, when I import reverb in Python 3.8, I get the following error.

>>> import reverb
2020-08-11 15:36:08.653570: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.10.1
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/dev/.local/lib/python3.8/site-packages/reverb/__init__.py", line 27, in <module>
    from reverb import item_selectors as selectors
  File "/home/dev/.local/lib/python3.8/site-packages/reverb/item_selectors.py", line 19, in <module>
    from reverb import pybind
  File "/home/dev/.local/lib/python3.8/site-packages/reverb/pybind.py", line 1, in <module>
    import tensorflow as _tf; from .libpybind import *; del _tf
ImportError: /home/dev/.local/lib/python3.8/site-packages/reverb/libpybind.so: undefined symbol: _ZN10tensorflow6StatusC1ENS_5error4CodeEN4absl14lts_2020_02_2511string_viewEOSt6vectorINS_10StackFrameESaIS7_EE

The last Reverb version that works for me is 0.1.0.dev20200716. Anything after that version fails in the same way.

This is within a docker instance of Ubuntu 18.04 (with some other stuff built on top). Any thoughts?

ebrevdo commented 4 years ago

If you use reverb nightly; you probably have to use tf-nightly with it. We only guarantee compatibility of reverb releases with an associated tf release.

ebrevdo commented 4 years ago

Specifically; reverb 0.1.0 is built to be compatible with tensorflow 2.3.0 and most likely when tensorflow 2.4.0 is released; we'll release an associated reverb 0.2.0 (or something like this). If you're using reverb nightlies; binary compatibility with TF releases is best effort; though we guarantee that reverb nightly is binary compatible with the tf nightly release from the same or previous night.

jmacglashan commented 4 years ago

Interesting, thanks. I'll check this out later today. I thought the 0.2.0.x might have issues with TF builds, but 0.1.0.dev20200727 also didn't work with TF 2.3.0. Is the issue there that it may have depended on a specific tf-nightly of 2.3.0.x rather than release of 2.3.0?

ebrevdo commented 4 years ago

You will need to find a version of tf-nightly either dev20200727 or dev20200726 - those should work.

As an action item we can see if we can rely on TF's C-API layer only - that one's ABI stable, but I think we have dependencies that the C-API layer doesn't cover.

On Wed, Aug 12, 2020 at 9:33 AM James MacGlashan notifications@github.com wrote:

Interesting, thanks. I'll check this out later today. I thought the 0.2.0 might have issues with TF buids, but 0.1.0.dev20200727 also didn't work with TF 2.3.0. Is the issue there that it may have depended on a specific tf-nightly of 2.3.0.x rather than release of 2.3.0?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/deepmind/reverb/issues/13#issuecomment-672981734, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANWFG2WU2RDSJJKXACV5J3SAK757ANCNFSM4P3FWC3Q .

jmacglashan commented 4 years ago

Sorry for getting back to this so late.

I can confirm that using the release 0.1.0 from dm-reverb instead of dm-reverb-nightly with the final tf 2.3.0 worked fine.

Closing.