def release_syslim(): if jac_getenv('SYSLIM', default='n', type='bool'): sys.setrecursionlimit(1000000) try: slim = 65536 * 1024 resource.setrlimit(resource.RLIMIT_STACK, (slim, slim)) except ValueError: pass
# Author : Jiayuan Mao # Email : [email protected] # Date : 01/18/2018 # # This file is part of Jacinle. # Distributed under terms of the MIT license. from jacinle.utils.init import init_main init_main() del init_main from jacinle.utils.env import jac_getenv, jac_is_verbose, jac_is_debug if jac_getenv('IMPORT_ALL', 'true', 'bool'): from jacinle.cli.argument import JacArgumentParser from jacinle.cli.keyboard import yes_or_no, maybe_mkdir from jacinle.concurrency.pool import TQDMPool from jacinle.config.environ import load_env, has_env, get_env, set_env, with_env from jacinle.logging import get_logger from jacinle.utils.cache import cached_property, cached_result, fs_cached_result from jacinle.utils.container import G, g, GView, SlotAttrObject, OrderedSet from jacinle.utils.context import EmptyContext from jacinle.utils.defaults import (defaults_manager, wrap_custom_as_default, gen_get_default, gen_set_default, default_args, ARGDEF) from jacinle.utils.deprecated import deprecated from jacinle.utils.enum import JacEnum from jacinle.utils.exception import format_exc
def enable_ipdb(): if jac_is_debug(): if jac_getenv('IMPORT_ALL', 'true', 'bool'): from jacinle.utils.debug import hook_exception_ipdb hook_exception_ipdb()
def enable_ipdb(): if jac_getenv('DEBUG', default='n', type='bool'): from jacinle.utils.debug import hook_exception_ipdb hook_exception_ipdb()