Skip to content

Commit 23868e3

Browse files
committed
prevent from overriding batch_sampler when both precompute and batch_sampler is set
1 parent 7f97963 commit 23868e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pytorch_forecasting/data/timeseries/_timeseries.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2691,7 +2691,7 @@ def to_dataloader(
26912691
if self.precompute:
26922692
kwargs["collate_fn"] = self.__fast_collate_fn__()
26932693
self.__precompute__(kwargs)
2694-
if kwargs["batch_sampler"] is not None:
2694+
elif kwargs["batch_sampler"] is not None:
26952695
sampler = kwargs["batch_sampler"]
26962696
if isinstance(sampler, str):
26972697
if sampler == "synchronized":

0 commit comments

Comments
 (0)