From 631e5defc0d0f9ba0b5f9f6820f3e888dcfc5b36 Mon Sep 17 00:00:00 2001 From: polinabinder1 Date: Thu, 7 Nov 2024 16:19:25 -0800 Subject: [PATCH 1/2] small bug fix (#415) Adding a needed underscore. --- sub-packages/bionemo-scdl/pyproject.toml | 2 +- .../src/bionemo/scdl/io/single_cell_memmap_dataset.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sub-packages/bionemo-scdl/pyproject.toml b/sub-packages/bionemo-scdl/pyproject.toml index 574235ea92..d8abab758c 100644 --- a/sub-packages/bionemo-scdl/pyproject.toml +++ b/sub-packages/bionemo-scdl/pyproject.toml @@ -14,7 +14,7 @@ dependencies = [ # bionemo sub-packages 'bionemo-core', # external - 'anndata>=0.10.7', + 'anndata>=0.11.0', 'pandas>=2.2.1', 'pyarrow>=16.0.0', 'scipy>=1.11.1', diff --git a/sub-packages/bionemo-scdl/src/bionemo/scdl/io/single_cell_memmap_dataset.py b/sub-packages/bionemo-scdl/src/bionemo/scdl/io/single_cell_memmap_dataset.py index 353e890e6f..932c16e58f 100644 --- a/sub-packages/bionemo-scdl/src/bionemo/scdl/io/single_cell_memmap_dataset.py +++ b/sub-packages/bionemo-scdl/src/bionemo/scdl/io/single_cell_memmap_dataset.py @@ -552,7 +552,7 @@ def paginated_load_h5ad( # Read the row indices into a memory map. mode = Mode.CREATE_APPEND self.row_index = _create_row_memmaps(num_rows, Path(self.data_path), mode, self.dtypes) - self.row_index[:] = adata.X.indptr.astype(int) + self.row_index[:] = adata.X._indptr.astype(int) # The data from each column and data chunk of the original anndata file is read in. This is saved into the final # location of the memmap file. In this step, it is saved in the binary file format. From 95028cfe8f2ab887889c48770b6a78c4181aea9b Mon Sep 17 00:00:00 2001 From: Steven Kothen-Hill <148821680+skothenhill-nv@users.noreply.github.com> Date: Thu, 7 Nov 2024 18:33:00 -0700 Subject: [PATCH 2/2] Fix incorrect types for WandbConfig (#410) Corrects the config by setting optional fields to actually be optional. --------- Signed-off-by: Steven Kothen-Hill <148821680+skothenhill-nv@users.noreply.github.com> Co-authored-by: Farhad Ramezanghorbani --- .../bionemo-llm/src/bionemo/llm/utils/logger_utils.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sub-packages/bionemo-llm/src/bionemo/llm/utils/logger_utils.py b/sub-packages/bionemo-llm/src/bionemo/llm/utils/logger_utils.py index 5f2f6b1957..ebba878c66 100644 --- a/sub-packages/bionemo-llm/src/bionemo/llm/utils/logger_utils.py +++ b/sub-packages/bionemo-llm/src/bionemo/llm/utils/logger_utils.py @@ -42,14 +42,14 @@ class WandbConfig(BaseModel): anonymous: Enables or explicitly disables anonymous logging. """ # noqa: D205 - entity: str # The team posting this run (default: your username or your default team) + entity: str | None # The team posting this run (default: your username or your default team) project: str # The name of the project to which this run will belong. # name: #Display name for the run. "This is handled by NeMoLogger" # save_dir: #Path where data is saved. "This is handled by NeMoLogger" - tags: List[str] # Tags associated with this run. - group: str # A unique string shared by all runs in a given group + tags: List[str] | None # Tags associated with this run. + group: str | None # A unique string shared by all runs in a given group offline: bool # Run offline (data can be streamed later to wandb servers). - id: str # Sets the version, mainly used to resume a previous run. + id: str | None # Sets the version, mainly used to resume a previous run. anonymous: bool # Enables or explicitly disables anonymous logging. log_model: bool # Save checkpoints in wandb dir to upload on W&B servers.