dp_sen1_item_lists is a torch.utils.data.datapipes.iter.callable.MapperIterDataPipe
next(iter(dp_sen1_item_lists))
returns
[<Item id=sen12floods_s1_source_62_2019_04_01>,
<Item id=sen12floods_s1_source_19_2019_04_01>,
<Item id=sen12floods_s1_source_0250_2019_04_01>,
<Item id=sen12floods_s1_source_0249_2019_04_01>,
<Item id=sen12floods_s1_source_0248_2019_04_01>,
<Item id=sen12floods_s1_source_0247_2019_04_01>,
<Item id=sen12floods_s1_source_0246_2019_04_01>,
<Item id=sen12floods_s1_source_0245_2019_04_01>]
but I want it to return just the first element
<Item id=sen12floods_s1_source_62_2019_04_01>
how do I make it iterate over that list rather than a list of lists? II want to split up the datapipe somehow. I’ve tried dp_sen1_item_lists.header(1) but that returns a child data pipe that still contains a list but doesn’t iterate over that list
next(iter(dp_sen1_item_lists.header(1)))
[<Item id=sen12floods_s1_source_62_2019_04_01>,
<Item id=sen12floods_s1_source_19_2019_04_01>,
<Item id=sen12floods_s1_source_0250_2019_04_01>,
<Item id=sen12floods_s1_source_0249_2019_04_01>,
<Item id=sen12floods_s1_source_0248_2019_04_01>,
<Item id=sen12floods_s1_source_0247_2019_04_01>,
<Item id=sen12floods_s1_source_0246_2019_04_01>,
<Item id=sen12floods_s1_source_0245_2019_04_01>]
I’m definitely new to datapipes and having trouble finding an example or reference, any help is much appreciated