Skip to content

Commit f2c0d53

Browse files
committed
added hooks for internal testing
1 parent 2fa1700 commit f2c0d53

File tree

4 files changed

+13
-12
lines changed

4 files changed

+13
-12
lines changed

examples/imgnet.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,11 @@
2828
callable(models.__dict__[name]))
2929

3030
parser = argparse.ArgumentParser(description='PyTorch ImageNet Training')
31-
parser.add_argument('data', metavar='DIR',
32-
help='path to dataset')
31+
if os.environ['NVIDIA_INTERNAL']:
32+
imgnet_path = '/home/dcg-adlr-atao-data.cosmos277/data/ImageNet_s480_q95'
33+
else:
34+
imgnet_path = None
35+
parser.add_argument('--data', default=imgnet_path, help='path to dataset')
3336
parser.add_argument('-a', '--arch', metavar='ARCH', default='resnet18',
3437
choices=model_names,
3538
help='model architecture: ' +
@@ -74,8 +77,7 @@
7477
parser.add_argument('--gpu', default=None, type=int,
7578
help='GPU id to use.')
7679
parser.add_argument('--logdir', type=str, help='where to write output')
77-
parser.add_argument('--num-classes', default=10, type=int,
78-
help='number of classes')
80+
parser.add_argument('--num-classes', default=1000, type=int)
7981
parser.add_argument('--multiprocessing-distributed', action='store_true',
8082
help=('Use multi-processing distributed training to launch'
8183
'N processes per node, which has N GPUs. This is the'

examples/imgnet.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CMD: "cd LOGDIR/code; PYTHONPATH=LOGDIR/code exec python imgnet.py /data/ImageNet"
1+
CMD: "cd LOGDIR/code; PYTHONPATH=LOGDIR/code exec python imgnet.py"
22

33
HPARAMS:
44
lr: [0.1, 0.05]

examples/mnist.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
CMD: cd LOGDIR/code; PYTHONPATH=LOGDIR/code exec python mnist.py
22

33
HPARAMS:
4-
lr: [0.01, 0.015, 0.02]
4+
lr: [0.01, 0.02]
55
momentum: [0.5, 0.25]
66
logdir: LOGDIR

runx/runx.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,11 @@ def construct_cmd(cmd, hparams, resources, job_name, logdir):
104104
######################################################################
105105
# You may wish to customize this function for your own needs
106106
######################################################################
107-
'''
108-
cmd += '--name {} '.format(job_name)
109-
if 'submit_job' in cmd:
110-
cmd += '--cd_to_logdir '
111-
cmd += '--logdir {}/logs '.format(logdir)
112-
'''
107+
if os.environ['NVIDIA_INTERNAL']:
108+
cmd += '--name {} '.format(job_name)
109+
if 'submit_job' in cmd:
110+
cmd += '--cd_to_logdir '
111+
cmd += '--logdir {}/logs '.format(logdir)
113112

114113
cmd += expand_resources(resources)
115114
cmd += expand_hparams(hparams)

0 commit comments

Comments
 (0)