Skip to content

[python-package] Exclude weight_column from text Dataset features#7198

Open
shiyu1994 wants to merge 1 commit intomasterfrom
fix/issue-6856-root
Open

[python-package] Exclude weight_column from text Dataset features#7198
shiyu1994 wants to merge 1 commit intomasterfrom
fix/issue-6856-root

Conversation

@shiyu1994
Copy link
Copy Markdown
Collaborator

Summary

  • fix text-file Dataset loading so metadata columns (including weight_column) are excluded from model features
  • keep metadata extraction for weight/group columns unchanged
  • add a regression test covering file-based training + prediction input shape

Testing

  • PYTHONPATH=python-package /root/miniconda3/envs/lightgbm/bin/python -m pytest tests/python_package_test/test_engine.py -k "text_dataset_with_weight_column_excludes_weight_from_features" -q
  • PYTHONPATH=python-package /root/miniconda3/envs/lightgbm/bin/python -m pytest tests/python_package_test/test_engine.py -k "dataset_update_params" -q
  • PYTHONPATH=python-package /root/miniconda3/envs/lightgbm/bin/python -m pytest tests/python_package_test/test_engine.py -k "feature_name" -q

Fixes #6856

Copy link
Copy Markdown
Member

@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.

This is not passing the tests. I'll mark it in progress for now, @ me for a review when it's ready and I'd be happy to look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[python-package] column in 'weight_column' is still included in features

2 participants