Skip to content

Commit e27dcc5

Browse files
ColCarrolltensorflower-gardener
authored andcommitted
Remove check_types from nest.map_up_to.
This should not change the behavior, but eliminates warnings (the warning tells you that the argument does nothing). See #1523 for a description of the problem. PiperOrigin-RevId: 451173112
1 parent 0a2f117 commit e27dcc5

File tree

1 file changed

+2
-1
lines changed
  • tensorflow_probability/python/internal/backend/numpy

1 file changed

+2
-1
lines changed

tensorflow_probability/python/internal/backend/numpy/nest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,8 +327,9 @@ def map_structure_with_tuple_paths_up_to(shallow_structure, func, *structures,
327327
if not structures:
328328
raise ValueError('Cannot map over no sequences')
329329

330+
# Internal `tree` does not accept check_types here; see b/198436438.
330331
check_types = kwargs.get('check_types', True)
331-
# kwargs.pop('check_types', None) # DisableOnExport
332+
kwargs.pop('check_types', None)
332333

333334
if expand_composites:
334335
raise NotImplementedError(

0 commit comments

Comments
 (0)