Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App fails to load dataset when using Docker #2

Open
02alexander opened this issue May 2, 2024 · 1 comment
Open

App fails to load dataset when using Docker #2

02alexander opened this issue May 2, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@02alexander
Copy link
Collaborator

02alexander commented May 2, 2024

If I run the app through a Docker container the app fails with get the following error message when I try to visualize any dataset. If I run the app outside the docker container it works fine.

Downloading readme: 100%|██████████| 677/677 [00:00<00:00, 10.2MB/s]
Traceback (most recent call last):
  File "/home/user/.local/lib/python3.11/site-packages/gradio/queueing.py", line 527, in process_events
    response = await route_utils.call_process_api(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.local/lib/python3.11/site-packages/gradio/route_utils.py", line 261, in call_process_api
    output = await app.get_blocks().process_api(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.local/lib/python3.11/site-packages/gradio/blocks.py", line 1788, in process_api
    result = await self.call_function(
             ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.local/lib/python3.11/site-packages/gradio/blocks.py", line 1340, in call_function
    prediction = await anyio.to_thread.run_sync(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.local/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2144, in run_sync_in_worker_thread
    return await future
           ^^^^^^^^^^^^
  File "/home/user/.local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 851, in run
    result = context.run(func, *args)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.local/lib/python3.11/site-packages/gradio/utils.py", line 759, in wrapper
    response = f(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^
  File "/home/user/app/app.py", line 53, in show_dataset
    dataset = load_dataset(dataset_id, split="train", streaming=True)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.local/lib/python3.11/site-packages/datasets/load.py", line 2587, in load_dataset
    builder_instance = load_dataset_builder(
                       ^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.local/lib/python3.11/site-packages/datasets/load.py", line 2259, in load_dataset_builder
    dataset_module = dataset_module_factory(
                     ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.local/lib/python3.11/site-packages/datasets/load.py", line 1910, in dataset_module_factory
    raise e1 from None
  File "/home/user/.local/lib/python3.11/site-packages/datasets/load.py", line 1892, in dataset_module_factory
    ).get_module()
      ^^^^^^^^^^^^
  File "/home/user/.local/lib/python3.11/site-packages/datasets/load.py", line 1237, in get_module
    dataset_infos = DatasetInfosDict.from_dataset_card_data(dataset_card_data)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.local/lib/python3.11/site-packages/datasets/info.py", line 464, in from_dataset_card_data
    dataset_info = DatasetInfo._from_yaml_dict(dataset_card_data["dataset_info"])
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.local/lib/python3.11/site-packages/datasets/info.py", line 395, in _from_yaml_dict
    yaml_data["features"] = Features._from_yaml_list(yaml_data["features"])
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.local/lib/python3.11/site-packages/datasets/features/features.py", line 1910, in _from_yaml_list
    return cls.from_dict(from_yaml_inner(yaml_data))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.local/lib/python3.11/site-packages/datasets/features/features.py", line 1750, in from_dict
    obj = generate_from_dict(dic)
          ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.local/lib/python3.11/site-packages/datasets/features/features.py", line 1392, in generate_from_dict
    return {key: generate_from_dict(value) for key, value in obj.items()}
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.local/lib/python3.11/site-packages/datasets/features/features.py", line 1392, in <dictcomp>
    return {key: generate_from_dict(value) for key, value in obj.items()}
                 ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.local/lib/python3.11/site-packages/datasets/features/features.py", line 1398, in generate_from_dict
    raise ValueError(f"Feature type '{_type}' not found. Available feature types: {list(_FEATURE_TYPES.keys())}")
ValueError: Feature type 'VideoFrame' not found. Available feature types: ['Value', 'ClassLabel', 'Translation', 'TranslationVariableLanguages', 'Sequence', 'Array2D', 'Array3D', 'Array4D', 'Array5D', 'Audio', 'Image']

Steps to reproduce

git clone https://github.com/rerun-io/python-example-huggingface/
cd python-example-huggingface
docker build . -t example-huggingface
docker run --rm --net=host example-huggingface

Then go to 0.0.0.0:7860, select lerobot/pusht, episode index 1 and click on "Show dataset"

@02alexander 02alexander added the bug Something isn't working label May 2, 2024
@02alexander
Copy link
Collaborator Author

It seems that it isn't only a trouble on my computer, right now it's not possible to view any dataset with the viewer.
huggingface-issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant