{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/9454","labels_url":"https://api.github.com/repos/apache/spark/issues/9454/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/9454/comments","events_url":"https://api.github.com/repos/apache/spark/issues/9454/events","html_url":"https://github.com/apache/spark/pull/9454","id":114941222,"number":9454,"title":"[SPARK-11217][ML] save/load for non-meta estimators and transformers","user":{"login":"mengxr","id":829644,"avatar_url":"https://avatars.githubusercontent.com/u/829644?v=3","gravatar_id":"","url":"https://api.github.com/users/mengxr","html_url":"https://github.com/mengxr","followers_url":"https://api.github.com/users/mengxr/followers","following_url":"https://api.github.com/users/mengxr/following{/other_user}","gists_url":"https://api.github.com/users/mengxr/gists{/gist_id}","starred_url":"https://api.github.com/users/mengxr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mengxr/subscriptions","organizations_url":"https://api.github.com/users/mengxr/orgs","repos_url":"https://api.github.com/users/mengxr/repos","events_url":"https://api.github.com/users/mengxr/events{/privacy}","received_events_url":"https://api.github.com/users/mengxr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-11-04T00:21:53Z","updated_at":"2015-11-06T19:57:15Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/9454","html_url":"https://github.com/apache/spark/pull/9454","diff_url":"https://github.com/apache/spark/pull/9454.diff","patch_url":"https://github.com/apache/spark/pull/9454.patch"},"body":"This PR implements the default save/load for non-meta estimators and transformers using the JSON serialization of param values. The saved metadata includes:\r\n\r\n* class name\r\n* uid\r\n* timestamp\r\n* paramMap\r\n\r\nThe save/load interface is similar to DataFrames. We use the current active context by default, which should be sufficient for most use cases.\r\n\r\n~~~scala\r\ninstance.save(\"path\")\r\ninstance.write.context(sqlContext).overwrite().save(\"path\")\r\n\r\nInstance.load(\"path\")\r\n~~~\r\n\r\nThe param handling is different from the design doc. We didn't save default and user-set params separately, and when we load it back, all parameters are user-set. This does cause issues. But it also cause other issues if we modify the default params.\r\n\r\nTODOs:\r\n\r\n* [x] Java test\r\n* [ ] a follow-up PR to implement default save/load for all non-meta estimators and transformers\r\n\r\ncc @jkbradley "},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/154516174","html_url":"https://github.com/apache/spark/pull/9454#issuecomment-154516174","issue_url":"https://api.github.com/repos/apache/spark/issues/9454","id":154516174,"user":{"login":"AmplabJenkins","id":4031291,"avatar_url":"https://avatars.githubusercontent.com/u/4031291?v=3","gravatar_id":"","url":"https://api.github.com/users/AmplabJenkins","html_url":"https://github.com/AmplabJenkins","followers_url":"https://api.github.com/users/AmplabJenkins/followers","following_url":"https://api.github.com/users/AmplabJenkins/following{/other_user}","gists_url":"https://api.github.com/users/AmplabJenkins/gists{/gist_id}","starred_url":"https://api.github.com/users/AmplabJenkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AmplabJenkins/subscriptions","organizations_url":"https://api.github.com/users/AmplabJenkins/orgs","repos_url":"https://api.github.com/users/AmplabJenkins/repos","events_url":"https://api.github.com/users/AmplabJenkins/events{/privacy}","received_events_url":"https://api.github.com/users/AmplabJenkins/received_events","type":"User","site_admin":false},"created_at":"2015-11-06T19:57:15Z","updated_at":"2015-11-06T19:57:15Z","body":"Build triggered. sha1 is merged."}}