-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Support view/resume experiment from external folder #3870
Changes from 5 commits
af8b52b
b7470a6
fad3149
0779388
c4bc4e2
8372820
fedf6e4
15de16b
5b123fc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
import pkg_resources | ||
from colorama import init | ||
from .common_utils import print_error | ||
from .launcher import create_experiment, resume_experiment, view_experiment | ||
from .launcher import create_experiment, resume_experiment, view_experiment, view_external_experiment | ||
from .updater import update_searchspace, update_concurrency, update_duration, update_trialnum, import_data | ||
from .nnictl_utils import stop_experiment, trial_ls, trial_kill, list_experiment, experiment_status,\ | ||
log_trial, experiment_clean, platform_clean, experiment_list, \ | ||
|
@@ -167,6 +167,12 @@ def parse_args(): | |
parser_load_experiment.add_argument('--searchSpacePath', '-s', required=False, help='the path of search space file for \ | ||
loaded experiment, this path contains file name. Default in $codeDir/search_space.json') | ||
parser_load_experiment.set_defaults(func=load_experiment) | ||
#view an NNI experiment | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm a little confused. Where is the old There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seems there are There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's really confusing. Why can't we merge these two? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. unity command into |
||
parser_view_experiment = parser_experiment_subparsers.add_parser('view', help='view an experiment from external folder') | ||
parser_view_experiment.add_argument('--experiment_dir', '-e', required=True, help='the full path of nni experiment folder') | ||
parser_view_experiment.add_argument('--url_prefix', '-u', dest='url_prefix', help=' set prefix url') | ||
parser_view_experiment.add_argument('--port', '-p', default=DEFAULT_REST_PORT, dest='port', help='the port of experiment') | ||
parser_view_experiment.set_defaults(func=view_external_experiment) | ||
|
||
#parse platform command | ||
parser_platform = subparsers.add_parser('platform', help='get platform information') | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might not work for
~/nni/foo/
(ends with slash). Please check.And since the experiment ID is not included in logDir / experimentWorkingDirectory, I think the argument is a little stange.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add validation logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nnictl view -e /home/lz/nni-experiments/Su83qgOR/
cannot pass validation.I think it's frustrating since bash will automatically add the tail space with tab completion.
Suggest use
Path(experiment_dir).name
to replaceos.path.basement
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, updated to
Path(args.experiment_dir).name
.