rspeer / golem

Chrome extension for counting points in dominion on dominion.isotropic.org.
5 stars 0 forks source link

export_decks.coffee occasionally writes malformed examples #6

Closed rspeer closed 13 years ago

rspeer commented 13 years ago

export_decks.coffee seems to occasionally be misplacing line breaks, or perhaps writing one example in the middle of another. The result is that somewhere between 1 in 40000 and 1 in 10000 of the examples are corrupted. Is this a node.js bug, or just an unexpected effect of the way I'm doing a lot of asynchronous writes to the same file?

The workaround for now involves telling vw not to care about serious parse errors. The model picks up some meaningless features and otherwise copes.

rspeer commented 13 years ago

Fixed: It seems this is what synchronous writes are for. They're not even any slower (a stream of disk writes eventually has to be synchronous anyway).