Upload standard.py with huggingface_hub
Browse files186 unmodified lines18718818919019119219319419519619727 unmodified lines2252262272232282292302312 unmodified lines234235236232233237238239186 unmodified lines return list(multi_stream["__inference__"])
def prepare(self): # To avoid the Python's mutable default list trap, we set the default value to None # and then set it to an empty list if it is None. if self.card.preprocess_steps is None: self.card.preprocess_steps = []
self.set_pipelines()
loader = self.card.loader27 unmodified lines self.augmentor.set_task_input_fields(self.card.task.augmentable_inputs) self.processing.steps.append(self.augmentor)
if self.demos_pool_size is not None: if self.num_demos > 0: self.processing.steps.append( CreateDemosPool( from_split=self.demos_taken_from,2 unmodified lines remove_targets_from_source_split=self.demos_removed_from_data, ) )
if self.num_demos > 0: if self.sampler is None: if self.card.sampler is None: raise ValueError(standard.py+6-3