Loading Pytorch customer models
Hello! Thank you so much for the great work!
But could you please tell me how to load a trained pytorch models .pth? I always get this error:
AttributeError: '_IncompatibleKeys' object has no attribute 'seek'. You can only torch.load from a file that is seekable. Please pre-load the data into a buffer like io.BytesIO and try to load from it instead.
Thank you!
The problem solved, but just as https://github.com/interpretml/DiCE/issues/46 says the optimisation goes into a infinite loop with the normalised dataset, but for non-normalised dataset it works well.
Hey, did you get a chance to try with posthoc_sparsity_algorithm="binary" in generate_counterfactuals()? I have tried with features taking very small values and this option was several orders of magnitude faster.
But yeah, it would be better to include @rmazzine's suggestion and an option to run sparsity correction on selected features instead of all features. Will add an option for that soon.