You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Should we remove dependencies keras and tensorflow? #15418
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 duplicates machine_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 is neural_network/gan.py_tf, which isn't a .py file 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 local sample_data.csv, and just wires up a Keras Sequential. It's a usage demo, not an implementation of anything.
Net: dropping these four removes every tensorflow/keras import, lets us delete all four --ignore lines from build.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.
@priya-sundaram-dev Yes, please create that pull request and run git grep tensorflow && git grep keras to ensure we remove any stray references. Also, please run uv sync --upgrade && uv lock before committing these changes. Thank you.
Done — opened #15419. Removed all four files plus the orphaned machine_learning/lstm/ package, dropped keras from pyproject.toml, and ran uv sync --upgrade && uv lock (removes absl-py, h5py, keras, ml-dtypes, namex, optree). Also cleared the libhdf5-dev pre-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 the kerasin/kerasine dictionary words in strings/. One note in the PR: neural_network/gan.py_tf still imports input_data, but its .py_tf extension means it's never collected — left it out of scope, easy to handle separately.
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.
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.