-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade to funlib.persistence `0.5`. This update makes a one big improvement: Custom `Array` class no longer needed. We used this mostly just to apply preprocessing lazily to large arrays. New `funlib` `Array` class uses `dask` internally which comes with much better support for lazy array operations than we built for ourselves. The `ZarrArray` and `NumpyArray` class which were used extensively throughout `DaCapo` have now been replaced with simple `funlib.persistence.Array`s. A minor incompatibility: `funlib.persistence.Array` has a convention (for now) that all axes have names, but non-spatial axes have a "^" in their name. This will be fixed in the near future. For now, DaCapo convention needed to change a little bit to adapt to this. We now have to use "c^" and "b^" for channel and batch dimensions instead of just "c" and "b". TODOs: This pull request is not quire ready to merge. I pass the tests run with `pytest`, and the `minimal_tutorial` notebook executes. But there is a lot of code that is not tested. Specifically many of the `ArrayConfig` subclasses are not yet tested and some are missing implementations. Here are the Preprocessing array configs, whether or not their implementation is complete, and their code coverage: - [X] BinarizeArrayConfig 96% - [X] ConcatArrayConfig 60% - [X] ConstantArrayConfig 57% - [X] CropArrayConfig 69% - [X] DummyArrayConfig 91% - [ ] DVIDArrayConfig 90% (misleading, only skeleton implementation so not much to test) - [X] IntensitiesArrayConfig 75% - [X] LogicalOrArrayConfig 60% - [x] MergeInstancesArrayConfig 100% (misleading, no implementation so nothing to test) - [x] MissingAnnotationsMaskConfig 100% (misleading) - [x] OnesArrayConfig 100% (misleading) - [ ] ResampledArrayConfig 100% (misleading) - [x] SumArrayConfig 100% (misleading) - [x] TiffArrayConfig 0% - [X] ZarrArrayConfig 70% Best practice would be to add tests before merging, but I want to put this here so others can test it
- Loading branch information
Showing
81 changed files
with
1,039 additions
and
8,622 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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 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 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
28 changes: 12 additions & 16 deletions
28
dacapo/experiments/datasplits/datasets/arrays/__init__.py
This file contains 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 |
---|---|---|
@@ -1,25 +1,21 @@ | ||
from .array import Array # noqa | ||
from .array_config import ArrayConfig # noqa | ||
|
||
# configurable arrays | ||
from .dummy_array_config import DummyArray, DummyArrayConfig # noqa | ||
from .zarr_array_config import ZarrArray, ZarrArrayConfig # noqa | ||
from .binarize_array_config import BinarizeArray, BinarizeArrayConfig # noqa | ||
from .resampled_array_config import ResampledArray, ResampledArrayConfig # noqa | ||
from .intensity_array_config import IntensitiesArray, IntensitiesArrayConfig # noqa | ||
from .missing_annotations_mask import MissingAnnotationsMask # noqa | ||
from .dummy_array_config import DummyArrayConfig # noqa | ||
from .zarr_array_config import ZarrArrayConfig # noqa | ||
from .binarize_array_config import BinarizeArrayConfig # noqa | ||
from .resampled_array_config import ResampledArrayConfig # noqa | ||
from .intensity_array_config import IntensitiesArrayConfig # noqa | ||
from .missing_annotations_mask_config import MissingAnnotationsMaskConfig # noqa | ||
from .ones_array_config import OnesArray, OnesArrayConfig # noqa | ||
from .concat_array_config import ConcatArray, ConcatArrayConfig # noqa | ||
from .logical_or_array_config import LogicalOrArray, LogicalOrArrayConfig # noqa | ||
from .crop_array_config import CropArray, CropArrayConfig # noqa | ||
from .ones_array_config import OnesArrayConfig # noqa | ||
from .concat_array_config import ConcatArrayConfig # noqa | ||
from .logical_or_array_config import LogicalOrArrayConfig # noqa | ||
from .crop_array_config import CropArrayConfig # noqa | ||
from .merge_instances_array_config import ( | ||
MergeInstancesArray, | ||
MergeInstancesArrayConfig, | ||
) # noqa | ||
from .dvid_array_config import DVIDArray, DVIDArrayConfig | ||
from .sum_array_config import SumArray, SumArrayConfig | ||
from .dvid_array_config import DVIDArrayConfig | ||
from .sum_array_config import SumArrayConfig | ||
|
||
# nonconfigurable arrays (helpers) | ||
from .numpy_array import NumpyArray # noqa | ||
from .constant_array_config import ConstantArray, ConstantArrayConfig # noqa | ||
from .constant_array_config import ConstantArrayConfig # noqa |
Oops, something went wrong.