Skip to content

Commit

Permalink
feat: set rlimit in main
Browse files Browse the repository at this point in the history
  • Loading branch information
AshishKumar4 committed Aug 3, 2024
1 parent 4555209 commit 0b90a38
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions training.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
import cv2
import argparse

import resource

#####################################################################################################################
################################################# Initialization ####################################################
#####################################################################################################################
Expand Down Expand Up @@ -881,6 +883,14 @@ def boolean_string(s):
default=False, help='Run the dataset iterator for 3000 steps for testintg/benchmarking')

def main(args):
resource.setrlimit(
resource.RLIMIT_CORE,
(resource.RLIM_INFINITY, resource.RLIM_INFINITY))

resource.setrlimit(
resource.RLIMIT_OFILE,
(resource.RLIM_INFINITY, resource.RLIM_INFINITY))

if args.load_from_checkpoint:
assert args.experiment_name is not None and args.experiment_name != "", "Experiment name needs to be given if load_from_checkpoint is True"

Expand Down

0 comments on commit 0b90a38

Please sign in to comment.