Unverified Commit 3d2abd4a authored by SparkSnail's avatar SparkSnail Committed by GitHub
Browse files

Fix remote & kubeflow it (#2828)

parent 9f44d54a
...@@ -89,6 +89,19 @@ class RemoteMachineTrainingService implements TrainingService { ...@@ -89,6 +89,19 @@ class RemoteMachineTrainingService implements TrainingService {
this.sshConnectionPromises = []; this.sshConnectionPromises = [];
// initialize gpuScheduler // initialize gpuScheduler
this.gpuScheduler = new GPUScheduler(this.machineExecutorManagerMap); 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.stopping) {
while (this.jobQueue.length > 0) { while (this.jobQueue.length > 0) {
...@@ -328,20 +341,8 @@ class RemoteMachineTrainingService implements TrainingService { ...@@ -328,20 +341,8 @@ class RemoteMachineTrainingService implements TrainingService {
try { try {
// Validate to make sure codeDir doesn't have too many files // Validate to make sure codeDir doesn't have too many files
await validateCodeDir(remoteMachineTrailConfig.codeDir); 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) { } catch (error) {
this.log.error(error); this.log.error(error);
return Promise.reject(new Error(error)); return Promise.reject(new Error(error));
} }
......
...@@ -10,7 +10,7 @@ kubeflow: ...@@ -10,7 +10,7 @@ kubeflow:
kubeflowConfig: kubeflowConfig:
operator: tf-operator operator: tf-operator
apiVersion: v1alpha2 apiVersion: v1
storage: azureStorage storage: azureStorage
keyVault: keyVault:
vaultName: vaultName:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment