Skip to content

Datasource

  • TYPE_CHECKING

Abstract provider of input data for an experiment.


fetch(ctx: 'FrozenContext') → Any

Return raw data for a single pipeline run.

Implementations may load data from disk, generate synthetic samples or access remote sources. They should be deterministic with respect to the provided context.

Args:

  • ctx: Immutable execution context for the current run.

Returns: The produced data object.


Bundles multiple named datasources for an experiment.

This can include both raw datasources (like functions decorated with @data_source) and Artifacts that link to the output of other experiments.

__init__(**inputs: 'DataSource') → None

Args:

  • **inputs: A keyword mapping of names to DataSource objects.

The number of replicates, inferred from Artifact inputs.


fetch(ctx: 'FrozenContext') → dict[str, Any]

Fetches data from all contained datasources.


Bundles multiple named datasources for an experiment.

This can include both raw datasources (like functions decorated with @data_source) and Artifacts that link to the output of other experiments.

__init__(**inputs: 'DataSource') → None

Args:

  • **inputs: A keyword mapping of names to DataSource objects.

The number of replicates, inferred from Artifact inputs.


fetch(ctx: 'FrozenContext') → dict[str, Any]

Fetches data from all contained datasources.