Browse Source

small

tags/v1.0.0alpha
x54-729 2 years ago
parent
commit
7c6e8b20a8
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      fastNLP/core/samplers/reproducible_batch_sampler.py

+ 1
- 1
fastNLP/core/samplers/reproducible_batch_sampler.py View File

@@ -151,7 +151,7 @@ class RandomBatchSampler(ReproducibleBatchSampler):
self.need_reinitialize = False

def set_distributed(self, num_replicas, rank, pad=True):
raise RuntimeError(f"ReproduceBatchSampler does not support to change to distributed training.")
raise RuntimeError(f"RandomBatchSampler does not support to change to distributed training.")

def set_epoch(self, epoch):
if hasattr(self.batch_sampler, "sampler") and hasattr(self.batch_sampler.sampler, 'set_epoch') and callable(self.batch_sampler.sampler.set_epoch):


Loading…
Cancel
Save