Repository navigation
Closed
Description
Line 1 in ff206e6
| 3.14t |
Next week, that will be upgraded to Python
3.15t.
- CI: Upgrade to free-threaded Python 3.15t #15105
- Support python 3.14 tensorflow/tensorflow#102890 Still does not support Python 3.14
tensorflow is used in the following files:
- computer_vision/cnn_classification.py
- dynamic_programming/k_means_clustering_tensorflow.py
- neural_network/input_data.py
keras is used in the following files:
- computer_vision/cnn_classification.py
- machine_learning/lstm/lstm_prediction.py
Many of these files seem to be how-to-use scripts rather than algorithms as defined in CONTRIBUTING.md.
All of these files must be ignored in our pytests so we are blind to bugs in them.
Python/.github/workflows/build.yml
Lines 42 to 53 in ff206e6
| run: uv run --with=pytest-run-parallel pytest | |
| --iterations=8 --parallel-threads=auto --ignore-gil-enabled | |
| --ignore=computer_vision/cnn_classification.py | |
| --ignore=computer_vision/flip_augmentation.py | |
| --ignore=computer_vision/harris_corner.py | |
| --ignore=computer_vision/mosaic_augmentation.py | |
| --ignore=data_compression/peak_signal_to_noise_ratio.py | |
| --ignore=digital_image_processing/ | |
| --ignore=docs/conf.py | |
| --ignore=dynamic_programming/k_means_clustering_tensorflow.py | |
| --ignore=machine_learning/lstm/lstm_prediction.py | |
| --ignore=neural_network/input_data.py |
We should work to reduce the number of Python files that we ignore when we run pytest.
Metadata
Metadata
Assignees
Labels
No labels
Activity
[-]Should we remove dependencies keras and tensorflow[/-][+]Should we remove dependencies keras and tensorflow?[/+]cclauss commentedon Sep 23, 2026
@priya-sundaram-dev, can you please review these four files? Algorithms or how-to-use scripts? Educational value?
priya-sundaram-dev commentedon Sep 23, 2026
Reviewed all four against CONTRIBUTING.md's "What is an algorithm?" test. My read: none of them are algorithms — remove all four (and the two deps go with them).
dynamic_programming/k_means_clustering_tensorflow.py— ❌ Remove. Three problems at once: (1) miscategorized — k-means isn't dynamic programming; (2) it's dead code — built on the TF1 graph/session API (tf.Session,tf.placeholder,tf.assign) that was removed in TF2, so it can't run on any supported TF; (3) it duplicatesmachine_learning/k_means_clust.py, which is a pure-NumPy k-means we already ship. Nothing lost.neural_network/input_data.py— ❌ Remove. Not an algorithm at all — it's a verbatim copy of TensorFlow's own MNIST download/reader helper (Apache 2016 header) that TF itself marks@deprecated. Its only consumer in the repo isneural_network/gan.py_tf, which isn't a.pyfile and is already excluded. Pure dead utility.computer_vision/cnn_classification.py— ❌ Remove. A how-to-use script: everything lives under__main__, no functions/doctests, and it needs an external TB X-ray dataset the user must download and hand-split. It mirrors the TF "images/cnn" tutorial — teaches "how to call Keras," not an algorithm.machine_learning/lstm/lstm_prediction.py— ❌ Remove. Same shape: all logic in__main__, requires a localsample_data.csv, and just wires up a KerasSequential. It's a usage demo, not an implementation of anything.Net: dropping these four removes every
tensorflow/kerasimport, lets us delete all four--ignorelines frombuild.yml, and unblocks 3.14t/3.15t. I'd suggest also removing the three DIRECTORY.md entries + regenerating. Happy to open the removal PR if you want it.cclauss commentedon Sep 23, 2026
@priya-sundaram-dev Yes, please create that pull request and run
git grep tensorflow && git grep kerasto ensure we remove any stray references. Also, please runuv sync --upgrade && uv lockbefore committing these changes. Thank you.priya-sundaram-dev commentedon Sep 23, 2026
Done — opened #15419. Removed all four files plus the orphaned
machine_learning/lstm/package, droppedkerasfrompyproject.toml, and ranuv sync --upgrade && uv lock(removes absl-py, h5py, keras, ml-dtypes, namex, optree). Also cleared thelibhdf5-devpre-release step from build.yml/sphinx.yml, the four stale--ignore=lines, and the DIRECTORY.md entries.git grep -i -E 'tensorflow|keras'is now clean apart from thekerasin/kerasinedictionary words in strings/. One note in the PR:neural_network/gan.py_tfstill importsinput_data, but its.py_tfextension means it's never collected — left it out of scope, easy to handle separately.Remove tensorflow/keras files and the keras dependency (#15420)
cclauss commentedon Sep 24, 2026
@priya-sundaram-dev please create a pull request that deletes neural_network/gan.py_tf
priya-sundaram-dev commentedon Sep 24, 2026
Done — opened #15422, a focused PR that deletes only
neural_network/gan.py_tf. Happy to follow up with additional single-file deletions (e.g.input_data.py_tf) as separate PRs if you'd prefer to land them incrementally.