I wanted to use the show_batch
functionality with the MixedItemList
class.
I’ve had a first attempt here. There are three main components:
- I added the
reconstruct
method to utilize the corresponding methods of the underlyingItemList
's - For an easy first implementation I implemented
show_xys
to initially display only one of the components of theMixedItemList
in e.g. if myMixedItemList
contained Tabular and Vision data,show_batch
would only show either the table or the image. This is currently decided via a new attribute onMixedItemList
->display_index
. It is hardcoded at the moment, I wasn’t sure the best way to implement this - I had to modify the
get_idx
function intorch_core.py
to account for the fact that when you used Tabular data within aMixedItemList
you have nested lists that contain theTensor
data
It seems to work in my experiments. I would like to add a test, but I’m not sure how to test something that displays/plots data i.e show_batch
@sgugger Any advice on this generally?