Function - initialize_dataloader

Function - initialize_dataloader#

openfl.utilities.dataloading.initialize_dataloader(plan, collaborator_index=0)[source]#

Initialize a dataloader with actual data from a collaborator.

NOTE: cwd must be the workspace directory because we need to construct dataloader from actual collaborator data path with actual data present.

Parameters:
  • plan (Plan) – Plan object linked with the dataloader

  • collaborator_index (int) – Which collaborator should be used for initializing dataloader among collaborators specified in plan/data.yaml. Defaults to 0.

Returns:

A dataloader instance with data loaded

Return type:

DataLoader

Raises:

ValueError – If collaborator_index is out of range