From c37dd95421cacc923d934c83cc0f3eb75f401ba7 Mon Sep 17 00:00:00 2001 From: Vlad Date: Fri, 2 Jan 2026 23:07:45 +1100 Subject: [PATCH 1/2] fixed r2 refetch interval --- src/litdata/streaming/client.py | 2 +- tests/streaming/test_client.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/litdata/streaming/client.py b/src/litdata/streaming/client.py index 26f43fbf..47ef768c 100644 --- a/src/litdata/streaming/client.py +++ b/src/litdata/streaming/client.py @@ -105,7 +105,7 @@ class R2Client(S3Client): def __init__( self, - refetch_interval: int = 3600, # 1 hour - this is the default refresh interval for R2 credentials + refetch_interval: int = 3300, # 55 minutes - this is the default refresh interval for R2 credentials storage_options: Optional[dict] = {}, session_options: Optional[dict] = {}, ) -> None: diff --git a/tests/streaming/test_client.py b/tests/streaming/test_client.py index ace4fe9f..fa5e5bca 100644 --- a/tests/streaming/test_client.py +++ b/tests/streaming/test_client.py @@ -111,7 +111,7 @@ def test_r2_client_initialization(): """Test R2Client initialization with different parameters.""" # Test with default parameters r2_client = client.R2Client() - assert r2_client._refetch_interval == 3600 # 1 hour default + assert r2_client._refetch_interval == 3300 # 55 minutes default assert r2_client._last_time is None assert r2_client._client is None assert r2_client._base_storage_options == {} From 3444164f91049478fc82dce4934c460419961bcd Mon Sep 17 00:00:00 2001 From: Vlad Date: Fri, 2 Jan 2026 23:19:45 +1100 Subject: [PATCH 2/2] remove comments --- src/litdata/streaming/client.py | 2 +- tests/streaming/test_client.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/litdata/streaming/client.py b/src/litdata/streaming/client.py index 47ef768c..cc792142 100644 --- a/src/litdata/streaming/client.py +++ b/src/litdata/streaming/client.py @@ -105,7 +105,7 @@ class R2Client(S3Client): def __init__( self, - refetch_interval: int = 3300, # 55 minutes - this is the default refresh interval for R2 credentials + refetch_interval: int = 3300, storage_options: Optional[dict] = {}, session_options: Optional[dict] = {}, ) -> None: diff --git a/tests/streaming/test_client.py b/tests/streaming/test_client.py index fa5e5bca..799e1681 100644 --- a/tests/streaming/test_client.py +++ b/tests/streaming/test_client.py @@ -111,7 +111,7 @@ def test_r2_client_initialization(): """Test R2Client initialization with different parameters.""" # Test with default parameters r2_client = client.R2Client() - assert r2_client._refetch_interval == 3300 # 55 minutes default + assert r2_client._refetch_interval == 3300 assert r2_client._last_time is None assert r2_client._client is None assert r2_client._base_storage_options == {}