Open eramdiaz opened 2 years ago
@wuhu Would one solution to this be to never remove the useless Identities?
@sjrl I think so. We would end up with a lot of identities in the splits though (this is why we remove them), possibly we could somehow not remove them when they were in there in the first place (in the original transform). Anyhow, I think this is a rather edgy edgecase and I think we'll probably be able to solve this easier once we move to the graph model. Therefore, I suggest leaving it as it is for now.
This issue was tackled on the pr https://github.com/lf1-io/padl/pull/405, where the first arrow of the debugger was removed due to this issue (https://github.com/lf1-io/padl/issues/340) and on https://github.com/lf1-io/padl/issues/404. At the moment we'll keep it open to take into account on a future implementation of this arrow.
🐞 Bug
When we get an exception on a transform that has useless
Identity()
s, the debugger is not able to track correctly which element of the entiretransform
is getting the Exception.Example: Let
t
be the following Transformand suppose we are getting an Exception on
linear
.pd_splits
does not take into account the useless Identities, sot.pd_preprocess
isand
t.pd_forward
isso when we catch the Exception on
t.pd_forward
, the item we get failing is1
, and when we are trying to track this index back in the entire transform we get:so we would get that the transform that is faling is
batch
, which is wrong.For solving this, we would need to count how many useless
Identities
are before the index failing, and I have not found a solution with the information we've got (the index of the exception on the stage that fails).