Skip to content

Commit

Permalink
adds nbval test for ngc download
Browse files Browse the repository at this point in the history
  • Loading branch information
pstjohn committed Nov 8, 2024
1 parent 43a6f42 commit d4a236f
Show file tree
Hide file tree
Showing 3 changed files with 108 additions and 0 deletions.
1 change: 1 addition & 0 deletions sub-packages/bionemo-core/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ dependencies = [
"torch>=2.2.1",
'boto3',
'lightning>=2.2.1',
'nest_asyncio',
'ngcsdk',
'pooch',
'pydantic>=2.7.0',
Expand Down
3 changes: 3 additions & 0 deletions sub-packages/bionemo-core/src/bionemo/core/data/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
from typing import Literal, Optional, Sequence, TextIO

import boto3
import nest_asyncio
import ngcsdk
import pooch
from botocore.config import Config
Expand Down Expand Up @@ -87,6 +88,8 @@ class NGCDownloader:
def __call__(self, url: str, output_file: str | Path, _: pooch.Pooch) -> None:
"""Download a file from NGC."""
client = default_ngc_client()
client.configure()
nest_asyncio.apply()

download_fns = {
"model": client.registry.model.download_version,
Expand Down
Loading

0 comments on commit d4a236f

Please sign in to comment.