Skip to content

Add option to limit number of CPUs for data preprocessing #720

Description

@mathpluscode

Subject of the feature

Currently, we are using AUTOTUNE in data preprocessing, e.g. https://github.com/DeepRegNet/DeepReg/blob/main/deepreg/dataset/loader/interface.py#L113

However, it may take too many CPUs and thus also memories and this is not ideal on clusters.
Therefore we need to be able to configure this num_parallel_calls.

The fix can be,

  • when loading config, we will set num_parallel_calls to the given value if provided, otherwise tf.data.experimental.AUTOTUNE.
  • then we pass this num_parallel_calls to all funcs using it.

FYI @YipengHu @zacbaum @fepegar

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working.priorityIssues of high priority

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions