Skip to content

Remove deprecated CombineColumns step #1101

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading