mirror of
https://github.com/amazon-science/chronos-forecasting
synced 2026-05-24 01:58:27 +00:00
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 <Abdulfatirs@gmail.com>
This commit is contained in:
parent
93419cfe9f
commit
78bd1c90ca
1 changed files with 1 additions and 1 deletions
|
|
@ -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] = []
|
||||
|
|
|
|||
Loading…
Reference in a new issue