Remove tensorflow/keras files and the keras dependency - #15419
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.
Closing this pull request as invalid@priya-sundaram-dev, this pull request is being closed as none of the checkboxes have been marked. It is important that you go through the checklist and mark the ones relevant to this pull request. Please read the Contributing guidelines. If you're facing any problem on how to mark a checkbox, please read the following instructions:
NOTE: Only |
|
Reopened as #15420 with the checklist filled in (the keeper bot auto-closed this one because none of the template boxes were marked — my oversight, since it's a coordinated removal PR rather than a single-algorithm add). Continuing there. |
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.