From 5608c7af90e23eabc280a6b88e3023a92452901c Mon Sep 17 00:00:00 2001 From: Tim Blakely Date: Thu, 21 Nov 2024 11:00:03 -0800 Subject: [PATCH] Update `calculate_flow` to use new configuration defaults. PiperOrigin-RevId: 698843883 --- connectomics/volume/subvolume_processor.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/connectomics/volume/subvolume_processor.py b/connectomics/volume/subvolume_processor.py index 40af9f3..6c1ad0e 100644 --- a/connectomics/volume/subvolume_processor.py +++ b/connectomics/volume/subvolume_processor.py @@ -360,10 +360,13 @@ def register_default_config( def default_config( config_class: Type[T], config_type: DefaultConfigType | None = None, - overrides: dict[str, Any] | None = None, + overrides: file.PathLike | dict[str, Any] | None = None, fallback_to_em_2d: bool = True, + kvdriver: str = 'file', ) -> T: """Returns a default configuration for a given config type and class.""" + if isinstance(overrides, file.PathLike): + overrides = file.load_json(overrides, kvdriver=kvdriver) if config_type is None and fallback_to_em_2d: logging.warning('No default config type specified, falling back to EM_2D.') config_type = DefaultConfigType.EM_2D