Comments (5)
Hi @MaveriQ , although what I am doing is to commit a new dataset, but I think looking at imdb script might help.
You may want to use dl_manager.download_custom
, give it a url(arbitrary string), a custom_download(arbitrary function) and return a path, and finally use _get sample to fetch a sample.
from datasets.
The download manager supports local directories. You can specify a local directory instead of a url and it should work.
from datasets.
Hi @zphang,
So you can just give the local path to a dataset script file and it should work.
Here is an example:
- you can download one of the scripts in the
datasets
folder of the present repo (or clone the repo) - then you can load it with
load_dataset('PATH/TO/YOUR/LOCAL/SCRIPT.py')
Does it make sense?
from datasets.
Could you give a more concrete example, please?
I looked up wikitext dataset script from the repo. Should I just overwrite the data_file
on line 98 to point to the local dataset directory? Would it work for different configurations of wikitext (wikitext2, wikitext103 etc.)?
Or maybe we can use DownloadManager to specify local dataset location? In that case, where do we use DownloadManager instance?
Thanks
from datasets.
Closing this one.
Feel free to re-open if you have other questions :)
from datasets.
Related Issues (20)
- CI fails on Windows for test_delete_from_hub and test_xgetsize_private due to new-line character HOT 1
- Segmentation fault HOT 2
- CI fails after huggingface_hub-0.23.0 release: FutureWarning: "resume_download" HOT 3
- Revert temporary pin huggingface-hub < 0.23.0
- Dataset 'rewardsignal/reddit_writing_prompts' doesn't exist on the Hub HOT 1
- Example on Semantic segmentation contains bug
- DataFilesNotFoundError for datasets in the open-llm-leaderboard HOT 3
- Improve performance of JSON loader HOT 5
- datasets.BuilderConfig does not work. HOT 1
- Download is broken for dict of dicts: FileNotFoundError
- OSError: [Errno 24] Too many open files HOT 5
- Batched mapping does not raise an error if values for an existing column are empty
- Webdataset: KeyError: 'png' on some datasets when streaming HOT 5
- AttributeError: module 'PIL.Image' has no attribute 'ExifTags'
- Connection Error When Using By-pass Proxies HOT 1
- CI is broken after jax-0.4.27 release: AttributeError: 'jaxlib.xla_extension.DeviceList' object has no attribute 'device'
- load_dataset with data_dir and cache_dir set fail with not supported
- FAISS load to None HOT 1
- add `with_transform` and/or `set_transform` to IterableDataset
- Unable to load JSON saved using `to_json` HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from datasets.