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

Not compatible with h5py database #3141

Open
2 of 4 tasks
Chrisa142857 opened this issue Oct 6, 2024 · 0 comments
Open
2 of 4 tasks

Not compatible with h5py database #3141

Chrisa142857 opened this issue Oct 6, 2024 · 0 comments

Comments

@Chrisa142857
Copy link

Chrisa142857 commented Oct 6, 2024

System Info

- `Accelerate` version: 0.24.1
- Platform: Linux-5.15.0-92-generic-x86_64-with-glibc2.35
- Python version: 3.9.12
- Numpy version: 1.26.4
- PyTorch version (GPU?): 2.1.0+cu121 (True)
- PyTorch XPU available: False
- PyTorch NPU available: False
- System RAM: 1007.57 GB
- GPU type: NVIDIA RTX 6000 Ada Generation
- `Accelerate` default config:
        - compute_environment: LOCAL_MACHINE
        - distributed_type: DEEPSPEED
        - mixed_precision: fp16
        - use_cpu: False
        - debug: False
        - num_processes: 2
        - machine_rank: 0
        - num_machines: 1
        - rdzv_backend: static
        - same_network: True
        - main_training_function: main
        - deepspeed_config: {'gradient_accumulation_steps': 1, 'gradient_clipping': 1.0, 'offload_optimizer_device': 'cpu', 'offload_param_device': 'cpu', 'zero3_init_flag': False, 'zero_stage': 2}
        - downcast_bf16: no
        - tpu_use_cluster: False
        - tpu_use_sudo: False
        - tpu_env: []
        - dynamo_config: {'dynamo_backend': 'INDUCTOR', 'dynamo_mode': 'default', 'dynamo_use_dynamic': True, 'dynamo_use_fullgraph': True}

Information

  • The official example scripts
  • My own modified scripts

Tasks

  • One of the scripts in the examples/ folder of Accelerate or an officially supported no_trainer script in the examples folder of the transformers repo (such as run_no_trainer_glue.py)
  • My own task or dataset (give details below)

Reproduction

H5py is working as opening a file handler first, and then loading specific data when indexing the database. Since the H5py file handler is not supported to be opened/read in multiple threads at the same time, using h5py.File() with or without only opening an h5 if accelerator.is_local_main_process will cause RuntimeError: Unable to synchronously get dataspace or RuntimeError: Unable to synchronously open ....

Expected behavior

Being compatible with H5py.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant