'Distributed Anchor Tabular pickle loading issue
I am trying to pickle distributed anchor tabular and use it later. I am able to pickle it (using dill) without any issue but while loading it takes forever to load.
Here's my code:
## Creating distributed anchors for tabular data
predict_fn = lambda x: clf.predict_proba(x)
dist_explainer = DistributedAnchorTabular(predict_fn, feature_names, seed=123)
dist_explainer.fit(X_train, disc_perc=[25, 50, 75], ncpu=16)
## Paths
dist_explainer_model = f"dist_explainer_pickling_test.dill"
model_path = "../models/"
## Dumping the distributed anchors
dill.dump(dist_explainer, open(f"{model_path}{dist_explainer_model}" , 'wb'))
## Loading it back -- This takes forever
dist_explainer_reloaded = dill.load(open(f"{model_path}{dist_explainer_model}" , 'rb'))
Can someone please help me out?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
