Comments (5)
Thanks for reporting! I've opened a PR with a fix.
from datasets.
@mariosasko The call you linked indeed points to the implementation I linked in my previous comment, yes, but it has no configurability. Arguably, you want to have this hidden backoff under the hood that catches small network disturbances on the time scale of seconds -- perhaps even with hardcoded limits as is the case currently -- but you also still want to have a separate backoff on top of that with the configurability as suggested by @lhoestq in the comment I linked.
My particular use-case is that I'm streaming a dataset while training on a university cluster with a very long scheduling queue. This means that when the backoff runs out of retries (which happens in under 30 seconds with the call you linked), I lose my spot on the cluster and have to queue for a whole day or more. Ideally, I should be able to specify that I want to retry for 2 to 3 hours but with more and more time between requests, so that I can smooth over hours-long outages without a setback of days.
from datasets.
Thanks, @mariosasko! Related question (although I guess this is a feature request): could we have some kind of exponential back-off for these retries? Here's my reasoning:
- If a one-time accidental error happens, you should retry immediately and will succeed immediately.
- If the Hub has a small outage on the order of minutes, you don't want to retry on the order of hours.
- If the Hub has a prologned outage of several hours, we don't want to keep retrying on the order of minutes.
There actually already exists an implementation for (clipped) exponential backoff in the HuggingFace suite (here), but I don't think it is used here.
The requirements are basically that you have an initial minimum waiting time and a maximum waiting time, and with each retry, the waiting time is doubled. We don't want to overload your servers with needless retries, especially when they're down 😅
from datasets.
Oh, I've just remembered that we added retries to the HfFileSystem
in huggingface_hub
0.21.0 (see this), so I'll close the linked PR as we don't want to retry the retries :).
I agree with the exponential backoff suggestion, so I'll open another PR.
from datasets.
I also have my runs crash a surprising amount due to the dataloader crashing because of the hub, some way to address this would be nice.
from datasets.
Related Issues (20)
- Invalid YAML in README.md: unknown tag !<tag:yaml.org,2002:python/tuple>
- Export Parquet Tablet Audio-Set is null bytes in Arrow
- Caching map result of DatasetDict.
- Avoid downloading the whole dataset when only README.me has been touched on hub. HOT 2
- ValueError: Couldn't infer the same data file format for all splits. Got {'train': ('json', {}), 'validation': (None, {})}
- Support for pathlib.Path in datasets 2.19.0
- save_to_disk() freezes when saving on s3 bucket with multiprocessing
- JSON loader implicitly coerces floats to integers
- ExpectedMoreSplits error when using data_dir
- Enable Sharding to Equal Sized Shards
- Supporting FFCV: Fast Forward Computer Vision
- Import sorting is disabled by flake8 noqa directive after switching to ruff linter
- FileNotFoundError:error when loading C4 dataset HOT 5
- to_tf_dataset: Visible devices cannot be modified after being initialized
- load_dataset error HOT 2
- `Dataset.with_format` behaves inconsistently with documentation HOT 1
- load_dataset() should load all subsets, if no specific subset is specified HOT 2
- Remove canonical datasets from docs
- My Private Dataset doesn't exist on the Hub or cannot be accessed HOT 7
- Manual downloads should count as downloads HOT 1
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.