Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support rar archive file format extraction in keras.utils.get_file #19455

Open
innat opened this issue Apr 6, 2024 · 2 comments
Open

Support rar archive file format extraction in keras.utils.get_file #19455

innat opened this issue Apr 6, 2024 · 2 comments
Assignees
Labels
stat:awaiting keras-eng Awaiting response from Keras engineer type:feature The user is asking for a new feature.

Comments

@innat
Copy link

innat commented Apr 6, 2024

Currently, the keras.utils.get_file with extract supports zip and tar format. But not rar format.

url = 'https://www.crcv.ucf.edu/data/UCF101/UCF101.rar'
keras.utils.get_file(
    origin=url,
    cache_subdir='custom/',
    extract=True,
)
/tmp/ipykernel_34/1693670741.py:3: UserWarning: Could not extract archive.
  keras.utils.get_file(
@fchollet
Copy link
Member

fchollet commented Apr 6, 2024

Thanks for the suggestion! It seems this requires an external library to handle rar files -- it cannot be done with the Python standard library. What's the most popular one? We could add it as an optional dependency. Are you willing to open a PR?

@innat
Copy link
Author

innat commented Apr 6, 2024

it cannot be done with the Python standard library. What's the most popular one? We could add it as an optional dependency.

I often use linux cmd. For python API, this or this looks more popular. Here is another which uses subprocess.

Are you willing to open a PR?

No promise, but looking into this.

@sachinprasadhs sachinprasadhs added type:feature The user is asking for a new feature. stat:awaiting keras-eng Awaiting response from Keras engineer labels Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stat:awaiting keras-eng Awaiting response from Keras engineer type:feature The user is asking for a new feature.
Projects
None yet
Development

No branches or pull requests

3 participants