Skip to content

Fix several recent issues from transformers, pandas, gpytorch#1134

Merged
BenjaminBossan merged 7 commits intomasterfrom
fix-several-recent-issues-transformers-pandas-gpytorch
Feb 25, 2026
Merged

Fix several recent issues from transformers, pandas, gpytorch#1134
BenjaminBossan merged 7 commits intomasterfrom
fix-several-recent-issues-transformers-pandas-gpytorch

Conversation

@BenjaminBossan
Copy link
Collaborator

@BenjaminBossan BenjaminBossan commented Feb 16, 2026

  1. Transformers v5: T5 now gives slightly different numerical results. I haven't investigated why, there were many changes in v5, it's probably not worth digging into. I just updated the tests to reflect the new results.
  2. Transformers v5: The repr of tokenizer instances changed.
  3. Transformers v5: hasattr(model, 'get_encoder') is no longer a reliable way to identify encoder-decoder models. Using model.config.is_encoder_decoder now. I checked that the attribute exists in transformers v4.37.2 (release 2 years ago) and it's there, so this should be a safe change.
  4. Pandas v3: dtype-related error message changed. Note that I split a parametrized test into two tests as the error message now depends on the input dtype. Also, I had to take into account that the error message now depends on whether pyarrow is installed or not. Finally, as pandas 3 is not available for Python 3.10, I had to add a version check and change the error message conditionally.
  5. GPyTorch v1.15: Some objects are no longer pickle-able. It's probably not fixable on the skorch side. For now, I pinned the version to <= 1.14 and opened an issue ([Bug] Can't pickle function CholLinearOperator.to_dense cornellius-gp/gpytorch#2717).

- Some numerical differences from T5
- Tokenizer repr has changed
Cannot simply parametrize it, as the parameters now result in different
error messages. Split it into two different tests instead.
I had a different error message locally because pyarrow was installed
-__-
Pandas 3 is not available for Python 3.10, so change the error message
back in that case.
df = df.assign(invalid=data)
if pandas_ge3:
msg = (
r"Cannot interpret '<StringDtype\("
Copy link
Member

Choose a reason for hiding this comment

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

This error message is less obvious about what is wrong compared to "The following columns have dtypes that cannot be interpreted as"`. Is there a way to keep the original error message?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That was a great suggestion, done.

Allows to mostly revert the pandas tests.
@BenjaminBossan BenjaminBossan merged commit 0ec5dbe into master Feb 25, 2026
16 checks passed
@BenjaminBossan BenjaminBossan deleted the fix-several-recent-issues-transformers-pandas-gpytorch branch February 25, 2026 10:57
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

Successfully merging this pull request may close these issues.

2 participants