from dataset import Dataset
import bindataset

_DEFAULT_TRAIN_FILEPATH = "/mounts/Datasets3/2022-ChallengePlankton/sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin"
_DEFAULT_TEST_FILEPATH = (
    "/mounts/Datasets3/2022-ChallengePlankton/sub_2CMEMS-MEDSEA-2017-testing.nc.bin"
)

idx ="sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx"

data = Dataset(_DEFAULT_TRAIN_FILEPATH, overwrite_index = False, train = False, subset_file = idx, num_days = 20, transform = None, target_transform = None)


"""
Builds a pointdataset generating the index if necessary or requested

Arguments:
    filepath: the full path to the nc file to load
    overwrite_index: if True ignores the index and regenerates it
    train: if True, accessing an element also returns the phyc
    subset_file: a filename which holds a list of indices this dataset must use
    num_days: the number of days that each sample considers
    transform: a transform to apply to the input tensor
    target_transform: a transform to apply to the phyc output tensor
"""


print("Len whole dataset :") 
print(len(data))
print()

print("Shape data[0] : ")
print(data[0].shape)

print(data.in_variables)
print(len(data.in_variables))


bindataset.test_time_dataset()