Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Support monitor mode when creating or resuming a new experiment #1933

Merged
merged 31 commits into from
Jan 8, 2020

Conversation

SparkSnail
Copy link
Contributor

No description provided.

SparkSnail and others added 25 commits August 6, 2019 18:58
Filter prune algo implementation (microsoft#1655)
@@ -49,6 +49,7 @@ nnictl support commands:
|--config, -c| True| |YAML configure file of the experiment|
|--port, -p|False| |the port of restful server|
|--debug, -d|False||set debug mode|
|--monitor, -m|False|set monitor mode|
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing vertical separator

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed.

time.sleep(args.time)
if auto_exit:
status = get_experiment_status(port)
if status in ['DONE', 'ERROR', 'STOPPED']:
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we can print dispatcher and nnimanager log here (if the status is error). Because if user is running it in a container, when the program exit, the container is destroyed too. There is no way to retrieve the error info. Another option is to disable auto_exit in case --debug is set.

Copy link
Contributor Author

@SparkSnail SparkSnail Jan 8, 2020

Choose a reason for hiding this comment

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

Maybe we can print dispatcher and nnimanager log here (if the status is error). Because if user is running it in a container, when the program exit, the container is destroyed too. There is no way to retrieve the error info. Another option is to disable auto_exit in case --debug is set.

nniManager.log content maybe too long, maybe it's not suitable to show these content in screen. Users can mount NNI's logDir in container to their local path, the logDir contains log files.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think the case is not for screen. For screen user, they will never seek for foreground. For container users, they don't care. Furthermore, I don't think os.system("clear") has any effect if they are using container. Printing a lot is expected.

print_error('please input a positive integer as time interval, the unit is second.')
exit(1)
def set_monitor(auto_exit, time_interval, port=None, pid=None):
'''set the experiment monitor engine'''
while True:
try:
os.system('clear')
Copy link
Contributor

@chicm-ms chicm-ms Jan 8, 2020

Choose a reason for hiding this comment

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

Is this os.system('clear') working on Windows?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed.

@SparkSnail SparkSnail merged commit bf2b929 into microsoft:master Jan 8, 2020
SparkSnail added a commit to SparkSnail/nni that referenced this pull request Jan 8, 2020
Support monitor mode when creating or resuming a new experiment (microsoft#1933)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants