Add pretty-print argument to job stdout

This commit is contained in:
Yin Li 2020-02-07 11:40:08 -05:00
parent 3fb9708575
commit 45c1d57e72
2 changed files with 4 additions and 2 deletions

View File

@ -1,3 +1,4 @@
from pprint import pprint
import numpy as np
import torch
from torch.utils.data import DataLoader
@ -8,7 +9,7 @@ from .models import narrow_like
def test(args):
print(args)
pprint(vars(args))
test_dataset = FieldDataset(
in_patterns=args.test_in_patterns,

View File

@ -1,5 +1,6 @@
import os
import shutil
from pprint import pprint
import torch
import torch.nn.functional as F
import torch.distributed as dist
@ -26,7 +27,7 @@ def node_worker(args):
node = int(os.environ['SLURM_NODEID'])
if node == 0:
print(args)
pprint(vars(args))
args.node = node
spawn(gpu_worker, args=(args,), nprocs=args.gpus_per_node)