Closed jonas-eschle closed 6 years ago
The intent here (I think) was to let the parallel iterations be whatever the default is for the map_fn op when the seed has not been specified (and hence reproducibility is not an issue) but to fix it to 1 if the seed has been set. I will fix this shortly.
I believe this issue is fixed. Please reopen if Im mistaken.
Software (tf & tfp): newest, compared with github.
In
sample_halton_sequence()
, a seed can be specified. Default isNone
, will be passed on asNone
and won't be altered (also not byutil.gen_new_seed
, this returnsNone
if the argument was alreadyNone
). On line 291 (sample_halton_sequence.py
),tf.map_fn
is called with the argumentSo if the seed is
None
, thenparallel_iterations
will be None. And that's what it is. This then fails, astf.map_fn
callswhile_loop
, which requiresparallel_iterations
to be a positive integer (and notNone
).Is the quoted line above really the intention? Should
None
be the number of parallel_iterations? (If notNone
-> 1 makes somewhat sense (reproducibility?), but ifNone
, then it should not beNone
but something different I guess)I am not familiar enough with the
parallel_iterations
handling, otherwise I'd be happy to make a PR and fix it.