From 1e5056ea7ac0f0421ee187e7a47ed9829794e0fc Mon Sep 17 00:00:00 2001 From: Ma Zerun <mzr1996@163.com> Date: Sun, 27 Feb 2022 20:35:41 +0800 Subject: [PATCH] Stop using generic `Sampler` since it's not supported in early version (#56) PyTorch. --- mmengine/data/sampler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mmengine/data/sampler.py b/mmengine/data/sampler.py index 83936a27..47b2c3b4 100644 --- a/mmengine/data/sampler.py +++ b/mmengine/data/sampler.py @@ -16,7 +16,7 @@ sync_random_seed = MagicMock(return_value=0) @DATA_SAMPLERS.register_module() -class DefaultSampler(Sampler[int]): +class DefaultSampler(Sampler): """The default data sampler for both distributed and non-distributed environment. @@ -109,7 +109,7 @@ class DefaultSampler(Sampler[int]): @DATA_SAMPLERS.register_module() -class InfiniteSampler(Sampler[int]): +class InfiniteSampler(Sampler): """It's designed for iteration-based runner and yields a mini-batch indices each time. -- GitLab