{"action":"created","issue":{"url":"https://api.github.com/repos/marcotcr/lime/issues/126","repository_url":"https://api.github.com/repos/marcotcr/lime","labels_url":"https://api.github.com/repos/marcotcr/lime/issues/126/labels{/name}","comments_url":"https://api.github.com/repos/marcotcr/lime/issues/126/comments","events_url":"https://api.github.com/repos/marcotcr/lime/issues/126/events","html_url":"https://github.com/marcotcr/lime/issues/126","id":280272015,"number":126,"title":"Saving an Explainer","user":{"login":"ryanhalabi","id":7678249,"avatar_url":"https://avatars1.githubusercontent.com/u/7678249?v=4","gravatar_id":"","url":"https://api.github.com/users/ryanhalabi","html_url":"https://github.com/ryanhalabi","followers_url":"https://api.github.com/users/ryanhalabi/followers","following_url":"https://api.github.com/users/ryanhalabi/following{/other_user}","gists_url":"https://api.github.com/users/ryanhalabi/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanhalabi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanhalabi/subscriptions","organizations_url":"https://api.github.com/users/ryanhalabi/orgs","repos_url":"https://api.github.com/users/ryanhalabi/repos","events_url":"https://api.github.com/users/ryanhalabi/events{/privacy}","received_events_url":"https://api.github.com/users/ryanhalabi/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-12-07T20:42:22Z","updated_at":"2017-12-07T20:51:37Z","closed_at":"2017-12-07T20:51:37Z","author_association":"NONE","body":"Is there a way to save an explainer object so it can be loaded later without needing to build it against the full dataset?\r\n\r\nI've tried pickling it but it returns \r\n\r\n```\r\nexplainer = lime.lime_tabular.LimeTabularExplainer( np.array(X), feature_names=X.columns, class_names=['x', 'y'], discretize_continuous=True)\r\n\r\nwith open('explainer.pkl', 'wb') as f:\r\n    pickle.dump( explainer , f, pickle.HIGHEST_PROTOCOL)\r\n```\r\n```\r\nAttributeError                            Traceback (most recent call last)\r\n<ipython-input-90-9e7a99eff9e4> in <module>()\r\n      1 with open('explainer.pkl', 'wb') as f:\r\n----> 2     pickle.dump( explainer , f, pickle.HIGHEST_PROTOCOL)\r\n\r\nAttributeError: Can't pickle local object 'BaseDiscretizer.__init__.<locals>.<lambda>'\r\n```"},"comment":{"url":"https://api.github.com/repos/marcotcr/lime/issues/comments/350090641","html_url":"https://github.com/marcotcr/lime/issues/126#issuecomment-350090641","issue_url":"https://api.github.com/repos/marcotcr/lime/issues/126","id":350090641,"user":{"login":"marcotcr","id":698010,"avatar_url":"https://avatars3.githubusercontent.com/u/698010?v=4","gravatar_id":"","url":"https://api.github.com/users/marcotcr","html_url":"https://github.com/marcotcr","followers_url":"https://api.github.com/users/marcotcr/followers","following_url":"https://api.github.com/users/marcotcr/following{/other_user}","gists_url":"https://api.github.com/users/marcotcr/gists{/gist_id}","starred_url":"https://api.github.com/users/marcotcr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcotcr/subscriptions","organizations_url":"https://api.github.com/users/marcotcr/orgs","repos_url":"https://api.github.com/users/marcotcr/repos","events_url":"https://api.github.com/users/marcotcr/events{/privacy}","received_events_url":"https://api.github.com/users/marcotcr/received_events","type":"User","site_admin":false},"created_at":"2017-12-07T20:51:37Z","updated_at":"2017-12-07T20:51:37Z","author_association":"OWNER","body":"use [dill](https://pypi.python.org/pypi/dill). See also #98, #61"}}
{"actor":{"display_login":"marcotcr"}}