IlyaTrofimov / MTopDiv

[NeurIPS 2021] Manifold Topology Divergence: a Framework for Comparing Data Manifolds
MIT License
14 stars 1 forks source link

Colab #1

Closed ethancohen123 closed 2 years ago

ethancohen123 commented 3 years ago

Hi When running example.ipynb on colab I get this error /content/ripser-plusplus/ripserplusplus/libphmap.so: cannot open shared object file: No such file or directory

Here is what I do to in my notebook to install the dependencies and run the example

!git clone https://github.com/simonzhang00/ripser-plusplus.git %cd ripser-plusplus !python setup.py install

(In here not sure if I have to go back to original folder %cd .. but it gives me the same error either way)

!git clone https://github.com/IlyaTrofimov/MTopDiv.git %cd MTopDiv !python setup.py install

import numpy as np import mtd

np.random.seed(7) P = np.random.rand(1000, 2) Q = np.random.rand(1000, 2)

barc = mtd.calc_cross_barcodes(P, Q, batch_size1 = 100, batch_size2 = 1000)

and this is where the error occurs

Thanks for the help !

IlyaTrofimov commented 2 years ago

Hi ethancohen123,

set the GPU environment first. Then install libraries:

!git clone https://github.com/simonzhang00/ripser-plusplus.git
!cd ripser-plusplus; python setup.py install
!git clone https://github.com/IlyaTrofimov/MTopDiv.git
!cd MTopDiv; python setup.py install

import numpy as np
import mtd

np.random.seed(7)
P = np.random.rand(1000, 2)
Q = np.random.rand(1000, 2)

barc = mtd.calc_cross_barcodes(P, Q, batch_size1 = 100, batch_size2 = 1000)
mtd.mtopdiv(P, Q, batch_size1 = 100, batch_size2 = 1000)

worked for me.

ethancohen123 commented 2 years ago

Hi I still get the same error above /content/ripser-plusplus/ripserplusplus/libphmap.so: cannot open shared object file: No such file or directory Here is my notebook for the test https://colab.research.google.com/drive/1B9ioGN7pw7PWiMt85gzO0ys_K34AwbeM?usp=sharing

Thank you

IlyaTrofimov commented 2 years ago

Just checked your notebook. You need to restart the runtime after the installation. It's a strange glitch in colab.

ethancohen123 commented 2 years ago

It works thanks !