def __init__(
        self,
        ds: Union[str, HFDatasetType],
        output_schema: type["BaseModel"],
        *args,
        **kwargs,
    ):
        """
        Generator for chain from huggingface datasets.

        Parameters:

        ds : Path or name of the dataset to read from Hugging Face Hub,
            or an instance of `datasets.Dataset`-like object.
        output_schema : Pydantic model for validation.
        """
        super().__init__()
        self.ds = ds
        self.output_schema = output_schema
        self.args = args
        self.kwargs = kwargs

        Generator for chain from huggingface datasets.

        Parameters:

        ds : Path or name of the dataset to read from Hugging Face Hub,
            or an instance of `datasets.Dataset`-like object.
        output_schema : Pydantic model for validation.
        
src/datachain/lib/hf.py