Skip to content

Commit

Permalink
Remove deprecated CombineColumns step (#1101)
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielmbmb authored Jan 17, 2025
1 parent 2c85dcc commit d04f069
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 33 deletions.
3 changes: 1 addition & 2 deletions src/distilabel/steps/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
from distilabel.steps.clustering.umap import UMAP
from distilabel.steps.columns.combine import CombineOutputs
from distilabel.steps.columns.expand import ExpandColumns
from distilabel.steps.columns.group import CombineColumns, GroupColumns
from distilabel.steps.columns.group import GroupColumns
from distilabel.steps.columns.keep import KeepColumns
from distilabel.steps.columns.merge import MergeColumns
from distilabel.steps.decorator import step
Expand Down Expand Up @@ -60,7 +60,6 @@
__all__ = [
"DBSCAN",
"UMAP",
"CombineColumns",
"CombineOutputs",
"ConversationTemplate",
"DataSampler",
Expand Down
15 changes: 1 addition & 14 deletions src/distilabel/steps/columns/group.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import warnings
from typing import TYPE_CHECKING, Any, List, Optional
from typing import TYPE_CHECKING, List, Optional

from typing_extensions import override

Expand Down Expand Up @@ -125,15 +124,3 @@ def process(self, *inputs: StepInput) -> "StepOutput":
group_columns=self.inputs,
output_group_columns=self.outputs,
)


class CombineColumns(GroupColumns):
"""`CombineColumns` is deprecated and will be removed in version 1.5.0, use `GroupColumns` instead."""

def __init__(self, **data: Any) -> None:
warnings.warn(
"`CombineColumns` is deprecated and will be removed in version 1.5.0, use `GroupColumns` instead.",
DeprecationWarning,
stacklevel=2,
)
return super().__init__(**data)
17 changes: 1 addition & 16 deletions tests/unit/steps/columns/test_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,9 @@
# limitations under the License.


import pytest

from distilabel.constants import DISTILABEL_METADATA_KEY
from distilabel.pipeline.local import Pipeline
from distilabel.steps.columns.group import CombineColumns, GroupColumns
from distilabel.steps.columns.group import GroupColumns


class TestGroupColumns:
Expand Down Expand Up @@ -58,16 +56,3 @@ def test_process(self) -> None:
DISTILABEL_METADATA_KEY: {"model": ["model-1", "model-2"]},
}
]


def test_CombineColumns_deprecation_warning():
with pytest.deprecated_call():
CombineColumns(
name="combine_columns",
columns=["generation", "model_name"],
)
from packaging.version import Version

import distilabel

assert Version(distilabel.__version__) <= Version("1.5.0")
1 change: 0 additions & 1 deletion tests/unit/test_imports.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ def test_imports() -> None:

from distilabel.steps import (
StepResources,
CombineColumns,
GroupColumns,
MergeColumns,
ConversationTemplate,
Expand Down

0 comments on commit d04f069

Please sign in to comment.