IDataLoader<T>

Interfaces · AiDotNet.Interfaces

Base interface for all data loaders providing common data loading capabilities.

Implements: ICountable, IResettable

Known implementations: DataLoaderBase<T>, IEpisodicDataLoader<T, TInput, TOutput>, IGraphDataLoader<T>, IInputOutputDataLoader<T, TInput, TOutput>, IRLDataLoader<T>, IStatefulDataLoader<T>, IStreamingDataLoader<T, TInput, TOutput>

For Beginners

Think of IDataLoader as the foundation that all data loaders build upon.

Just like all vehicles (cars, trucks, motorcycles) share common features (wheels, engine), all data loaders share these common features:

  • A name and description so you know what data it loads
  • The ability to load and unload data
  • The ability to track how much data there is and where you are in processing it

Specific types of data loaders (for images, graphs, text, etc.) add their own specialized features on top of this foundation.

How It Works

IDataLoader defines the foundation for all specialized data loaders in the system. It provides:

  • Basic metadata (name, description)
  • Load/unload lifecycle management
  • Reset capability for multi-epoch training
  • Progress tracking through ICountable

Properties

Property Summary
bool IsLoaded { get; } Gets whether the data has been loaded and is ready for iteration.
string Description { get; } Gets a description of the dataset and its intended use.
string Name { get; } Gets the human-readable name of this data loader.

Methods

Method Summary
Task LoadAsync(CancellationToken cancellationToken) Loads the data asynchronously, preparing it for iteration.
void Unload() Unloads the data and releases associated resources.