Skip to content

Commit

Permalink
Merge branch 'main' into video
Browse files Browse the repository at this point in the history
  • Loading branch information
lhoestq committed Oct 23, 2024
2 parents d1ed11a + a953002 commit d263ad7
Show file tree
Hide file tree
Showing 12 changed files with 221 additions and 128 deletions.
4 changes: 2 additions & 2 deletions .github/conda/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ requirements:
- dataclasses
- multiprocess
- fsspec
- huggingface_hub >=0.22.0,<1.0.0
- huggingface_hub >=0.23.0,<1.0.0
- packaging
- aiohttp
run:
Expand All @@ -41,7 +41,7 @@ requirements:
- dataclasses
- multiprocess
- fsspec
- huggingface_hub >=0.22.0,<1.0.0
- huggingface_hub >=0.23.0,<1.0.0
- packaging
- aiohttp

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
run: uv pip install --system --upgrade pyarrow huggingface-hub "dill<0.3.9"
- name: Install dependencies (minimum versions)
if: ${{ matrix.deps_versions != 'deps-latest' }}
run: uv pip install --system pyarrow==15.0.0 huggingface-hub==0.22.0 transformers dill==0.3.1.1
run: uv pip install --system pyarrow==15.0.0 huggingface-hub==0.23.5 transformers dill==0.3.1.1
- name: Test with pytest
run: |
python -m pytest -rfExX -m ${{ matrix.test }} -n 2 --dist loadfile -sv ./tests/
Expand Down
2 changes: 1 addition & 1 deletion docs/source/image_dataset.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

There are two methods for creating and sharing an image dataset. This guide will show you how to:

* Create an audio dataset from local files in python with [`Dataset.push_to_hub`]. This is an easy way that requires only a few steps in python.
* Create an image dataset from local files in python with [`Dataset.push_to_hub`]. This is an easy way that requires only a few steps in python.

* Create an image dataset with `ImageFolder` and some metadata. This is a no-code solution for quickly creating an image dataset with several thousand images.

Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
# for data streaming via http
"aiohttp",
# To get datasets from the Datasets Hub on huggingface.co
"huggingface-hub>=0.22.0",
"huggingface-hub>=0.23.0",
# Utilities from PyPA to e.g., compare versions
"packaging",
# To parse YAML metadata from dataset cards
Expand Down Expand Up @@ -235,7 +235,7 @@

setup(
name="datasets",
version="3.0.2.dev0", # expected format is one of x.y.z.dev0, or x.y.z.rc1 or x.y.z (no to dashes, yes to dots)
version="3.0.3.dev0", # expected format is one of x.y.z.dev0, or x.y.z.rc1 or x.y.z (no to dashes, yes to dots)
description="HuggingFace community-driven open-source library of datasets",
long_description=open("README.md", encoding="utf-8").read(),
long_description_content_type="text/markdown",
Expand Down
2 changes: 1 addition & 1 deletion src/datasets/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "3.0.2.dev0"
__version__ = "3.0.3.dev0"

from .arrow_dataset import Dataset
from .arrow_reader import ReadInstruction
Expand Down
6 changes: 5 additions & 1 deletion src/datasets/download/download_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,11 @@ def _download_batched(
download_func = partial(self._download_single, download_config=download_config)

fs: fsspec.AbstractFileSystem
fs, path = url_to_fs(url_or_filenames[0], **download_config.storage_options)
path = str(url_or_filenames[0])
if is_relative_path(path):
# append the relative path to the base_path
path = url_or_path_join(self._base_path, path)
fs, path = url_to_fs(path, **download_config.storage_options)
size = 0
try:
size = fs.info(path).get("size", 0)
Expand Down
Loading

0 comments on commit d263ad7

Please sign in to comment.