Skip to content

Commit 01c709f

Browse files
Update sub-packages/bionemo-scdl/src/bionemo/scdl/data/load.py
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: polinabinder1 <pbinder@nvidia.com>
1 parent 85054c5 commit 01c709f

1 file changed

Lines changed: 10 additions & 13 deletions

File tree

  • sub-packages/bionemo-scdl/src/bionemo/scdl/data

sub-packages/bionemo-scdl/src/bionemo/scdl/data/load.py

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -226,19 +226,16 @@ def _parse_resource_file(file) -> list[dict[str, Any]]:
226226
DEFAULT_SOURCE: SourceOptions = _ENV_SOURCE if _ENV_SOURCE in {"ngc", "pbss"} else "ngc"
227227

228228

229-
def default_pbss_client():
230-
"""Create a default S3 client for PBSS."""
231-
try:
232-
import boto3
233-
from botocore.config import Config
234-
except ImportError:
235-
raise ImportError("boto3 and botocore are required to download from PBSS.")
236-
237-
from botocore.config import Config # defer optional dependency
238-
239-
retry_config = Config(retries={"max_attempts": 10, "mode": "standard"})
240-
return boto3.client("s3", endpoint_url="https://pbss.s8k.io", config=retry_config)
241-
229+
def default_pbss_client():
230+
"""Create a default S3 client for PBSS."""
231+
try:
232+
import boto3
233+
from botocore.config import Config
234+
except ImportError:
235+
raise ImportError("boto3 and botocore are required to download from PBSS.")
236+
237+
retry_config = Config(retries={"max_attempts": 10, "mode": "standard"})
238+
return boto3.client("s3", endpoint_url="https://pbss.s8k.io", config=retry_config)
242239

243240
def _s3_download(url: str, output_file: str | Path, _: pooch.Pooch) -> None:
244241
"""Download a file from PBSS."""

0 commit comments

Comments
 (0)