{"action":"closed","issue":{"url":"https://api.github.com/repos/datamade/dedupe/issues/458","repository_url":"https://api.github.com/repos/datamade/dedupe","labels_url":"https://api.github.com/repos/datamade/dedupe/issues/458/labels{/name}","comments_url":"https://api.github.com/repos/datamade/dedupe/issues/458/comments","events_url":"https://api.github.com/repos/datamade/dedupe/issues/458/events","html_url":"https://github.com/datamade/dedupe/issues/458","id":146394213,"number":458,"title":"dedupe v 1.4.0 breaks initializing with sample data","user":{"login":"wleftwich","id":447647,"avatar_url":"https://avatars.githubusercontent.com/u/447647?v=3","gravatar_id":"","url":"https://api.github.com/users/wleftwich","html_url":"https://github.com/wleftwich","followers_url":"https://api.github.com/users/wleftwich/followers","following_url":"https://api.github.com/users/wleftwich/following{/other_user}","gists_url":"https://api.github.com/users/wleftwich/gists{/gist_id}","starred_url":"https://api.github.com/users/wleftwich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wleftwich/subscriptions","organizations_url":"https://api.github.com/users/wleftwich/orgs","repos_url":"https://api.github.com/users/wleftwich/repos","events_url":"https://api.github.com/users/wleftwich/events{/privacy}","received_events_url":"https://api.github.com/users/wleftwich/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-06T18:17:07Z","updated_at":"2016-04-11T20:49:33Z","closed_at":"2016-04-11T20:49:33Z","body":"In verson 1.4.0, a Dedupe instance initialized with an optional data sample raises an error when its train() method is called:\r\n\r\n```\r\nFile \"env/lib/python3.5/site-packages/dedupe/api.py\", line 660, in train\r\n    index_predicates)\r\n  File \"env/lib/python3.5/site-packages/dedupe/api.py\", line 676, in _trainBlocker\r\n    block_learner = self._blockLearner(predicate_set)\r\n  File \"env/lib/python3.5/site-packages/dedupe/api.py\", line 906, in _blockLearner\r\n    self.sampled_records)\r\nAttributeError: 'Dedupe' object has no attribute 'sampled_records'\r\n```\r\nThe `sampled_records` attribute is created by the `sample()` method, which is not called when sample data is passed to the constructor.\r\n\r\n\r\n\r\n\r\n"}}