diff --git a/src/litdata/streaming/resolver.py b/src/litdata/streaming/resolver.py index 6c8dc9d3..98ce5fef 100644 --- a/src/litdata/streaming/resolver.py +++ b/src/litdata/streaming/resolver.py @@ -108,10 +108,10 @@ def _resolve_studio(dir_path: str, target_name: Optional[str], target_id: Option project_id = os.getenv("LIGHTNING_CLOUD_PROJECT_ID", None) if cluster_id is None: - raise RuntimeError("The `cluster_id` couldn't be found from the environment variables.") + raise RuntimeError("The `LIGHTNING_CLUSTER_ID` couldn't be found from the environment variables.") if project_id is None: - raise RuntimeError("The `project_id` couldn't be found from the environment variables.") + raise RuntimeError("The `LIGHTNING_CLOUD_PROJECT_ID` couldn't be found from the environment variables.") clusters = client.cluster_service_list_project_clusters(project_id).clusters @@ -147,7 +147,7 @@ def _resolve_s3_connections(dir_path: str) -> Dir: # Get the ids from env variables project_id = os.getenv("LIGHTNING_CLOUD_PROJECT_ID", None) if project_id is None: - raise RuntimeError("The `project_id` couldn't be found from the environment variables.") + raise RuntimeError("The `LIGHTNING_CLOUD_PROJECT_ID` couldn't be found from the environment variables.") target_name = dir_path.split("/")[3] diff --git a/tests/streaming/test_resolver.py b/tests/streaming/test_resolver.py index 742f066d..164120f5 100644 --- a/tests/streaming/test_resolver.py +++ b/tests/streaming/test_resolver.py @@ -23,7 +23,7 @@ def test_src_resolver_s3_connections(monkeypatch, lightning_cloud_mock): auth = login.Auth() auth.save(user_id="7c8455e3-7c5f-4697-8a6d-105971d6b9bd", api_key="e63fae57-2b50-498b-bc46-d6204cbf330e") - with pytest.raises(RuntimeError, match="`project_id` couldn't be found from the environment variables."): + with pytest.raises(RuntimeError, match="`LIGHTNING_CLOUD_PROJECT_ID` couldn't be found from the environment variables."): resolver._resolve_dir("/teamspace/s3_connections/imagenet") monkeypatch.setenv("LIGHTNING_CLOUD_PROJECT_ID", "project_id")