kaiko-ai / eva

Evaluation framework for oncology foundation models (FMs)
https://kaiko-ai.github.io/eva/
Apache License 2.0
66 stars 4 forks source link

Add support for dataloader samplers #713

Open nkaenzig opened 1 week ago

nkaenzig commented 1 week ago

Closes #712

How to use

Just add this to the init_args of the DataModule in your yaml config:

    samplers:
      train:
        class_path: eva.core.data.samplers.classification.BalancedSampler
        init_args:
          num_samples: 10

(For online mode, specify the sampler in samplers.train:, while for offline mode in samplers.predict:).

Make sure that shuffle: false for the dataloader config of the corresponding split.