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

Fix remote machine connection logic #2725

Merged
merged 18 commits into from
Aug 7, 2020

Conversation

SparkSnail
Copy link
Contributor

No description provided.

@SparkSnail SparkSnail changed the title Fix remote machine connection wait logic Fix remote machine connection logic Jul 23, 2020
@@ -82,6 +84,12 @@ class RemoteMachineTrainingService implements TrainingService {
restServer.setEnableVersionCheck = this.versionCheck;
this.log.info('Run remote machine training service.');
while (!this.stopping) {
if (this.sshConnectionPromises.length) {
Copy link
Member

Choose a reason for hiding this comment

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

To improve readabilty, and avoid tricks of JS, it's bettter to write like this.sshConnectionPromises.length > 0

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

@@ -82,6 +84,12 @@ class RemoteMachineTrainingService implements TrainingService {
restServer.setEnableVersionCheck = this.versionCheck;
this.log.info('Run remote machine training service.');
while (!this.stopping) {
if (this.sshConnectionPromises.length) {
Copy link
Member

Choose a reason for hiding this comment

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

It looks should be put outside of while loop, as it's one time work.

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 109d9a3 into microsoft:master Aug 7, 2020
LovPe pushed a commit to LovPe/nni that referenced this pull request Aug 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants