Datasource
module crystallize.datasources.datasource
Section titled “module crystallize.datasources.datasource”Global Variables
Section titled “Global Variables”- TYPE_CHECKING
class DataSource
Section titled “class DataSource”Abstract provider of input data for an experiment.
method DataSource.fetch
Section titled “method DataSource.fetch”fetch(ctx: 'FrozenContext') → AnyReturn 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.
class ExperimentInput
Section titled “class ExperimentInput”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.
method ExperimentInput.__init__
Section titled “method ExperimentInput.__init__”__init__(**inputs: 'DataSource') → NoneArgs:
**inputs: A keyword mapping of names to DataSource objects.
property ExperimentInput.replicates
Section titled “property ExperimentInput.replicates”The number of replicates, inferred from Artifact inputs.
method ExperimentInput.fetch
Section titled “method ExperimentInput.fetch”fetch(ctx: 'FrozenContext') → dict[str, Any]Fetches data from all contained datasources.
class ExperimentInput
Section titled “class ExperimentInput”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.
method ExperimentInput.__init__
Section titled “method ExperimentInput.__init__”__init__(**inputs: 'DataSource') → NoneArgs:
**inputs: A keyword mapping of names to DataSource objects.
property ExperimentInput.replicates
Section titled “property ExperimentInput.replicates”The number of replicates, inferred from Artifact inputs.
method ExperimentInput.fetch
Section titled “method ExperimentInput.fetch”fetch(ctx: 'FrozenContext') → dict[str, Any]Fetches data from all contained datasources.