def from_webdataset(self, shards: List[str], pipeline: Callable):
        """Read from webdataset-like format.
        See https://docs.ffcv.io/writing_datasets.html#webdataset for sample usage.

        Parameters
        ----------
        shards: List[str]
            List of shards that comprise the dataset folder.
        pipeline: Callable
            Called by each worker to decode. Similar to pipelines used to load webdataset.
        """
        counter = partial(count_samples_in_shard, pipeline=pipeline)
        lengths = thread_map(counter, shards, max_workers=self.num_workers)
        total_len = sum(lengths)

        offsets = np.cumsum([0] + lengths)[:-1]

        todos = zip(shards, offsets)
        self._write_common(total_len, todos, worker_job_webdataset, (pipeline, ))
Read from webdataset-like format.
        See https://docs.ffcv.io/writing_datasets.html#webdataset for sample usage.

        Parameters
        ----------
        shards: List[str]
            List of shards that comprise the dataset folder.
        pipeline: Callable
            Called by each worker to decode. Similar to pipelines used to load webdataset.
        
ffcv/writer.py