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

Fix 3rd-party training service bug #3726

Merged
merged 6 commits into from
Jun 7, 2021
Merged

Conversation

liuzhe-lz
Copy link
Contributor

Environment service with web command channel needs to know the port. Otherwise it only supports 8080.
To fix this, pass whole ExperimentStartupInfo to environment service.

The template / example training service: https://github.com/liuzhe-lz/nni-training-service-template

@liuzhe-lz liuzhe-lz requested a review from SparkSnail June 4, 2021 06:59
@@ -213,7 +212,7 @@ function cleanupUnitTest(): void {
Container.restore(TrainingService);
Container.restore(DataStore);
Container.restore(Database);
Container.restore(ExperimentStartupInfo);
setExperimentStartupInfo(true, 'unittest', 8080, 'unittest', undefined, logLevel);
Copy link
Contributor

Choose a reason for hiding this comment

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

Why use 'unittest' as experiment id here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The original logic was snapshot ExperimentStartupInfo in prepareUnitTest and restore it here with IOC's utility.
To share ExperimentStartupInfo with 3rd-party training service, it is no longer an IOC container and has to be manually restored.
This line is copied from prepareUnitTest to restore the same state.

@liuzhe-lz liuzhe-lz requested a review from ultmaster June 4, 2021 09:32
@ultmaster ultmaster merged commit 6b52fb1 into microsoft:master Jun 7, 2021
@liuzhe-lz liuzhe-lz deleted the 3ts-fix branch June 7, 2021 05:50
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