Repository navigation
Conversation
Collaborator
|
Thanks for the PR. As maintainers of skorch, we decided to update the status of the skorch project. As a consequence, we will close this PR. Your effort is still appreciated. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1176.
A filtered pandas categorical column can retain codes such as
[0, 2].describe_signaturecounts two observed codes and suggests an embedding with two entries, which then raisesIndexErrorfor code 2.Use the declared category count so the suggested embedding covers the full vocabulary. The regression tests cover unused middle and final categories, empty subsets, and ordered categories, including embedding calls on both the subset and the full vocabulary. The docstring and changelog describe the corrected behavior.
This is separate from #1172, which preserves inferred integer codes between batches and leaves this count unchanged.
Validation on Python 3.12.11, pandas 3.0.6 and PyTorch 2.14.1 (macOS arm64):
python -m pytest skorch/tests/test_helper.py --no-cov -q: 201 passed. The six new cases all fail on unchanged master; the unchanged helper suite passes all 195 tests.python -m pytest skorch/tests/test_helper.py skorch/tests/test_utils.py --no-cov -q: 306 passed, 21 skipped.sphinx-build -b html docs ../skorch-docs: succeeded with the same 15 warnings as unchanged master.flake8 --max-line-length=88 skorch/helper.py skorch/tests/test_helper.py: two existing test-file diagnostics, both reproduced on unchanged master.pylint skorch: reports repository-wide diagnostics. Comparing the touched files against unchanged master leaves one addedno-self-usestyle warning on the new test method, which follows the surrounding class convention.git diff --check: passed.The full local suite was interrupted during the GPT-2 download after 338 passed and 29 skipped. This is an incomplete run, not a full-suite pass. The Linux CI workflow is awaiting maintainer approval and has not started any jobs.