From 2ac2f2535c635a2ea7fab5bf0939c8425d73103c Mon Sep 17 00:00:00 2001 From: chrishavlin Date: Thu, 10 Aug 2023 15:49:35 -0500 Subject: [PATCH] commenting, removing parallel option for now --- src/yt_napari/_data_model.py | 6 +++--- src/yt_napari/_model_ingestor.py | 9 ++++++++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/yt_napari/_data_model.py b/src/yt_napari/_data_model.py index 81e1db3..ec9cdac 100644 --- a/src/yt_napari/_data_model.py +++ b/src/yt_napari/_data_model.py @@ -122,9 +122,9 @@ class Timeseries(BaseModel): load_as_stack: Optional[bool] = Field( False, description="If True, will stack images along a new dimension." ) - process_in_parallel: Optional[bool] = Field( - False, description="If True, will attempt to load selections in parallel." - ) + # process_in_parallel: Optional[bool] = Field( + # False, description="If True, will attempt to load selections in parallel." + # ) class InputModel(BaseModel): diff --git a/src/yt_napari/_model_ingestor.py b/src/yt_napari/_model_ingestor.py index afb10ac..5f5d4ae 100644 --- a/src/yt_napari/_model_ingestor.py +++ b/src/yt_napari/_model_ingestor.py @@ -665,10 +665,17 @@ def _load_timeseries(m_data: Timeseries, layer_list: list) -> list: files = _find_timeseries_files(m_data.file_selection) - if m_data.process_in_parallel is False: + process_in_parallel = False # future model attribute + + if process_in_parallel is False: tc = TimeseriesContainer() temp_list = [] for file in files: + # note: managing the files independently makes parallel approaches + # without MPI feasible. in some limited testing, this actually + # was thread safe with logging disabled, so it is possible to + # build dask arrays pretty easily for single regions and single + # fields. ds = yt.load(file) sels = m_data.selections temp_list = _load_selections_from_ds(