Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

Abelarm
Copy link
Contributor

@Abelarm Abelarm commented Oct 19, 2025

Reference Issues/PRs

#8978

What does this implement/fix? Explain your changes.

Forces tensorflow to a newer version overall, to avoid the incompatibility issue.

PS: I changed one classifier just for triggering the CI, will revert before merging.

Does your contribution introduce a new dependency? If yes, which one?

No

What should a reviewer concentrate their feedback on?

If we should merge these two lines:

 'numpy<2.2.0; python_version == "3.10"', # numpy > 2.2.0 with tensorflow looks bugged for python 3.10
 'numpy>=1.21,<2.4; python_version != "3.10"',  # required for framework layer and base class logic

into a single:

 "numpy>=1.21,<2.2",  # required for framework layer and base class logic

Answer: YES otherwise it breaks everywhere.

Did you add any tests for the change?

No

Any other comments?

No

PR checklist

For all contributions
  • I've added myself to the list of contributors with any new badges I've earned :-)
  • The PR title starts with either [ENH], [MNT], [DOC], or [BUG]. [BUG] - bugfix, [MNT] - CI, test framework, [ENH] - adding or improving code, [DOC] - writing or improving documentation or docstrings.

@Abelarm
Copy link
Contributor Author

Abelarm commented Oct 19, 2025

It started failing also on other versions and extra dependencies.
I am going to make it the default for all python versions

Copy link
Collaborator

@fkiraly fkiraly left a comment

Choose a reason for hiding this comment

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

we should not change the pyproject - numpy is fine for non-tensorflow based classifiers, I think? Restricted versions can be added to estimator specific python_dependencies.

Also, are we currently absolutely positive that this is an incompatibility between numpy 2.3 and tensorflow?

@Abelarm
Copy link
Contributor Author

Abelarm commented Oct 20, 2025

we should not change the pyproject - numpy is fine for non-tensorflow based classifiers, I think? Restricted versions can be added to estimator specific python_dependencies.

I saw that it was happening as well with networks, that's the reason why I make it broader. But I guess you are right we can set it only for classifiers and networks

Also, are we currently absolutely positive that this is an incompatibility between numpy 2.3 and tensorflow?

absolutely not, BUT what I noticed is that: pre-uv CI installation, and non failing test sets always install numpy==2.1.3 probably due way the dependencies are resolved, and instead with failing test we have numpy== 2.2.6

Sadly THE INTERNET is not really helpful, the general suggestion is to downgrade numpy...

I am fine with adding it only to classifiers and networks but if for whatever reason a different version of numpy is resolved this could happen again.

@fkiraly
Copy link
Collaborator

fkiraly commented Oct 22, 2025

FYI, I pushed a commit which changes this to your other suggested change, lower bound on tensorflow.

@fkiraly fkiraly added the maintenance Continuous integration, unit testing & package distribution label Oct 23, 2025
@fkiraly fkiraly merged commit c6b36ce into sktime:main Oct 23, 2025
295 of 297 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Continuous integration, unit testing & package distribution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants