{"action":"created","issue":{"url":"https://api.github.com/repos/fchollet/keras/issues/4533","repository_url":"https://api.github.com/repos/fchollet/keras","labels_url":"https://api.github.com/repos/fchollet/keras/issues/4533/labels{/name}","comments_url":"https://api.github.com/repos/fchollet/keras/issues/4533/comments","events_url":"https://api.github.com/repos/fchollet/keras/issues/4533/events","html_url":"https://github.com/fchollet/keras/issues/4533","id":192174958,"number":4533,"title":"TensorBoard Callback doesn't close file -  max file descriptors","user":{"login":"unsalted","id":4411834,"avatar_url":"https://avatars.githubusercontent.com/u/4411834?v=3","gravatar_id":"","url":"https://api.github.com/users/unsalted","html_url":"https://github.com/unsalted","followers_url":"https://api.github.com/users/unsalted/followers","following_url":"https://api.github.com/users/unsalted/following{/other_user}","gists_url":"https://api.github.com/users/unsalted/gists{/gist_id}","starred_url":"https://api.github.com/users/unsalted/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unsalted/subscriptions","organizations_url":"https://api.github.com/users/unsalted/orgs","repos_url":"https://api.github.com/users/unsalted/repos","events_url":"https://api.github.com/users/unsalted/events{/privacy}","received_events_url":"https://api.github.com/users/unsalted/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-29T02:54:07Z","updated_at":"2016-12-04T22:25:45Z","closed_at":"2016-12-04T22:25:45Z","body":"The TensorBoard callback never closes the log file.  I've had a 12 hour run interupted by a max file descriptor error.\r\n\r\nI suppose this:\r\n\r\n\r\n        for name, value in logs.items():\r\n            if name in ['batch', 'size']:\r\n                continue\r\n            summary = tf.Summary()\r\n            summary_value = summary.value.add()\r\n            summary_value.simple_value = value.item()\r\n            summary_value.tag = name\r\n            self.writer.add_summary(summary, epoch)\r\n        self.writer.flush()\r\n\r\nneeds to be followed with:\r\n\r\n`self.writer.close()`\r\n\r\nbased on the [TF docs](https://www.tensorflow.org/versions/r0.12/api_docs/python/train.html#SummaryWriter):\r\n\r\n> **tf.train.SummaryWriter.close()**\r\n> \r\n> Flushes the event file to disk and close the file.\r\n> \r\n> Call this method when you do not need the summary writer anymore.\r\n> \r\n\r\n@tboquet what do you think - I see it's your callback.\r\n\r\nBTW it has been a total blessing to have such a convenient callback available. Thank you!"},"comment":{"url":"https://api.github.com/repos/fchollet/keras/issues/comments/264736555","html_url":"https://github.com/fchollet/keras/issues/4533#issuecomment-264736555","issue_url":"https://api.github.com/repos/fchollet/keras/issues/4533","id":264736555,"user":{"login":"fchollet","id":710255,"avatar_url":"https://avatars.githubusercontent.com/u/710255?v=3","gravatar_id":"","url":"https://api.github.com/users/fchollet","html_url":"https://github.com/fchollet","followers_url":"https://api.github.com/users/fchollet/followers","following_url":"https://api.github.com/users/fchollet/following{/other_user}","gists_url":"https://api.github.com/users/fchollet/gists{/gist_id}","starred_url":"https://api.github.com/users/fchollet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fchollet/subscriptions","organizations_url":"https://api.github.com/users/fchollet/orgs","repos_url":"https://api.github.com/users/fchollet/repos","events_url":"https://api.github.com/users/fchollet/events{/privacy}","received_events_url":"https://api.github.com/users/fchollet/received_events","type":"User","site_admin":false},"created_at":"2016-12-04T22:25:45Z","updated_at":"2016-12-04T22:25:45Z","body":"Fixed."}}
{"actor":{"display_login":"fchollet"}}