data icon indicating copy to clipboard operation
data copied to clipboard

Default constructing ShardingRoundRobinDispatcher results in exception

Open sehoffmann opened this issue 1 year ago • 3 comments

🐛 Describe the bug

dp = dp.sharding_round_robin_dispatch()

results in

    def __init__(self, source_datapipe: IterDataPipe, sharding_group_filter: Optional[SHARDING_PRIORITIES] = None):
        self.source_datapipe = source_datapipe
        if sharding_group_filter != SHARDING_PRIORITIES.MULTIPROCESSING:
>           raise NotImplementedError(
                "`sharding_round_robin_dispatch` currently only supports `SHARDING_PRIORITIES.MULTIPROCESSING`."
                "Please open issue on github for your feature request."
            )
E           NotImplementedError: `sharding_round_robin_dispatch` currently only supports `SHARDING_PRIORITIES.MULTIPROCESSING`.Please open issue on github for your feature request.


Versions

e78ab6c9ec94f05f0a350ced7fe571f6863c20ec

sehoffmann avatar Mar 24 '23 16:03 sehoffmann

We should fix this, either:

  1. Have no default argument
  2. Default to multiprocessing

I prefer 1 so that users are explicitly passing in an argument rather than relying on default.

I don't think this is high priority for now but we should fix this along with a more comprehensive tutorial on this feature by the next release.

NivekT avatar Mar 24 '23 22:03 NivekT

We should fix this, either:

1. Have no default argument

2. Default to multiprocessing

I prefer 1 so that users are explicitly passing in an argument rather than relying on default.

I don't think this is high priority for now but we should fix this along with a more comprehensive tutorial on this feature by the next release.

There's also "3. Use SHARDING_PRIORITY.DEFAULT as default parameter" as an option. That is what .sharding_filter is doing.

sehoffmann avatar Mar 25 '23 13:03 sehoffmann

The problem with ShardingRoundRobinDispatcher is that it currently only supports SHARDING_PRIORITY.MULTIPROCESSING.

ejguan avatar Apr 17 '23 17:04 ejguan