diff --git a/src/distilabel/steps/generators/huggingface.py b/src/distilabel/steps/generators/huggingface.py index 6701eafb52..c7eeadb29e 100644 --- a/src/distilabel/steps/generators/huggingface.py +++ b/src/distilabel/steps/generators/huggingface.py @@ -74,6 +74,7 @@ class LoadDataFromHub(GeneratorStep): - `split`: The split of the dataset to load. Defaults to 'train'. - `config`: The configuration of the dataset to load. This is optional and only needed if the dataset has multiple configurations. + - `revision`: The revision of the dataset to load. Defaults to the latest revision. - `streaming`: Whether to load the dataset in streaming mode or not. Defaults to `False`. - `num_examples`: The number of examples to load from the dataset. @@ -122,6 +123,10 @@ class LoadDataFromHub(GeneratorStep): description="The configuration of the dataset to load. This is optional and only" " needed if the dataset has multiple configurations.", ) + revision: Optional[RuntimeParameter[str]] = Field( + default=None, + description="The revision of the dataset to load. Defaults to the latest revision.", + ) streaming: RuntimeParameter[bool] = Field( default=False, description="Whether to load the dataset in streaming mode or not. Defaults to False.", @@ -149,6 +154,7 @@ def load(self) -> None: self.repo_id, # type: ignore self.config, split=self.split, + revision=self.revision, streaming=self.streaming, ) num_examples = self._get_dataset_num_examples() diff --git a/tests/integration/test_multiple_replicas.py b/tests/integration/test_multiple_replicas.py index 0f7226d0f3..26d0f19b57 100644 --- a/tests/integration/test_multiple_replicas.py +++ b/tests/integration/test_multiple_replicas.py @@ -17,6 +17,7 @@ from typing import TYPE_CHECKING import pytest + from distilabel.pipeline import Pipeline from distilabel.steps import LoadDataFromDicts, StepInput, StepResources, step diff --git a/tests/unit/steps/tasks/test_pair_rm.py b/tests/unit/steps/tasks/test_pair_rm.py index 22d8d3c454..1903ccfb2f 100644 --- a/tests/unit/steps/tasks/test_pair_rm.py +++ b/tests/unit/steps/tasks/test_pair_rm.py @@ -15,11 +15,13 @@ from unittest.mock import MagicMock, patch import numpy as np +import pytest from distilabel.pipeline.local import Pipeline from distilabel.steps.tasks.pair_rm import PairRM +@pytest.mark.skip(reason="Not maintained and to be deprecated.") @patch("llm_blender.Blender") class TestPairRM: def test_process(self, mocker: MagicMock) -> None: diff --git a/tests/unit/steps/tasks/test_ultrafeedback.py b/tests/unit/steps/tasks/test_ultrafeedback.py index 152509f993..5565065d61 100644 --- a/tests/unit/steps/tasks/test_ultrafeedback.py +++ b/tests/unit/steps/tasks/test_ultrafeedback.py @@ -15,6 +15,7 @@ from typing import Any, Dict, List, Union import pytest + from distilabel.llms.base import LLM from distilabel.llms.typing import GenerateOutput from distilabel.steps.tasks.typing import ChatType diff --git a/tests/unit/steps/tasks/test_urial.py b/tests/unit/steps/tasks/test_urial.py index 2075d98e6e..055e1a669f 100644 --- a/tests/unit/steps/tasks/test_urial.py +++ b/tests/unit/steps/tasks/test_urial.py @@ -13,8 +13,8 @@ # limitations under the License. import pytest -from distilabel.steps.tasks.urial import URIAL +from distilabel.steps.tasks.urial import URIAL from tests.unit.conftest import DummyLLM diff --git a/tests/unit/steps/test_truncate.py b/tests/unit/steps/test_truncate.py index b268080336..52a07d6642 100644 --- a/tests/unit/steps/test_truncate.py +++ b/tests/unit/steps/test_truncate.py @@ -15,6 +15,7 @@ from typing import Optional import pytest + from distilabel.steps.truncate import TruncateTextColumn