Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support view/resume experiment from external folder #3870

Merged
merged 9 commits into from Jul 12, 2021

Conversation

SparkSnail
Copy link
Contributor

@SparkSnail SparkSnail commented Jun 24, 2021

  1. support view experiment from external folder
  2. support resume experiment from external folder
  3. fix nnictl experiment delete

@QuanluZhang QuanluZhang requested review from ultmaster and liuzhe-lz and removed request for ultmaster June 25, 2021 09:57
if not os.path.isdir(args.experiment_dir):
print_error('Path %s is not folder directory!' % args.experiment_dir)
exit(1)
experiment_id = os.path.basename(args.experiment_dir)
Copy link
Contributor

@liuzhe-lz liuzhe-lz Jun 28, 2021

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add validation logic.

Copy link
Contributor

@liuzhe-lz liuzhe-lz Jul 12, 2021

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 replace os.path.basement.

Copy link
Contributor Author

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.

@@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a little confused. Where is the old view? As far as I remembered, there has already been a view.

Copy link
Contributor

@liuzhe-lz liuzhe-lz Jun 30, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems there are nnictl experiment view and nnictl view.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's really confusing. Why can't we merge these two?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unity command into nnictl view

@SparkSnail SparkSnail changed the title Support view experiment from external folder Support view/resume experiment from external folder Jul 9, 2021
@@ -166,6 +166,10 @@ nnictl resume
- False
-
- set foreground mode, print log content to terminal
* - --experiment_dir, -e
- False
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default value is None?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, nnictl view will not use --experiment_dir by default.

@SparkSnail SparkSnail merged commit 4b38e64 into microsoft:master Jul 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants