Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why is length of test_dataloader 2, but the equal size is 200 #1726

Open
hagersalehahmed opened this issue Dec 11, 2024 · 1 comment
Open

Comments

@hagersalehahmed
Copy link

hagersalehahmed commented Dec 11, 2024

Why is length of test_dataloader is 2, but the equal size of testing set is 200

Coding

max_encoder_length = 5
max_prediction_length = 3


training = TimeSeriesDataSet(
    train_df,
    time_idx="time_idx",
    target=["RR", "SpO2"],
    group_ids=["subject_id"],
    #min_encoder_length=max_encoder_length // 2,
    max_encoder_length=max_encoder_length,
    #min_prediction_length=1,
    max_prediction_length=max_prediction_length,
    static_categoricals=[],
    #time_varying_known_reals=["time_idx"],
    time_varying_unknown_reals=["RR", "SpO2"],
    target_normalizer=MultiNormalizer(
        [
            GroupNormalizer(groups=["subject_id"], scale_by_group=True)
            for _ in ["RR", "SpO2"]
        ]
    ),
    add_relative_time_idx=True,
    add_target_scales=True,
    add_encoder_length=True,
)


testing = TimeSeriesDataSet.from_dataset(
    training,
    test_df,
    predict=True,
   
)


batch_size = 16

train_dataloader = training.to_dataloader(
    train=True, batch_size=batch_size, num_workers=0
)

test_dataloader = testing.to_dataloader(
    train=False,  batch_size=len(test_df), num_workers=0
)
@hagersalehahmed hagersalehahmed changed the title Why is length of test_dataloader is 2, but the equal size is 200 Why is length of test_dataloader 2, but the equal size is 200 Dec 11, 2024
@fnhirwa
Copy link
Member

fnhirwa commented Dec 12, 2024

Hey @hagersalehahmed, would you provide more context to this issue with a full reproducible code example?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants