Saltar al contenido principal

SaveDatasetToPathUnit

Unit
DashAI.back.units.SaveDatasetToPathUnit

Write the dataset to a destination given in the configuration.

The sibling of SaveDatasetUnit, and deliberately a separate unit rather than a flag on it. SaveDatasetUnit saves back to dataset_path — where the load came from — which is what makes editing a dataset in place safe. This one stores the dataset as something new, so it never reads dataset_path: if it did, a flow that loads a working copy and registers the result as a fresh dataset would overwrite the copy it read.

Declares no outputs — its result is on disk, not in the context.

The error message keeps the original exception's text. A failure here is an infrastructure failure (out of space, permissions, a path the filesystem rejects), and only the message of the outermost error reaches the user: the job queue stores str(exc), never the __cause__ chain. Swallowing it would drop the diagnosis exactly when it is needed.

Parameters​

path : string, default=
Destination directory for the dataset. Unlike saving in place, this writes wherever it is told, so it can store a dataset that was loaded from somewhere else entirely.

Methods​

execute(self, ctx: DashAI.back.units.context.ExecutionContext) -> None

Defined on SaveDatasetToPathUnit

Do the unit's work, reading from and writing to the context.

Parameters

ctx : ExecutionContext
The shared execution context.

get_credential(self, name: str)

Defined on ConfigObject

Resolve a registered credential component by name.

Parameters

name : str
Credential component class name (e.g. "HuggingFaceCredential").

Returns

BaseCredential
An instance of the requested credential component.

get_schema(cls) -> dict

Defined on ConfigObject

Generates the component related Json Schema.

Returns

dict
Dictionary representing the Json Schema of the component.

validate(self, ctx: DashAI.back.units.context.ExecutionContext) -> None

Defined on BaseUnit

Check preconditions without executing the unit.

Parameters

ctx : ExecutionContext
The shared execution context.

validate_and_transform(self, raw_data: dict) -> dict

Defined on ConfigObject

It takes the data given by the user to initialize the model and returns it with all the objects that the model needs to work.

Parameters

raw_data : dict
A dictionary with the data provided by the user to initialize the model.

Returns

dict
A validated dictionary with the necessary objects.