Skip to content

Fix fetch_tf_model download path handling for newer Keras versions - #955

Open
rashidrao-pk wants to merge 1 commit into
SeldonIO:masterfrom
rashidrao-pk:fix-fetch-tf-model-path
Open

Fix fetch_tf_model download path handling for newer Keras versions#955
rashidrao-pk wants to merge 1 commit into
SeldonIO:masterfrom
rashidrao-pk:fix-fetch-tf-model-path

Conversation

@rashidrao-pk

@rashidrao-pk rashidrao-pk commented Jul 19, 2026

Copy link
Copy Markdown

Summary

This PR fixes fetch_tf_model when used with newer versions of Keras.

Recent versions of Keras no longer accept a full path passed through the fname argument of tf.keras.utils.get_file. Instead, the filename must be provided via fname, while the destination directory is specified using cache_dir.

This change updates fetch_tf_model accordingly, preserving the existing download location while resolving the get_file path error raised by newer Keras releases.

Changes

  • Pass only the filename to tf.keras.utils.get_file.
  • Specify the download directory using cache_dir.
  • Add a regression test verifying that fetch_tf_model calls get_file with the expected arguments.

Testing

Closes #936

Signed-off-by: Muhammad Rashid <muhammadrashid8045@gmail.com>
@CLAassistant

CLAassistant commented Jul 19, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@rashidrao-pk rashidrao-pk changed the title Fix fetch_tf_model path handling for Keras 3 compatibility Fix fetch_tf_model download path handling for newer Keras versions Jul 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

alibi-detect: utils: fetch: "Paths are no longer accepted as the fname argument."

2 participants