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

Fix test_group_by_columns_single_column test in Tabular Test #37

Open
diegomarvid opened this issue Nov 1, 2024 · 0 comments
Open

Fix test_group_by_columns_single_column test in Tabular Test #37

diegomarvid opened this issue Nov 1, 2024 · 0 comments

Comments

@diegomarvid
Copy link
Collaborator

This test is not working

def test_group_by_columns_single_column() -> None:
    """Test to check if the group by columns is correctly applied."""
    dataset = input_data()
    data_container = DataContainer({"is_train": True})
    data_container.flow = dataset

    split_step = TabularSplitStep(train_percentage=0.7, group_by_columns=["category_low"])
    result = split_step.execute(data_container)

    assert isinstance(result, DataContainer)
    assert result.train.shape == (5, 7)
    assert result.validation.shape == (3, 7)
    assert len(result.train["category_low"].unique()) == 1
    assert len(result.validation["category_low"].unique()) == 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant