Skip to content

[Feature Request] Having configurable frames_per_batch_worker on _MultiDataCollector #3019

Closed
@Ghelfi

Description

@Ghelfi

Motivation

Currently, the frames_per_batch parameter is uniformly applied across all workers, which can lead to suboptimal utilisation of computational resources when dealing with heterogeneous environments per worker. One might want to build a batch with different fraction of the batch's frames per worker to account for specifics in the environments.

Solution

I propose that _MultiDataCollector exposes both frames_per_batch: int | None and frames_per_batch_worker: Sequence[int] | None. These should be mutually exclusive and in the case were frames_per_batch_worker is provided, frames_per_batchcan be computed as sum(frames_per_batch_worker).

I'll propose a PR in this direction.

Alternatives

An alternative would be to implement a new Collector handling this. This will lead to a load of code duplication for little to gain.

Additional context

Checklist

  • I have checked that there is no similar issue in the repo (required)

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions