Giter VIP home page Giter VIP logo

Comments (5)

richarddwang avatar richarddwang commented on May 21, 2024 1

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.

lhoestq avatar lhoestq commented on May 21, 2024 1

The download manager supports local directories. You can specify a local directory instead of a url and it should work.

from datasets.

thomwolf avatar thomwolf commented on May 21, 2024

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.

MaveriQ avatar MaveriQ commented on May 21, 2024

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.

lhoestq avatar lhoestq commented on May 21, 2024

Closing this one.
Feel free to re-open if you have other questions :)

from datasets.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.