def main(): [args, run_opts] = get_args() try: train(args, run_opts) utils.wait_for_background_commands() except BaseException as e: # look for BaseException so we catch KeyboardInterrupt, which is # what we get when a background thread dies. if not isinstance(e, KeyboardInterrupt): traceback.print_exc() sys.exit(1)
def main(): args = get_args() os.environ["CUDA_VISIBLE_DEVICES"] = str(args.job + 3) print(args.job) try: train(args) utils.wait_for_background_commands() except BaseException as e: # look for BaseException so we catch KeyboardInterrupt, which is # what we get when a background thread dies. if not isinstance(e, KeyboardInterrupt): traceback.print_exc() sys.exit(1)