Issues importing to_dlpack from TensorFlow for NVIDIA Merlin
Asked Answered
Q

1

7

I am currently trying to build a recommender system for a project using NVIDIA Merlin with Python. As of now I have been trying to install the packages and import them into a python file on my Macbook but when I attempt to run import merlin.models.tf as mm, I receive the error ImportError: cannot import name 'to_dlpack' from 'tensorflow.python'. After looking over the Tensorflow documentation it seems like this might be an issue with the decorator on the to_dlpack function in tensorflow/python/dlpack/dlpack.py which states that to_dlpack is coming from experimental. How should I go about fixing this? Should I change the decorator locally?

Instead of messing with the local installation of Tensorflow I have instead tried to import the to_dlpack function by calling from tensorflow.python.dlpack.dlpack import to_dlpack which has returned the actual function. But would prefer to understand a more in-depth fix.

Quiles answered 25/1 at 0:44 Comment(1)
Same problem here on my mac. I believe it's related to missing nvidia stuff on MBP.Gynaecomastia
D
0

The code I believe was built to use tensorflow 2.12. So uninstall the current version:

pip install tensorlow==2.12

You are also going to need cuda 11.8 and dask[complete]==2023.1.1.

Depone answered 13/8 at 18:23 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.