You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The implementation of both methods include an instance of Formatted , which in turn is instantiated with a default index=1.
This prevents appending to existing file. In order words, stringify() always generates an output starting from 1.
In my use-case, I translate one SRT “A” onto another SRT “B”. Suppose A has 300 entries.
The automatic translation takes a long-time, so I do it in batches, lets say 8 nodes at a time; and sometimes the process fails. Suppose it fails at the 150th node - when the program restarts, I can detect the last index in the output file and continue from there. However stringify() will generate nodes starting from 1, so the output will have nodes 1..,148,149,150,1,2,…
Adding an overload that accepts a starting index would possibly be a solution.
My work-around at the moment: re-write the entire output file after each batch is processed. It’s not a huge performance hit but makes the process more convoluted.
The text was updated successfully, but these errors were encountered:
The implementation of both methods include an instance of
Formatted
, which in turn is instantiated with a defaultindex=1
.This prevents appending to existing file. In order words,
stringify()
always generates an output starting from 1.In my use-case, I translate one SRT “A” onto another SRT “B”. Suppose A has 300 entries.
The automatic translation takes a long-time, so I do it in batches, lets say 8 nodes at a time; and sometimes the process fails. Suppose it fails at the 150th node - when the program restarts, I can detect the last index in the output file and continue from there. However
stringify()
will generate nodes starting from 1, so the output will have nodes 1..,148,149,150,1,2,…Adding an overload that accepts a starting index would possibly be a solution.
My work-around at the moment: re-write the entire output file after each batch is processed. It’s not a huge performance hit but makes the process more convoluted.
The text was updated successfully, but these errors were encountered: