facebookresearch/DPR

[Feature Request] Allowing unix-style pattern matching in `download_data.py`

xhluca opened this issue · 0 comments

Right now, you need to enter the exact name of each file required, which is quite time consuming. It would be nice to allow more flexibility in using python data/download_data.py. For example, the --resource flag could accept unix-style pattern matching, e.g.

# Download all file starting with data.retriever
python data/download_data.py --resource "data.retriever.*" 

# Download dev splits of retriever
python data/download_data.py --resource "data.retriever.*-dev" 

# Download all data
python data/download_data.py --resource "data.*" 

This can be easily done with fnmatch. I have personally implemented that and I'm happy to open a PR if it's welcomed