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

Question about MultiDatasetsEvaluator #11796

Open
jigongbao opened this issue Jun 17, 2024 · 1 comment
Open

Question about MultiDatasetsEvaluator #11796

jigongbao opened this issue Jun 17, 2024 · 1 comment
Assignees

Comments

@jigongbao
Copy link

When using MultiDatasetsEvaluator, I find that it will show that the evaluator shows no cumulative_sizes making it impossible to proceed, but my val_dataloader uses concatdatasets.
Here is my config:
val_evaluator = dict(
type='MultiDatasetsEvaluator',
metrics=metrics,
dataset_prefixes=dataset_prefixes
)
val_dataloader = dict(
batch_size=val_batch_size_per_gpu,
num_workers=val_num_workers,
persistent_workers=persistent_workers,
pin_memory=True,
drop_last=False,
sampler=dict(type='DefaultSampler', shuffle=False),
dataset=dict(
type='ConcatDataset',
datasets=[
A3_roi1_dataset_val,
A3_roi2_dataset_val,
A3_roi3_dataset_val,
A3_roi4_dataset_val,
A3_roi5_dataset_val
]
)
)

@MiXaiLL76
Copy link

I recently developed a project where I used MultiDatasetsEvaluator

val_dataloader = dict(
    batch_size=BATCH//2,
    num_workers=BATCH//2,
    drop_last=False,
    persistent_workers=True,
    sampler=dict(type="DefaultSampler", shuffle=False),
    dataset=dict(
        type="ConcatDataset",
        datasets=[val_real_dataset, val_synth_dataset],
    ),
)

and

if use_segm:
    metrics.append("segm")

val_evaluator = dict(
    type='MultiDatasetsEvaluator',
    metrics=[
        dict(type=metric_type, metric=metrics, classwise=True),
        dict(type=metric_type, metric=metrics, classwise=True),
    ],
    dataset_prefixes=["real", "synth"]
)

Everything worked great

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

3 participants