<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Why can’t you pickle generators in Python? A pattern for saving training state</title>
	<atom:link href="http://metaoptimize.com/blog/2009/12/22/why-cant-you-pickle-generators-in-python-workaround-pattern-for-saving-training-state/feed/" rel="self" type="application/rss+xml" />
	<link>http://metaoptimize.com/blog/2009/12/22/why-cant-you-pickle-generators-in-python-workaround-pattern-for-saving-training-state/</link>
	<description>building machine learning and natural language processing tools</description>
	<lastBuildDate>Mon, 30 Jan 2012 04:05:03 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Joseph Turian</title>
		<link>http://metaoptimize.com/blog/2009/12/22/why-cant-you-pickle-generators-in-python-workaround-pattern-for-saving-training-state/comment-page-1/#comment-956</link>
		<dc:creator>Joseph Turian</dc:creator>
		<pubDate>Fri, 01 Oct 2010 00:39:28 +0000</pubDate>
		<guid isPermaLink="false">http://blog.metaoptimize.com/?p=72#comment-956</guid>
		<description>&lt;span class=&quot;topsy_trackback_comment&quot;&gt;&lt;span class=&quot;topsy_twitter_username&quot;&gt;&lt;span class=&quot;topsy_trackback_content&quot;&gt;Why can&#039;t you pickle generators in Python? A pattern for saving training state http://bit.ly/dvUzTP&lt;/span&gt;&lt;/span&gt;</description>
		<content:encoded><![CDATA[<p><span class="topsy_trackback_comment"><span class="topsy_twitter_username"><span class="topsy_trackback_content">Why can’t you pickle generators in Python? A pattern for saving training state <a href="http://bit.ly/dvUzTP" rel="nofollow">http://bit.ly/dvUzTP</a></span></span></span></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Why you cannot pickle generator</title>
		<link>http://metaoptimize.com/blog/2009/12/22/why-cant-you-pickle-generators-in-python-workaround-pattern-for-saving-training-state/comment-page-1/#comment-158</link>
		<dc:creator>Why you cannot pickle generator</dc:creator>
		<pubDate>Tue, 29 Dec 2009 23:07:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.metaoptimize.com/?p=72#comment-158</guid>
		<description>[...] Turian wrote a post about regarding pickling generator on his blog. In his post, he says: However, generators become problematic when you want to persist [...]</description>
		<content:encoded><![CDATA[<p>[…] Turian wrote a post about regarding pickling generator on his blog. In his post, he says: However, generators become problematic when you want to persist […]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joseph Turian</title>
		<link>http://metaoptimize.com/blog/2009/12/22/why-cant-you-pickle-generators-in-python-workaround-pattern-for-saving-training-state/comment-page-1/#comment-145</link>
		<dc:creator>Joseph Turian</dc:creator>
		<pubDate>Wed, 23 Dec 2009 00:10:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.metaoptimize.com/?p=72#comment-145</guid>
		<description>Response to criticism on &lt;a href=&quot;http://news.ycombinator.com/item?id=1010533&quot; rel=&quot;nofollow&quot;&gt;hackernews&lt;/a&gt;:

&lt;i&gt;(1) You can only pickle generators that generate the same sequence every time they are restarted.&lt;/i&gt;

I don&#039;t know how you can persist state if you do not make this assumption.

&lt;i&gt;(2) All the work the generator did prior to pickling must be performed again on unpickling.&lt;i&gt;

Something faster would be to use file.tell() to get the state and file.seek() to set the state. Since the &quot;unpickling&quot; is not a bottleneck, I didn&#039;t optimize this.</description>
		<content:encoded><![CDATA[<p>Response to criticism on <a href="http://news.ycombinator.com/item?id=1010533" rel="nofollow">hackernews</a>:</p>
<p><i>(1) You can only pickle generators that generate the same sequence every time they are restarted.</i></p>
<p>I don’t know how you can persist state if you do not make this assumption.</p>
<p><i>(2) All the work the generator did prior to pickling must be performed again on unpickling.</i><i></p>
<p>Something faster would be to use file.tell() to get the state and file.seek() to set the state. Since the “unpickling” is not a bottleneck, I didn’t optimize this.</i></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard Tew</title>
		<link>http://metaoptimize.com/blog/2009/12/22/why-cant-you-pickle-generators-in-python-workaround-pattern-for-saving-training-state/comment-page-1/#comment-142</link>
		<dc:creator>Richard Tew</dc:creator>
		<pubDate>Tue, 22 Dec 2009 22:19:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.metaoptimize.com/?p=72#comment-142</guid>
		<description>You can do this with Stackless, of course.

http://www.disinterest.org/resource/stackless/2.6.4-docs-html/library/stackless/pickling.html</description>
		<content:encoded><![CDATA[<p>You can do this with Stackless, of course.</p>
<p><a href="http://www.disinterest.org/resource/stackless/2.6.4-docs-html/library/stackless/pickling.html" rel="nofollow">http://www.disinterest.org/resource/stackless/2.6.4-docs-html/library/stackless/pickling.html</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>

