-
Couldn't load subscription status.
- Fork 416
feat(dataloaders): Custom dataloader registry support #2932
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 96 commits
Commits
Show all changes
165 commits
Select commit
Hold shift + click to select a range
7088e4b
copying CZI custom dataloader into our repo
ori-kron-wis cc72b05
added some fixes to the custom dataloader stuff
ori-kron-wis 46048e3
Some suggestions
canergen 14f343d
Changes to datamodule pipeline
canergen 17282cd
Fixed attr_dict
canergen a4143f5
added some fixes based on custom data loader test
ori-kron-wis 69abc47
Changes to dataloader
canergen dc21a3d
copying CZI custom dataloader into our repo
ori-kron-wis a1098b3
added some fixes to the custom dataloader stuff
ori-kron-wis b07216b
Some suggestions
canergen a578af1
Changes to datamodule pipeline
canergen 42434ec
Fixed attr_dict
canergen 3d0c890
added some fixes based on custom data loader test
ori-kron-wis eff5b1e
Changes to dataloader
canergen cbdc26e
Merge remote-tracking branch 'origin/ori-2907-custom-dataloader-regis…
ori-kron-wis 18d65a6
add changes to tests and some merging with main following custom data…
ori-kron-wis 4fe3ee1
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 1110966
just put the cutom dataloder2 test under remarks so hook tests will r…
ori-kron-wis 7972bdc
fixes
ori-kron-wis 2d86c43
additional external models fixes once there is a registry
ori-kron-wis 3c44d86
fixed a few failed tests
ori-kron-wis c0889d8
fix archesmixin init and added new custom dataloader test and github …
ori-kron-wis 8fe043c
fix again for from __future__ import annotations
ori-kron-wis d8cf0f6
fix for run custom dataloader in github action
ori-kron-wis c41e8b2
rollback
ori-kron-wis 6ec5d4d
added label to the new githubaction for custom dataloader
ori-kron-wis 6bce317
fix for github action for custom dataloaders
ori-kron-wis 1f4ae9d
another fix to custom dataloder test and github action
ori-kron-wis de1f30b
another fix to custom dataloder test and github action
ori-kron-wis 49fa01e
another fix to custom dataloder test and github action
ori-kron-wis e33a935
another fix to custom dataloder test and github action
ori-kron-wis 48627d9
another fix to custom dataloder test and github action
ori-kron-wis 609094d
another fix to custom dataloder test and github action
ori-kron-wis 8cf3517
another fix to custom dataloder test and github action
ori-kron-wis ba5a028
another fix to custom dataloder test and github action
ori-kron-wis a7dc3fe
another fix to custom dataloder test and github action
ori-kron-wis f3ff0f8
another fix to custom dataloder test and github action
ori-kron-wis 083c76e
Merge branch 'main' into ori-2907-custom-dataloader-registry
ori-kron-wis 70bba69
Merge branch 'main' into ori-2907-custom-dataloader-registry
ori-kron-wis 8c75662
Merge branch 'main' into ori-2907-custom-dataloader-registry
ori-kron-wis b6eb2f1
Returned REGISTRY_KEYS for import, after was drop in recent merges
ori-kron-wis 2979ea2
It is ok to drop it after scarches categorial covariates fix
ori-kron-wis 67e9b34
Merge branch 'main' into ori-2907-custom-dataloader-registry
ori-kron-wis 11fe33a
Merge branch 'main' into ori-2907-custom-dataloader-registry
ori-kron-wis 4a648ff
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] e3831cb
moved to type checking blocks beucase of ruff updates
ori-kron-wis e1837bd
Merge branch 'main' into ori-2907-custom-dataloader-registry
ori-kron-wis bf4d3bf
Merge remote-tracking branch 'origin/main' into ori-2907-custom-datal…
ori-kron-wis 2cc8ff9
updated for CZI custom dataloader test and backend
ori-kron-wis e62dc3a
Merge branch 'main' into ori-2907-custom-dataloader-registry
ori-kron-wis 41fd877
added cellxgene-census folder as well for debug (will not be merged)
ori-kron-wis 10ada9c
added cellxgene-census packge to run test
ori-kron-wis dd3649c
added torchdata packge to run test
ori-kron-wis c6acb5a
fixed the test workwflow
ori-kron-wis b35c6eb
adding the lamindb as well
ori-kron-wis 1801604
fix the c.dataloders test
ori-kron-wis ed77a65
fix the c.dataloders test
ori-kron-wis fc831d5
fix the c.dataloders test
ori-kron-wis 7400621
fix the c.dataloders test
ori-kron-wis 47376ca
fix the c.dataloders test
ori-kron-wis f94f7fa
removed redundat functions in code base
ori-kron-wis 962f043
Added scanvi support, including CZI datamodule fix for it
ori-kron-wis 5c21d71
Merge remote-tracking branch 'origin/main' into ori-2907-custom-datal…
ori-kron-wis a8aeffe
updates from main
ori-kron-wis 1283616
more updates from main
ori-kron-wis 624ee72
Merge branch 'main' into ori-2907-custom-dataloader-registry
ori-kron-wis 6d4f368
Merge remote-tracking branch 'origin/ori-2907-custom-dataloader-regis…
ori-kron-wis 8ab01a4
updated related to tests
ori-kron-wis 31e1d44
updated related to tests
ori-kron-wis 93666fa
Running DataLoader MappedCollection
canergen 1d1d6d3
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 7695a8a
Fixed LaminDB dataloader
canergen e4d732a
Merge branch 'ori-2907-custom-dataloader-registry' of https://github.…
canergen a651442
LaminDB dataloader test.
canergen 9767b8c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 719e740
Merge branch 'main' into ori-2907-custom-dataloader-registry
ori-kron-wis 1a4c796
Merge remote-tracking branch 'origin/main' into ori-2907-custom-datal…
ori-kron-wis 5666558
Changes for MappedCollection.
canergen c740dd2
Merge branch 'ori-2907-custom-dataloader-registry' of https://github.…
canergen 61f2e27
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 874935b
Add other notebook for testing new dataloader
canergen f2c63bd
Merge branch 'ori-2907-custom-dataloader-registry' of https://github.…
canergen 35d45c8
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 38c670f
Merge remote-tracking branch 'origin/main' into ori-2907-custom-datal…
ori-kron-wis c93fc97
updates to test script
ori-kron-wis 5045fc3
remove old test nb
ori-kron-wis 55775f9
update test
ori-kron-wis 7ccdf8d
update test
ori-kron-wis f88dc50
updated czi cdl
ori-kron-wis 1f3ea11
updated czi cdl
ori-kron-wis d0ec46f
Merge remote-tracking branch 'origin/main' into ori-2907-custom-datal…
ori-kron-wis e304922
merge with main + updates
ori-kron-wis 5ccd1ed
more updates
ori-kron-wis 96a09d8
more updates
ori-kron-wis 601d86f
more updates
ori-kron-wis 2485bb6
pyproject update
ori-kron-wis 538326b
merge with main
ori-kron-wis b7e3047
merge with main
ori-kron-wis 7f5b17f
updates after merge with main
ori-kron-wis c4fe9a5
pinned zarr to work with py3.12
ori-kron-wis 2c8bd85
updates
ori-kron-wis 1e16399
updates
ori-kron-wis 355cb7c
Merge branch 'main' into ori-2907-custom-dataloader-registry
ori-kron-wis 2140911
added cesus dataloder
ori-kron-wis df86761
Merge branch 'main' into ori-2907-custom-dataloader-registry
ori-kron-wis cea01ad
update pyproject
ori-kron-wis f6cedd6
update pyproject
ori-kron-wis 4ff6494
update pyproject
ori-kron-wis c3d0178
path for the setuptools bad version
ori-kron-wis e571361
path for the setuptools bad version
ori-kron-wis 9c6fead
path for the setuptools bad version
ori-kron-wis 91e99cd
path for the setuptools bad version - not related to us - revert it
ori-kron-wis e171fda
path for the setuptools bad version - not related to us - revert it
ori-kron-wis 25d0530
updates
ori-kron-wis e455c2b
updates
ori-kron-wis 5f51c69
Merge remote-tracking branch 'origin/main' into ori-2907-custom-datal…
ori-kron-wis 59c9109
focus on scvi/scanvi only: added a general base model check for regis…
ori-kron-wis 9ba0690
updates
ori-kron-wis 780dcc6
updates
ori-kron-wis 4e1dcaf
updates
ori-kron-wis 0432d48
replaced the previous cellxgene_census experimental dl to the new til…
ori-kron-wis 5b25d58
typo
ori-kron-wis 32110ba
removed the setup datamodule from models, changes in save/load of cus…
ori-kron-wis 4436aae
lamin scanvi
ori-kron-wis 15dc621
lamin scanvi
ori-kron-wis c77d002
lamin scanvi
ori-kron-wis 8b826cc
lamin scanvi
ori-kron-wis ffad4a0
lamin scanvi
ori-kron-wis e93ded5
Merge remote-tracking branch 'origin/main' into ori-2907-custom-datal…
ori-kron-wis fc66c83
more functionalities to lamin custom dataloders, added tutos placehol…
ori-kron-wis a99b429
check if registry even exist
ori-kron-wis 1e4d36e
code updates, scanvi pred and from scvi training and downstream analy…
ori-kron-wis 47abb67
added validator to custom dataloaders (lamin is an external one)
ori-kron-wis 4a08d63
bug
ori-kron-wis 99352f5
bug
ori-kron-wis 7224da4
bug
ori-kron-wis 7b20518
Merge remote-tracking branch 'origin/main' into ori-2907-custom-datal…
ori-kron-wis cdf9d11
merge with main, added gpu support
ori-kron-wis 94eb36f
Merge remote-tracking branch 'origin/main' into ori-2907-custom-datal…
ori-kron-wis 137327c
fix bugs
ori-kron-wis 63beed2
updates on how to train fast
ori-kron-wis 277c827
updates on how to train fast
ori-kron-wis 96a355a
Merge remote-tracking branch 'origin/main' into ori-2907-custom-datal…
ori-kron-wis 211d8ca
Merge remote-tracking branch 'origin/main' into ori-2907-custom-datal…
ori-kron-wis 5042436
update inference dataloader for tiledb
ori-kron-wis 8279f85
Merge remote-tracking branch 'origin/ori-2907-custom-dataloader-regis…
ori-kron-wis 2707478
Merge branch 'main' into ori-2907-custom-dataloader-registry
ori-kron-wis d80ff0f
Merge remote-tracking branch 'origin/ori-2907-custom-dataloader-regis…
ori-kron-wis 3510e54
Merge remote-tracking branch 'origin/main' into ori-2907-custom-datal…
ori-kron-wis 28d29e8
Merge remote-tracking branch 'origin/main' into ori-2907-custom-datal…
ori-kron-wis fa3703b
updates, fix in scanvi
ori-kron-wis 25b442b
updates, fix in scanvi
ori-kron-wis 439fb42
updates, fix in scanvi
ori-kron-wis 7def99d
updates, fix in scanvi save\load
ori-kron-wis 9175bdc
updates, fix in scanvi
ori-kron-wis 6d43866
covariates support
ori-kron-wis affb079
covariates support
ori-kron-wis 93bcb98
Merge remote-tracking branch 'origin/main' into ori-2907-custom-datal…
ori-kron-wis 289473e
correct labels order
ori-kron-wis 50eb858
Merge remote-tracking branch 'origin/main' into ori-2907-custom-datal…
ori-kron-wis f8c5e14
updates
ori-kron-wis 8ae19f0
Update _data_splitting.py
ori-kron-wis 39ece12
Merge branch 'main' into ori-2907-custom-dataloader-registry
ori-kron-wis 3ff5320
updates with main
ori-kron-wis 67caa96
updates with main
ori-kron-wis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,89 @@ | ||
| name: test (custom dataloaders) | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main, "[0-9]+.[0-9]+.x"] | ||
| pull_request: | ||
| branches: [main, "[0-9]+.[0-9]+.x"] | ||
| types: [labeled, synchronize, opened] | ||
| schedule: | ||
| - cron: "0 10 * * *" # runs at 10:00 UTC (03:00 PST) every day | ||
| workflow_dispatch: | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| test: | ||
| # if PR has label "custom_dataloader" or "all tests" or if scheduled or manually triggered | ||
| if: >- | ||
| ( | ||
| contains(github.event.pull_request.labels.*.name, 'custom_dataloader') || | ||
| contains(github.event.pull_request.labels.*.name, 'all tests') || | ||
| contains(github.event_name, 'schedule') || | ||
| contains(github.event_name, 'workflow_dispatch') | ||
| ) | ||
|
|
||
| runs-on: ${{ matrix.os }} | ||
|
|
||
| defaults: | ||
| run: | ||
| shell: bash -e {0} # -e to fail on error | ||
|
|
||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: [ubuntu-latest] | ||
| python: ["3.11"] | ||
|
|
||
| name: integration | ||
|
|
||
| env: | ||
| OS: ${{ matrix.os }} | ||
| PYTHON: ${{ matrix.python }} | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: ${{ matrix.python }} | ||
| cache: "pip" | ||
| cache-dependency-path: "**/pyproject.toml" | ||
|
|
||
| - name: Install dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip wheel uv | ||
| python -m uv pip install --system "scvi-tools[tests] @ ." | ||
| python -m pip install scdataloader | ||
| python -m pip install cellxgene-census | ||
| python -m pip install tiledbsoma | ||
| python -m pip install s3fs | ||
| python -m pip install torchdata==0.9.0 | ||
| python -m pip install psutil | ||
| python -m pip install lamindb | ||
| python -m pip install bionty==0.51.0 | ||
| python -m pip install biomart | ||
|
|
||
| - name: Install Specific Branch of Repository | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GH_TOKEN }} | ||
| run: | | ||
| git config --global url."https://${GH_TOKEN}:[email protected]/".insteadOf "https://github.com/" | ||
| git clone --single-branch --branch ebezzi/census-scvi-datamodule https://github.com/ori-kron-wis/cellxgene-census.git | ||
| git clone --single-branch --branch main https://github.com/jkobject/scDataLoader.git | ||
|
|
||
| - name: Run specific custom dataloader pytest | ||
| env: | ||
| MPLBACKEND: agg | ||
| PLATFORM: ${{ matrix.os }} | ||
| DISPLAY: :42 | ||
| COLUMNS: 120 | ||
| run: | | ||
| coverage run -m pytest tests/dataloaders/test_custom_dataloader.py -v --color=yes --custom-dataloader-tests | ||
| coverage report | ||
|
|
||
| - uses: codecov/codecov-action@v4 | ||
| with: | ||
| token: ${{ secrets.CODECOV_TOKEN }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule cellxgene-census
added at
fac658
Submodule notebooks
updated
from 943703 to b692ae
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,194 @@ | ||
| from __future__ import annotations | ||
|
|
||
| from typing import TYPE_CHECKING | ||
|
|
||
| import psutil | ||
| from lightning.pytorch import LightningDataModule | ||
| from torch.utils.data import DataLoader | ||
|
|
||
| import scvi | ||
|
|
||
| if TYPE_CHECKING: | ||
| import lamindb as ln | ||
ori-kron-wis marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| import numpy as np | ||
|
|
||
|
|
||
| class MappedCollectionDataModule(LightningDataModule): | ||
| def __init__( | ||
| self, | ||
| collection: ln.Collection, | ||
| batch_key: str | None = None, | ||
| label_key: str | None = None, | ||
| batch_size: int = 128, | ||
| **kwargs, | ||
| ): | ||
| self._batch_size = batch_size | ||
| self._batch_key = batch_key | ||
| self._label_key = label_key | ||
| self._parallel = kwargs.pop("parallel", True) | ||
| # here we initialize MappedCollection to use in a pytorch DataLoader | ||
| self._dataset = collection.mapped( | ||
| obs_keys=self._batch_key, parallel=self._parallel, **kwargs | ||
| ) | ||
| # need by scvi and lightning.pytorch | ||
| self._log_hyperparams = False | ||
| self.allow_zero_length_dataloader_with_multiple_devices = False | ||
|
|
||
| def close(self): | ||
| self._dataset.close() | ||
|
|
||
| def setup(self, stage): | ||
| pass | ||
|
|
||
| def train_dataloader(self): | ||
| return self._create_dataloader(shuffle=True) | ||
|
|
||
| def inference_dataloader(self): | ||
| """Dataloader for inference with `on_before_batch_transfer` applied.""" | ||
| dataloader = self._create_dataloader(shuffle=False, batch_size=4096) | ||
| return self._InferenceDataloader(dataloader, self.on_before_batch_transfer) | ||
|
|
||
| def _create_dataloader(self, shuffle, batch_size=None): | ||
| if self._parallel: | ||
| num_workers = psutil.cpu_count() - 1 | ||
| worker_init_fn = self._dataset.torch_worker_init_fn | ||
| else: | ||
| num_workers = 0 | ||
| worker_init_fn = None | ||
| if batch_size is None: | ||
| batch_size = self._batch_size | ||
| return DataLoader( | ||
| self._dataset, | ||
| batch_size=batch_size, | ||
| shuffle=shuffle, | ||
| num_workers=num_workers, | ||
| worker_init_fn=worker_init_fn, | ||
| ) | ||
|
|
||
| @property | ||
| def n_obs(self) -> int: | ||
| return self._dataset.n_obs | ||
|
|
||
| @property | ||
| def var_names(self) -> int: | ||
| return self._dataset.var_joint | ||
|
|
||
| @property | ||
| def n_vars(self) -> int: | ||
| return self._dataset.n_vars | ||
|
|
||
| @property | ||
| def n_batch(self) -> int: | ||
| if self._batch_key is None: | ||
| return 1 | ||
| return len(self._dataset.encoders[self._batch_key]) | ||
|
|
||
| @property | ||
| def n_labels(self) -> int: | ||
| if self._label_key is None: | ||
| return 1 | ||
| return len(self._dataset.encoders[self._label_key]) | ||
|
|
||
| @property | ||
| def labels(self) -> np.ndarray: | ||
| return self._dataset[self._label_key] | ||
|
|
||
| @property | ||
| def registry(self) -> dict: | ||
| return { | ||
| "scvi_version": scvi.__version__, | ||
| "model_name": "SCVI", | ||
| "setup_args": { | ||
| "layer": None, | ||
| "batch_key": self._batch_key, | ||
| "labels_key": self._label_key, | ||
| "size_factor_key": None, | ||
| "categorical_covariate_keys": None, | ||
| "continuous_covariate_keys": None, | ||
| }, | ||
| "field_registries": { | ||
| "X": { | ||
| "data_registry": {"attr_name": "X", "attr_key": None}, | ||
| "state_registry": { | ||
| "n_obs": self.n_obs, | ||
| "n_vars": self.n_vars, | ||
| "column_names": self.var_names, | ||
| }, | ||
| "summary_stats": {"n_vars": self.n_vars, "n_cells": self.n_obs}, | ||
| }, | ||
| "batch": { | ||
| "data_registry": {"attr_name": "obs", "attr_key": "_scvi_batch"}, | ||
| "state_registry": { | ||
| "categorical_mapping": self.batch_keys, | ||
| "original_key": self._batch_key, | ||
| }, | ||
| "summary_stats": {"n_batch": self.n_batch}, | ||
| }, | ||
| "labels": { | ||
| "data_registry": {"attr_name": "obs", "attr_key": "_scvi_labels"}, | ||
| "state_registry": { | ||
| "categorical_mapping": self.label_keys, | ||
| "original_key": self._label_key, | ||
| "unlabeled_category": "unlabeled", | ||
ori-kron-wis marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| }, | ||
| "summary_stats": {"n_labels": self.n_labels}, | ||
| }, | ||
| "size_factor": { | ||
| "data_registry": {}, | ||
| "state_registry": {}, | ||
| "summary_stats": {}, | ||
| }, | ||
| "extra_categorical_covs": { | ||
| "data_registry": {}, | ||
| "state_registry": {}, | ||
| "summary_stats": {"n_extra_categorical_covs": 0}, | ||
| }, | ||
| "extra_continuous_covs": { | ||
| "data_registry": {}, | ||
| "state_registry": {}, | ||
| "summary_stats": {"n_extra_continuous_covs": 0}, | ||
| }, | ||
| }, | ||
| "setup_method_name": "setup_anndata", | ||
| } | ||
|
|
||
| @property | ||
| def batch_keys(self) -> int: | ||
| if self._batch_key is None: | ||
| return None | ||
| return self._dataset.encoders[self._batch_key] | ||
|
|
||
| @property | ||
| def label_keys(self) -> int: | ||
| if self._label_key is None: | ||
| return None | ||
| return self._dataset.encoders[self._label_key] | ||
|
|
||
| def on_before_batch_transfer( | ||
| self, | ||
| batch, | ||
| dataloader_idx, | ||
| ): | ||
| X_KEY: str = "X" | ||
| BATCH_KEY: str = "batch" | ||
| LABEL_KEY: str = "labels" | ||
|
|
||
| return { | ||
| X_KEY: batch["X"].float(), | ||
| BATCH_KEY: batch[self._batch_key][:, None] if self._batch_key is not None else None, | ||
| LABEL_KEY: 0, | ||
| } | ||
|
|
||
| class _InferenceDataloader: | ||
| """Wrapper to apply `on_before_batch_transfer` during iteration.""" | ||
|
|
||
| def __init__(self, dataloader, transform_fn): | ||
| self.dataloader = dataloader | ||
| self.transform_fn = transform_fn | ||
|
|
||
| def __iter__(self): | ||
| for batch in self.dataloader: | ||
| yield self.transform_fn(batch, dataloader_idx=None) | ||
|
|
||
| def __len__(self): | ||
| return len(self.dataloader) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.