fix(data/sampler): 修正拼写错误并增强采样器功能
This commit is contained in:
@@ -6,8 +6,8 @@ def test_random_sampler_consistency(random_dataset):
|
||||
dataset = random_dataset
|
||||
|
||||
# Create two samplers with same seed
|
||||
sampler1 = ResumeableRandomSampler(dataset, seed=42)
|
||||
sampler2 = ResumeableRandomSampler(dataset, seed=42)
|
||||
sampler1 = ResumableDistributedSampler(dataset, seed=42)
|
||||
sampler2 = ResumableDistributedSampler(dataset, seed=42)
|
||||
|
||||
indices1 = list(iter(sampler1))
|
||||
indices2 = list(iter(sampler2))
|
||||
@@ -19,8 +19,8 @@ def test_random_sampler_different_seeds(random_dataset):
|
||||
dataset = random_dataset
|
||||
|
||||
# Create two samplers with different seeds
|
||||
sampler1 = ResumeableRandomSampler(dataset, seed=42)
|
||||
sampler2 = ResumeableRandomSampler(dataset, seed=123)
|
||||
sampler1 = ResumableDistributedSampler(dataset, seed=42)
|
||||
sampler2 = ResumableDistributedSampler(dataset, seed=123)
|
||||
|
||||
indices1 = list(iter(sampler1))
|
||||
indices2 = list(iter(sampler2))
|
||||
@@ -34,7 +34,7 @@ def test_sampler_across_epochs(random_dataset):
|
||||
dataset = random_dataset
|
||||
n = len(dataset)
|
||||
|
||||
sampler = ResumeableRandomSampler(dataset, seed=42)
|
||||
sampler = ResumableDistributedSampler(dataset, seed=42)
|
||||
|
||||
# Get indices for first epoch
|
||||
epoch1_indices = list(iter(sampler))
|
||||
|
||||
Reference in New Issue
Block a user