{"action":"created","issue":{"url":"https://api.github.com/repos/BVLC/caffe/issues/2253","repository_url":"https://api.github.com/repos/BVLC/caffe","labels_url":"https://api.github.com/repos/BVLC/caffe/issues/2253/labels{/name}","comments_url":"https://api.github.com/repos/BVLC/caffe/issues/2253/comments","events_url":"https://api.github.com/repos/BVLC/caffe/issues/2253/events","html_url":"https://github.com/BVLC/caffe/pull/2253","id":66231828,"number":2253,"title":"Snapshot on signal","user":{"login":"jyegerlehner","id":2138320,"avatar_url":"https://avatars.githubusercontent.com/u/2138320?v=3","gravatar_id":"","url":"https://api.github.com/users/jyegerlehner","html_url":"https://github.com/jyegerlehner","followers_url":"https://api.github.com/users/jyegerlehner/followers","following_url":"https://api.github.com/users/jyegerlehner/following{/other_user}","gists_url":"https://api.github.com/users/jyegerlehner/gists{/gist_id}","starred_url":"https://api.github.com/users/jyegerlehner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jyegerlehner/subscriptions","organizations_url":"https://api.github.com/users/jyegerlehner/orgs","repos_url":"https://api.github.com/users/jyegerlehner/repos","events_url":"https://api.github.com/users/jyegerlehner/events{/privacy}","received_events_url":"https://api.github.com/users/jyegerlehner/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/BVLC/caffe/labels/enhancement","name":"enhancement","color":"c7def8"},{"url":"https://api.github.com/repos/BVLC/caffe/labels/focus","name":"focus","color":"006b75"},{"url":"https://api.github.com/repos/BVLC/caffe/labels/JL","name":"JL","color":"fef2c0"},{"url":"https://api.github.com/repos/BVLC/caffe/labels/ready%20for%20review","name":"ready for review","color":"bfe5bf"},{"url":"https://api.github.com/repos/BVLC/caffe/labels/RH","name":"RH","color":"d4c5f9"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":37,"created_at":"2015-04-03T21:30:54Z","updated_at":"2016-05-24T04:28:08Z","closed_at":"2015-08-22T23:08:39Z","pull_request":{"url":"https://api.github.com/repos/BVLC/caffe/pulls/2253","html_url":"https://github.com/BVLC/caffe/pull/2253","diff_url":"https://github.com/BVLC/caffe/pull/2253.diff","patch_url":"https://github.com/BVLC/caffe/pull/2253.patch"},"body":"This an implementation of the feature discussed in [Issue 2012](https://github.com/BVLC/caffe/issues/2012).\r\n\r\nWhen you hit Ctrl-C to kill caffe (while training), it will now save a snapshot before exiting. Actually, the Solver just stops training, and a snapshot is only saved if `snapshot_after_train` is true.\r\n\r\nThis is the default behavior which is configurable via the sigint_effect and sighup_effect command line options. Also by default, SIGHUP signal causes caffe to save a snapshot and continue training.  So you can make caffe save a snapshot by sending it SIGHUP signal, e.g.:\r\n\r\n`kill -SIGHUP PID `\r\n\r\nwhere PID is the process id of caffe, which you can find by doing `ps -ef | grep caffe`.\r\n\r\nThe design has two pieces to it. 1. `Solver` is modified slightly so that after each iteration it checks to see if its client wants it to either snapshot or exit. It does this via a callback function that a client can set on the Solver instance. If the callback hasn't been set, it just carries on as usual. So there is no breaking change to the Solver interface and the behavior of existing code shouldn't change. 2. The caffe executable provides the callback function to the Solver, and the callback is implemented on a SignalHandler that intercepts SIGINT and SIGHUP.\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/BVLC/caffe/issues/comments/221163546","html_url":"https://github.com/BVLC/caffe/pull/2253#issuecomment-221163546","issue_url":"https://api.github.com/repos/BVLC/caffe/issues/2253","id":221163546,"user":{"login":"Coderx7","id":5382892,"avatar_url":"https://avatars.githubusercontent.com/u/5382892?v=3","gravatar_id":"","url":"https://api.github.com/users/Coderx7","html_url":"https://github.com/Coderx7","followers_url":"https://api.github.com/users/Coderx7/followers","following_url":"https://api.github.com/users/Coderx7/following{/other_user}","gists_url":"https://api.github.com/users/Coderx7/gists{/gist_id}","starred_url":"https://api.github.com/users/Coderx7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Coderx7/subscriptions","organizations_url":"https://api.github.com/users/Coderx7/orgs","repos_url":"https://api.github.com/users/Coderx7/repos","events_url":"https://api.github.com/users/Coderx7/events{/privacy}","received_events_url":"https://api.github.com/users/Coderx7/received_events","type":"User","site_admin":false},"created_at":"2016-05-24T04:28:08Z","updated_at":"2016-05-24T04:28:08Z","body":"@ajtulloch yes, but at the same time it provides a very convenient and good feature to have, \r\nin linux thats a very good idea, but how does one do the exact same thing on windows? \r\n"}}
{"actor":{"display_login":"Coderx7"}}