motiwari / BanditPAM

BanditPAM C++ implementation and Python package
MIT License
647 stars 38 forks source link

cannot pickle 'banditpam.KMedoids' object #243

Open afaghiri opened 1 year ago

afaghiri commented 1 year ago

Hi,

When I try to save banditpam.KMedoids object using pickle I get this error:

"TypeError: cannot pickle 'banditpam.KMedoids' object"

Any idea what might be causing this issue?

motiwari commented 1 year ago

@Adarsh321123 could you take a look?

Adarsh321123 commented 1 year ago

Hi @afaghiri. Apologies for the late response. It seems that pickling a banditpam.KMedoids object is non-trivial since we use Python bindings (through the pybind11 library) of existing C++ code. Can you please let me know if adapting the material here helps?: https://pybind11.readthedocs.io/en/latest/advanced/classes.html#pickling-support.

Adarsh321123 commented 1 year ago

Hi @afaghiri. I just wanted to follow up on this! Please let me know if you need any more assistance.