-
Notifications
You must be signed in to change notification settings - Fork 0
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
Multi GPUs training problem #1
Comments
I executed all the processes in the README and found no problems.
|
|
Please try running the code below: import h5py
import glob
import tqdm
ACDC_DIR = '/home/mnt/lee/Med/CrossMatch/ACDC/dataset/datasets/ACDC'
print("Checking the dataset... type: Slices")
for file_name in tqdm.tqdm(glob.glob(f'{ACDC_DIR}/data/slices/*.h5')):
sample = h5py.File(file_name, 'r')
img = sample['image'][:]
mask = sample['label'][:]
print("Finished!")
print("Checking the dataset... type: 3D Images")
for file_name in tqdm.tqdm(glob.glob(f'{ACDC_DIR}/data/*.h5')):
sample = h5py.File(file_name, 'r')
img = sample['image'][:]
mask = sample['label'][:]
print("Finished!") to check if your dataset can be read correctly. |
|
Thanks for you to provide the solution |
Traceback (most recent call last):
File "/home/mnt/lee/Med/CrossMatch/ACDC/train_cross_match.py", line 420, in
main()
File "/home/mnt/lee/Med/CrossMatch/ACDC/train_cross_match.py", line 183, in main
for i, (
File "/home/mnt/lee/miniconda3/envs/CrossMatch/lib/python3.11/site-packages/torch/utils/data/dataloader.py", line 630, in next
data = self._next_data()
^^^^^^^^^^^^^^^^^
File "/home/mnt/lee/miniconda3/envs/CrossMatch/lib/python3.11/site-packages/torch/utils/data/dataloader.py", line 1325, in _next_data
return self._process_data(data)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/mnt/lee/miniconda3/envs/CrossMatch/lib/python3.11/site-packages/torch/utils/data/dataloader.py", line 1371, in _process_data
data.reraise()
File "/home/mnt/lee/miniconda3/envs/CrossMatch/lib/python3.11/site-packages/torch/_utils.py", line 694, in reraise
raise exception
OSError: Caught OSError in DataLoader worker process 11.
Original Traceback (most recent call last):
File "/home/mnt/lee/miniconda3/envs/CrossMatch/lib/python3.11/site-packages/torch/utils/data/_utils/worker.py", line 308, in _worker_loop
data = fetcher.fetch(index)
^^^^^^^^^^^^^^^^^^^^
File "/home/mnt/lee/miniconda3/envs/CrossMatch/lib/python3.11/site-packages/torch/utils/data/_utils/fetch.py", line 51, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/mnt/lee/miniconda3/envs/CrossMatch/lib/python3.11/site-packages/torch/utils/data/_utils/fetch.py", line 51, in
data = [self.dataset[idx] for idx in possibly_batched_index]
~~~~~~~~~~~~^^^^^
File "/home/mnt/lee/Med/CrossMatch/ACDC/dataset/acdc.py", line 37, in getitem
sample = h5py.File(os.path.join(self.root, id), 'r')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/mnt/lee/miniconda3/envs/CrossMatch/lib/python3.11/site-packages/h5py/_hl/files.py", line 562, in init
fid = make_fid(name, mode, userblock_size, fapl, fcpl, swmr=swmr)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/mnt/lee/miniconda3/envs/CrossMatch/lib/python3.11/site-packages/h5py/_hl/files.py", line 235, in make_fid
fid = h5f.open(name, flags, fapl=fapl)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "h5py/h5f.pyx", line 102, in h5py.h5f.open
OSError: [Errno 9] Unable to synchronously open file (unable to lock file, errno = 9, error message = 'Bad file descriptor')
The text was updated successfully, but these errors were encountered: