Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Commit

Permalink
Fix a pytorch dataloader issue#973 of RuntimeError: received 0 items …
Browse files Browse the repository at this point in the history
…of ancdata
  • Loading branch information
roytseng-tw committed Apr 27, 2018
1 parent cafc748 commit 3405283
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions tools/train_net.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)

# RuntimeError: received 0 items of ancdata. Issue: pytorch/pytorch#973
rlimit = resource.getrlimit(resource.RLIMIT_NOFILE)
resource.setrlimit(resource.RLIMIT_NOFILE, (4096, rlimit[1]))


def parse_args():
"""Parse input arguments"""
Expand Down
6 changes: 5 additions & 1 deletion tools/train_net_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import os
import sys
import pickle
import resource
import traceback
import logging
from collections import defaultdict
Expand All @@ -29,10 +30,13 @@
from utils.timer import Timer
from utils.training_stats import TrainingStats

# Set up logging and load config options
# Set up logging and load config options
logger = setup_logging(__name__)
logging.getLogger('roi_data.loader').setLevel(logging.INFO)

# RuntimeError: received 0 items of ancdata. Issue: pytorch/pytorch#973
rlimit = resource.getrlimit(resource.RLIMIT_NOFILE)
resource.setrlimit(resource.RLIMIT_NOFILE, (4096, rlimit[1]))

def parse_args():
"""Parse input arguments"""
Expand Down

0 comments on commit 3405283

Please sign in to comment.