Merge pull request #1988 from FeixLiu/update_dataloader

[bug fixer] Update dataloader to handle index error
pull/2057/head
Walter 2022-06-14 11:05:29 +08:00 committed by GitHub
commit 5010bee691
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 24 additions and 0 deletions

1
.gitignore vendored
View File

@ -12,3 +12,4 @@ build/
log/ log/
nohup.out nohup.out
.DS_Store .DS_Store
.idea

View File

@ -371,6 +371,11 @@ def run(dataloader,
"Except RuntimeError when reading data from dataloader, try to read once again..." "Except RuntimeError when reading data from dataloader, try to read once again..."
) )
continue continue
except IndexError:
logger.warning(
"Except IndexError when reading data from dataloader, try to read once again..."
)
continue
idx += 1 idx += 1
# ignore the warmup iters # ignore the warmup iters
if idx == 5: if idx == 5:

View File

@ -8,5 +8,11 @@ num_workers=8
# get data # get data
bash test_tipc/static/${model_item}/benchmark_common/prepare.sh bash test_tipc/static/${model_item}/benchmark_common/prepare.sh
cd ./dataset/ILSVRC2012
cat train_list.txt >> tmp
for i in {1..10}; do cat tmp >> train_list.txt; done
cd ../../
# run # run
bash test_tipc/static/${model_item}/benchmark_common/run_benchmark.sh ${model_item} ${bs_item} ${fp_item} ${run_mode} ${device_num} ${max_epochs} ${num_workers} 2>&1; bash test_tipc/static/${model_item}/benchmark_common/run_benchmark.sh ${model_item} ${bs_item} ${fp_item} ${run_mode} ${device_num} ${max_epochs} ${num_workers} 2>&1;

View File

@ -8,5 +8,11 @@ num_workers=8
# get data # get data
bash test_tipc/static/${model_item}/benchmark_common/prepare.sh bash test_tipc/static/${model_item}/benchmark_common/prepare.sh
cd ./dataset/ILSVRC2012
cat train_list.txt >> tmp
for i in {1..10}; do cat tmp >> train_list.txt; done
cd ../../
# run # run
bash test_tipc/static/${model_item}/benchmark_common/run_benchmark.sh ${model_item} ${bs_item} ${fp_item} ${run_mode} ${device_num} ${max_epochs} ${num_workers} 2>&1; bash test_tipc/static/${model_item}/benchmark_common/run_benchmark.sh ${model_item} ${bs_item} ${fp_item} ${run_mode} ${device_num} ${max_epochs} ${num_workers} 2>&1;

View File

@ -8,5 +8,11 @@ num_workers=8
# get data # get data
bash test_tipc/static/${model_item}/benchmark_common/prepare.sh bash test_tipc/static/${model_item}/benchmark_common/prepare.sh
cd ./dataset/ILSVRC2012
cat train_list.txt >> tmp
for i in {1..10}; do cat tmp >> train_list.txt; done
cd ../../
# run # run
bash test_tipc/static/${model_item}/benchmark_common/run_benchmark.sh ${model_item} ${bs_item} ${fp_item} ${run_mode} ${device_num} ${max_epochs} ${num_workers} 2>&1; bash test_tipc/static/${model_item}/benchmark_common/run_benchmark.sh ${model_item} ${bs_item} ${fp_item} ${run_mode} ${device_num} ${max_epochs} ${num_workers} 2>&1;