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

Commit

Permalink
Fix remote & kubeflow it (#2828)
Browse files Browse the repository at this point in the history
  • Loading branch information
SparkSnail authored Aug 26, 2020
1 parent 9f44d54 commit 3d2abd4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,19 @@ class RemoteMachineTrainingService implements TrainingService {
this.sshConnectionPromises = [];
// initialize gpuScheduler
this.gpuScheduler = new GPUScheduler(this.machineExecutorManagerMap);
if (this.trialConfig === undefined) {
throw new Error("trial config not initialized!");
}
// Copy codeDir to remote machine
for (const [rmMeta, executorManager] of this.machineExecutorManagerMap.entries()) {
const executor: ShellExecutor = await executorManager.getExecutor(this.initExecutorId);
if (executor !== undefined) {
this.machineCopyExpCodeDirPromiseMap.set(
rmMeta,
executor.copyDirectoryToRemote(this.trialConfig.codeDir, executor.getRemoteCodePath(getExperimentId()))
);
}
}
}
while (!this.stopping) {
while (this.jobQueue.length > 0) {
Expand Down Expand Up @@ -328,20 +341,8 @@ class RemoteMachineTrainingService implements TrainingService {
try {
// Validate to make sure codeDir doesn't have too many files
await validateCodeDir(remoteMachineTrailConfig.codeDir);
// Copy codeDir to remote machine
for (const [rmMeta, executorManager] of this.machineExecutorManagerMap.entries()) {
const executor: ShellExecutor = await executorManager.getExecutor(this.initExecutorId);
if (executor !== undefined) {
this.machineCopyExpCodeDirPromiseMap.set(
rmMeta,
executor.copyDirectoryToRemote(remoteMachineTrailConfig.codeDir, executor.getRemoteCodePath(getExperimentId()))
);
}
}

} catch (error) {
this.log.error(error);

return Promise.reject(new Error(error));
}

Expand Down
2 changes: 1 addition & 1 deletion test/config/training_service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ kubeflow:

kubeflowConfig:
operator: tf-operator
apiVersion: v1alpha2
apiVersion: v1
storage: azureStorage
keyVault:
vaultName:
Expand Down

0 comments on commit 3d2abd4

Please sign in to comment.