Support streaming in size estimation function in `push_to_hub`
{'login': 'mariosasko', 'id': 47462742, 'node_id': 'MDQ6VXNlcjQ3NDYyNzQy', 'avatar_url': 'https://avatars.githubusercontent.com/u/47462742?v=4', 'gravatar_id': '', 'url': 'https://api.github.com/users/mariosasko', 'html_url': 'https://github.com/mariosasko', 'followers_url': 'https://api.github.com/users/mariosasko/followers', 'following_url': 'https://api.github.com/users/mariosasko/following{/other_user}', 'gists_url': 'https://api.github.com/users/mariosasko/gists{/gist_id}', 'starred_url': 'https://api.github.com/users/mariosasko/starred{/owner}{/repo}', 'subscriptions_url': 'https://api.github.com/users/mariosasko/subscriptions', 'organizations_url': 'https://api.github.com/users/mariosasko/orgs', 'repos_url': 'https://api.github.com/users/mariosasko/repos', 'events_url': 'https://api.github.com/users/mariosasko/events{/privacy}', 'received_events_url': 'https://api.github.com/users/mariosasko/received_events', 'type': 'User', 'site_admin': False}
[]
[]
['would this allow to include the size in the dataset info without downloading the files? related to https://github.com/huggingface/datasets/pull/3670'
 '@severo I don\'t think so. We could use this to get `info.download_checksums["num_bytes"]`, but we must process the files to get the rest of the size info. ']
{'url': 'https://api.github.com/repos/huggingface/datasets/pulls/3732', 'html_url': 'https://github.com/huggingface/datasets/pull/3732', 'diff_url': 'https://github.com/huggingface/datasets/pull/3732.diff', 'patch_url': 'https://github.com/huggingface/datasets/pull/3732.patch', 'merged_at': datetime.datetime(2022, 2, 21, 18, 18, 44)}
This PR adds the streamable version of `os.path.getsize` (`fsspec` can return `None`, so we fall back to `fs.open` to make it more robust) to account for possible streamable paths in the nested `extra_nbytes_visitor` function inside `push_to_hub`.
{'url': 'https://api.github.com/repos/huggingface/datasets/issues/3732/reactions', 'total_count': 0, '+1': 0, '-1': 0, 'laugh': 0, 'hooray': 0, 'confused': 0, 'heart': 0, 'rocket': 0, 'eyes': 0}