Remove tensorflow/keras files and the keras dependency - #15420
Open
priya-sundaram-dev wants to merge 1 commit into
Open
priya-sundaram-dev wants to merge 1 commit into
priya-sundaram-dev wants to merge 1 commit into
Conversation
Per discussion in TheAlgorithms#15418, these four files are not algorithms (they are how-to-use scripts wrapping a deep-learning framework) and dragged in the heavy keras/tensorflow dependency stack: - computer_vision/cnn_classification.py - dynamic_programming/k_means_clustering_tensorflow.py - machine_learning/lstm/lstm_prediction.py - neural_network/input_data.py (TF MNIST data loader; nothing imports it) Also removes the now-orphaned machine_learning/lstm/ package (only __init__.py + sample_data.csv, which served lstm_prediction.py). Cleanups: - Drop keras from pyproject.toml dependencies; regenerate uv.lock (removes absl-py, h5py, keras, ml-dtypes, namex, optree). - Remove the pre-release libhdf5-dev install step from build.yml and sphinx.yml (it existed only because keras needs hdf5). - Drop the four stale pytest --ignore entries in build.yml. - Remove the four DIRECTORY.md entries and the empty Lstm heading.
12 tasks
This branch has not been deployed
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.
Reopens the cleanup from #15418 (my earlier #15419 was auto-closed by the keeper bot for an unmarked checklist — this PR fills it in).
Closes the cleanup discussed in #15418.
These four files aren't algorithms — they're how-to-use scripts that wrap a deep-learning framework, and they were the only thing dragging in the heavy
keras/tensorflowstack:computer_vision/cnn_classification.pydynamic_programming/k_means_clustering_tensorflow.pymachine_learning/lstm/lstm_prediction.pyneural_network/input_data.py— a TensorFlow MNIST data loader;git grepconfirms nothing under a collected.pypath imports it.I also removed the now-orphaned
machine_learning/lstm/package (only__init__.py+sample_data.csv, which existed solely forlstm_prediction.py).Cleanups
keras>=3.7frompyproject.tomland ranuv sync --upgrade && uv lock. The lock now resolves 80 packages; removedabsl-py,h5py,keras,ml-dtypes,namex,optree(plus minor bumps to fonttools/httpcore2/httpx2 from--upgrade).# keras needs hdf5 on pre-release Pythonlibhdf5-devinstall step from bothbuild.ymlandsphinx.yml— it only existed for keras.--ignore=entries inbuild.yml.DIRECTORY.mdentries and the emptyLstmheading.Verification
git grep -i -E 'tensorflow|keras'now returns only English dictionary words instrings/anagrams.txt/strings/words.txt(kerasin/kerasine), never the library.One thing left in place
neural_network/gan.py_tfstillimport input_data, but its.py_tfextension means it is not collected or executed anywhere, and it's out of scope for this PR. Happy to remove or restore it separately if you'd like.Describe your change
keras/tensorflowdependency they dragged in (per Should we remove dependencies keras and tensorflow? #15418).DIRECTORY.md.Checklist
lstm/package, as agreed in Should we remove dependencies keras and tensorflow? #15418.