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

Add support for returning file list and multi-thread download #34

Merged
merged 4 commits into from
Dec 6, 2024

Conversation

Nik-V9
Copy link
Contributor

@Nik-V9 Nik-V9 commented Aug 22, 2024

Made minor changes to the download module to support return of entire file list.

Added an example multi-thread download script to enable quick download of entire dataset. The file also has a retry logic to enable download of failed zip files.

@Amigoshan
Copy link
Collaborator

Thanks for the PR! I found a few problems. Could you modify the interfaces so that they are consistent with other interfaces in the examples? I suggest that we have an interface like this:
ta.multi_thread_download(env = env,
difficulty = ['easy', 'hard'],
modality = ['image', 'depth'],
camera_name = ['lcam_front', 'lcam_right', 'lcam_back', 'lcam_left', 'lcam_top', 'lcam_bottom'],
unzip = True,
num_workers = 8)
In the current package, the data_root is already defined in the initialization function. Defining another one using argparse is confusing.
I don't understand why you added one return value targetfilelist to the download function. It is not used in the example file.

I think one better way is to add the multi-thread function into the downloader.py, using a similar interface as the existing download function. We can keep track of the failed files and restart the download for them.

@Amigoshan Amigoshan merged commit d8938e6 into main Dec 6, 2024
2 checks passed
@Amigoshan Amigoshan deleted the multi_thread_download branch December 6, 2024 12:30
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.

3 participants