Skip to content

Commit

Permalink
commenting, removing parallel option for now
Browse files Browse the repository at this point in the history
  • Loading branch information
chrishavlin committed Aug 10, 2023
1 parent d92d897 commit 2ac2f25
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/yt_napari/_data_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
9 changes: 8 additions & 1 deletion src/yt_napari/_model_ingestor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 2ac2f25

Please sign in to comment.