When skip_num_stack_entries is set, the AST that we parse doesn't necessarily match the signature of the function that is actually being decorated. This can cause bugs because the arguments that we expect to see aren't the ones that we actually see.
skip_num_stack_entries is mainly used in cases where we want to process the argument before it has been converted to a tensor/shape, and we can do this through the preprocess_args option in the decorator. In slice, we use it to get stack information for the individual slice index arguments, but we could perhaps do that manually.
When
skip_num_stack_entries
is set, the AST that we parse doesn't necessarily match the signature of the function that is actually being decorated. This can cause bugs because the arguments that we expect to see aren't the ones that we actually see.skip_num_stack_entries
is mainly used in cases where we want to process the argument before it has been converted to a tensor/shape, and we can do this through thepreprocess_args
option in the decorator. Inslice
, we use it to get stack information for the individual slice index arguments, but we could perhaps do that manually.