Make tensorflow an optional dependency for Python 3.12+ support#4
Open
HasinthakaPiyumal wants to merge 1 commit into
Open
Make tensorflow an optional dependency for Python 3.12+ support#4HasinthakaPiyumal wants to merge 1 commit into
HasinthakaPiyumal wants to merge 1 commit into
Conversation
tensorflow has no wheel for Python 3.12+ on many platforms (especially Windows). Since it is not required by the core pyutils functionality, move it to optional dependencies installable via `pip install torchonn-pyutils[tf]`. Also update minimum dependency versions for Python 3.12+ compatibility: - numpy>=1.26.0, scipy>=1.11.0, scikit-learn>=1.3.0 - matplotlib>=3.8.0, torch>=2.1.0, torchvision>=0.16.0 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
tensorflowfrom hard dependency to optional extra (pip install torchonn-pyutils[tf])Why
tensorflowhas no wheel for Python 3.12+ on many platforms (especially Windows), causingpip install torchonn-pyutilsto fail. Since tensorflow is not required by the core pyutils functionality, it should be optional.Changes
pyproject.toml: Move tensorflow to[project.optional-dependencies]Test plan
pip install -e .succeeds on Python 3.14.3from pyutils.general import loggerworks without tensorflow installed🤖 Generated with Claude Code