Skip to content
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

Remove deprecated CombineColumns step #1101

Merged
merged 3 commits into from
Jan 17, 2025
Merged
Changes from 1 commit
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
Next Next commit
Remove deprecated CombineColumns step
gabrielmbmb committed Jan 17, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit b94974992af4a003bfa54876fa4dd536b5fd7dd6
15 changes: 1 addition & 14 deletions src/distilabel/steps/columns/group.py
Original file line number Diff line number Diff line change
@@ -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

@@ -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
@@ -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:
@@ -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")