From 78bd1c90ca1bb7aee08e0307758d18c5b06c9c3f Mon Sep 17 00:00:00 2001 From: Ilias Aarab <69244507+IliasAarab@users.noreply.github.com> Date: Wed, 5 Nov 2025 23:33:07 +0100 Subject: [PATCH] Set `num_workers=0` in Chronos-2 test data loader (#365) By default, the `transformers` library sets the `num_workers` argument of the PyTorch DataLoader to `0`, ensuring out-of-the-box compatibility across different platforms. *Issue #, if available:* *Description of changes:* Set the DataLoader `num_workers` argument to `0` to improve cross-platform compatibility, particularly on Windows systems where multiprocessing requires guarded execution. By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice. --------- Co-authored-by: Abdul Fatir --- src/chronos/chronos2/pipeline.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/chronos/chronos2/pipeline.py b/src/chronos/chronos2/pipeline.py index 2250fb2..9906119 100644 --- a/src/chronos/chronos2/pipeline.py +++ b/src/chronos/chronos2/pipeline.py @@ -542,7 +542,7 @@ class Chronos2Pipeline(BaseChronosPipeline): mode=DatasetMode.TEST, ) test_loader = DataLoader( - test_dataset, batch_size=None, num_workers=1, pin_memory=True, shuffle=False, drop_last=False + test_dataset, batch_size=None, pin_memory=True, shuffle=False, drop_last=False ) all_predictions: list[torch.Tensor] = []