I ran into this issue when I went over the tutorial given here.
Given how the model checkpoint copying is written here, one would expect that all the checkpoints would be written to the path job_dir/model_name. This, however, is not the case due to the usage of str.lstrip on this line. Note that lstrip removes from left to right all the characters that appear in the argument, which itself is treated like a set, as opposed to a fixed token. So for instance, if bucket_id contains characters which appear in the remaining string of bucket_path, then those characters would get wiped out. Consider a simple example:
>>> 'abcaaaad'.lstrip('abc')
'd'
Perhaps a simple fix is to change this line to use something instead of lstrip, e.g.
I ran into this issue when I went over the tutorial given here.
Given how the model checkpoint copying is written here, one would expect that all the checkpoints would be written to the path
job_dir/model_name
. This, however, is not the case due to the usage ofstr.lstrip
on this line. Note that lstrip removes from left to right all the characters that appear in the argument, which itself is treated like a set, as opposed to a fixed token. So for instance, ifbucket_id
contains characters which appear in the remaining string ofbucket_path
, then those characters would get wiped out. Consider a simple example:Perhaps a simple fix is to change this line to use something instead of lstrip, e.g.