From 9a5daeb416c059b24278bd9e39f16d9d5e44ed25 Mon Sep 17 00:00:00 2001 From: bhimrazy Date: Thu, 6 Nov 2025 10:57:10 +0545 Subject: [PATCH 1/3] chore(ci): add Python 3.14 to the testing matrix --- .github/workflows/ci-testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-testing.yml b/.github/workflows/ci-testing.yml index b6f66b3c..716aa4c2 100644 --- a/.github/workflows/ci-testing.yml +++ b/.github/workflows/ci-testing.yml @@ -19,7 +19,7 @@ jobs: fail-fast: false matrix: os: ["ubuntu-22.04", "macos-14", "windows-2022"] - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] exclude: - { os: "windows-2022", python-version: "3.13" } - { os: "macos-14", python-version: "3.12" } From 45c4187823029a65b21bbee6ee8798999d48e89c Mon Sep 17 00:00:00 2001 From: bhimrazy Date: Thu, 6 Nov 2025 12:10:49 +0545 Subject: [PATCH 2/3] fix(dataloader): pickle issue --- src/litdata/streaming/dataloader.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/litdata/streaming/dataloader.py b/src/litdata/streaming/dataloader.py index 27205cea..fa47b346 100644 --- a/src/litdata/streaming/dataloader.py +++ b/src/litdata/streaming/dataloader.py @@ -624,7 +624,7 @@ def __init__( self._num_samples_yielded_wrapper: dict[int, list[int]] = {} self._num_cycles: dict[int, list[int]] = {} self.rng_state: Optional[Any] = None - self._worker_idx = cycle(list(range(self.num_workers if self.num_workers > 0 else 1))) + self._worker_idx: Optional[Any] = None # Lazily initialized in __iter__ self._worker_idx_iter: Optional[Any] = None self._latest_worker_idx = 0 self.restore = False @@ -767,6 +767,9 @@ def load_state_dict(self, obj: dict[str, Any]) -> None: # Used to restart on the next DataLoader worker from the previous run. self._latest_worker_idx = obj["latest_worker_idx"] + 1 + # Initialize _worker_idx if not already set (e.g., when loading state before first iteration) + if self._worker_idx is None: + self._worker_idx = cycle(list(range(self.num_workers if self.num_workers > 0 else 1))) self._worker_idx_iter = iter(self._worker_idx) for _ in range(self._latest_worker_idx): next(self._worker_idx_iter) From 419cdd8c895b2719413e62688efe359681ad4645 Mon Sep 17 00:00:00 2001 From: bhimrazy Date: Thu, 6 Nov 2025 12:49:32 +0545 Subject: [PATCH 3/3] chore(ci): update Python version matrix to include 3.14 and adjust exclusions --- .github/workflows/ci-testing.yml | 3 +-- setup.py | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-testing.yml b/.github/workflows/ci-testing.yml index 716aa4c2..ca415ecc 100644 --- a/.github/workflows/ci-testing.yml +++ b/.github/workflows/ci-testing.yml @@ -22,8 +22,7 @@ jobs: python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] exclude: - { os: "windows-2022", python-version: "3.13" } - - { os: "macos-14", python-version: "3.12" } - - { os: "macos-14", python-version: "3.13" } + - { os: "windows-2022", python-version: "3.14" } # Timeout: https://stackoverflow.com/a/59076067/4521646 timeout-minutes: 60 diff --git a/setup.py b/setup.py index 5d92d9ed..e320d57d 100644 --- a/setup.py +++ b/setup.py @@ -99,5 +99,7 @@ def _prepare_extras(requirements_dir: str = _PATH_REQUIRES, skip_files: tuple = "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", ], )