From e25912d6fb6d3144404f91bb86a5dd1f0dff1053 Mon Sep 17 00:00:00 2001 From: Benjamin Fineran Date: Mon, 25 Sep 2023 12:02:54 -0400 Subject: [PATCH] Update trainer.py - fix DistributedSampler import (#93) DistributedSampler is used but not imported in `trainer.py` --- src/transformers/trainer.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/transformers/trainer.py b/src/transformers/trainer.py index 0b2c9cd8924c1c..ab2549af5c894c 100755 --- a/src/transformers/trainer.py +++ b/src/transformers/trainer.py @@ -51,6 +51,7 @@ from packaging import version from torch import nn from torch.utils.data import DataLoader, Dataset, RandomSampler, SequentialSampler +from torch.utils.data.distributed import DistributedSampler from . import __version__ from .configuration_utils import PretrainedConfig