Skip to content

Commit

Permalink
Add resume options to cli script
Browse files Browse the repository at this point in the history
  • Loading branch information
JJGO committed Sep 7, 2019
1 parent 2c38da5 commit 9fb4013
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -115,3 +115,4 @@ __old
slurmlog
scripts/imagenet_profiling_results.csv
results*
scripts/*.sh
4 changes: 3 additions & 1 deletion scripts/prune.py
Expand Up @@ -25,6 +25,7 @@ def jsonfile(file):
parser.add_argument('-S', '--seed', dest='seed', type=int, help='Random seed for reproducibility', default=42)
parser.add_argument('-P', '--path', dest='path', type=str, help='path to save', default=None)
parser.add_argument('-r', '--resume', dest='resume', type=str, help='Checkpoint to resume from', default=None)
parser.add_argument('--resume-optim', dest='resume_optim', action='store_true', default=False, help='Resume also optim')
parser.add_argument('-n', '--debug', dest='debug', action='store_true', default=False, help='Enable debug mode for logging')
parser.add_argument('-D', '--dl', dest='dl_kwargs', type=json.loads, help='JSON string of DataLoader parameters', default=tuple())
parser.add_argument('-T', '--train', dest='train_kwargs', type=json.loads, help='JSON string of Train parameters', default=tuple())
Expand All @@ -50,7 +51,8 @@ def jsonfile(file):
dl_kwargs=args.dl_kwargs,
train_kwargs=args.train_kwargs,
debug=args.debug,
resume=args.resume)
resume=args.resume,
resume_optim=args.resume_optim)

exp.run()

Expand Down

0 comments on commit 9fb4013

Please sign in to comment.