Multiple tmp dirs created but only one used for file-backed dataset store

Open Beginner friendly
#699 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Quiet
Tech stack
python
Domain
data

Research direction

Start by reading the temporary-directory creation in httomo/cli.py around lines 428-438 and the HDF5 filepath definition in httomo/data/dataset_store.py around line 174. Trace how the process rank is used in both places. Done means non-rank-0 processes no longer create unused temporary directories while the rank-0 HDF5 store continues to work.

Written by the indexing model from the issue text.

Description

framework minor

This only applies to the case when the data processing has the dataset store backed by an hdf5 file.

In such a case, each process creates a temp dir to hold an hdf5 file: https://github.com/DiamondLightSource/httomo/blob/2acd1b2278a337458a00b63e8528117892eba647/httomo/cli.py#L428-L438

but when the writer actually defines the hdf5 filepath, only rank 0's temp dir is used: https://github.com/DiamondLightSource/httomo/blob/2acd1b2278a337458a00b63e8528117892eba647/httomo/data/dataset_store.py#L174

Meaning, each process creates a temp dir when really only rank 0 needs to create one.

This doesn't have any impact on the functionality, it's simply just a bit confusing when seeing multiple temp dirs created and only one is actually being used.

Dominant language
Python
Stars
10
Forks
5
Avg merge
5d 17h
Merged PRs (30d)
1

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from DiamondLightSource/httomo

All issues in DiamondLightSource/httomo

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.