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

[python-package] Infer feature names from pyarrow.Table #6781

Merged
merged 7 commits into from
Jan 11, 2025

Conversation

mlondschien
Copy link
Contributor

Bugfix for #6780.

@mlondschien
Copy link
Contributor Author

xref #6782. This bugfix works only if cffi is installed.

@mlondschien mlondschien marked this pull request as ready for review January 9, 2025 20:17
@mlondschien
Copy link
Contributor Author

@microsoft-github-policy-service agree

Copy link
Collaborator

@borchero borchero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once CI passes, this looks good to me, thank you for the fix!

@jameslamb jameslamb added the fix label Jan 9, 2025
@jameslamb jameslamb changed the title Infer feature names from pyarrow.Table [python-package] Infer feature names from pyarrow.Table Jan 9, 2025
Copy link
Collaborator

@jameslamb jameslamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this! I disagree with @borchero though, I don't think this is ready to merge yet. Please see my first round of suggestions.

tests/python_package_test/test_arrow.py Outdated Show resolved Hide resolved
tests/python_package_test/test_arrow.py Outdated Show resolved Hide resolved
tests/python_package_test/test_arrow.py Outdated Show resolved Hide resolved
python-package/lightgbm/basic.py Outdated Show resolved Hide resolved
@jameslamb jameslamb self-requested a review January 9, 2025 21:13
python-package/lightgbm/basic.py Outdated Show resolved Hide resolved
@mlondschien
Copy link
Contributor Author

I didn't find any changelog to update.

@jameslamb
Copy link
Collaborator

I didn't find any changelog to update.

Thanks for being thorough. We don't keep a changelog in source control here.

Every pull request is squash merged (1 PR = 1 commit), and the PR titles are used to auto-generate a changelog.

Copy link
Collaborator

@jameslamb jameslamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great fix, thank you!

I ran these tests on latest master and confirmed they both fail.

FAILED tests/python_package_test/test_arrow.py::test_arrow_feature_name_auto - TypeError: Wrong type(str) or unknown name(a) in categorical_feature

FAILED tests/python_package_test/test_arrow.py::test_arrow_feature_name_manual - AssertionError: assert ['a', 'b'] == ['c', 'd']

@jameslamb jameslamb merged commit e61bcbe into microsoft:master Jan 11, 2025
48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants