"sgl-kernel/vscode:/vscode.git/clone" did not exist on "4a05bdfa869c80fdcac2d1b8fb48656f743a1fac"
Unverified Commit 9dee8e92 authored by J-shang's avatar J-shang Committed by GitHub
Browse files

fix kubeflow pipeline (#4767)

parent 689a9780
......@@ -467,7 +467,7 @@ class RemoteMachineTrainingService implements TrainingService {
throw new Error(`Can not get trial job detail for job: ${trialJobId}`);
}
const trialLocalTempFolder: string = path.join(this.expRootDir, 'trials-local', trialJobId);
const trialLocalTempFolder: string = path.join(this.expRootDir, 'trials', trialJobId);
await executor.createFolder(executor.joinPath(trialJobDetail.workingDirectory, '.nni'));
......@@ -582,7 +582,7 @@ class RemoteMachineTrainingService implements TrainingService {
const executor = await this.getExecutor(trialJobId);
const trialWorkingFolder: string = executor.joinPath(executor.getRemoteExperimentRootDir(getExperimentId()), 'trials', trialJobId);
const trialLocalTempFolder: string = path.join(this.expRootDir, 'trials-local', trialJobId);
const trialLocalTempFolder: string = path.join(this.expRootDir, 'trials', trialJobId);
const fileName: string = generateParamFileName(hyperParameters);
const localFilepath: string = path.join(trialLocalTempFolder, fileName);
......
......@@ -29,6 +29,7 @@ export class FrameworkControllerEnvironmentService extends KubernetesEnvironment
this.config = config;
// Create kubernetesCRDClient
this.kubernetesCRDClient = FrameworkControllerClientFactory.createClient(this.config.namespace);
this.genericK8sClient.setNamespace = this.config.namespace ?? "default"
// Create storage
if (this.config.storage.storageType === 'azureStorage') {
if (this.config.storage.azureShare === undefined ||
......@@ -194,7 +195,7 @@ export class FrameworkControllerEnvironmentService extends KubernetesEnvironment
kind: 'Framework',
metadata: {
name: frameworkcontrollerJobName,
namespace: this.config.namespace ? this.config.namespace : "default",
namespace: this.config.namespace ?? "default",
labels: {
app: this.NNI_KUBERNETES_TRIAL_LABEL,
expId: this.experimentId,
......
......@@ -26,6 +26,7 @@ export class KubeflowEnvironmentService extends KubernetesEnvironmentService {
// Create kubernetesCRDClient
this.kubernetesCRDClient = KubeflowOperatorClientFactory.createClient(
this.config.operator, this.config.apiVersion);
this.kubernetesCRDClient.namespace = this.config.namespace ?? "default";
// Create storage
if (this.config.storage.storageType === 'azureStorage') {
if (this.config.storage.azureShare === undefined ||
......@@ -41,7 +42,7 @@ export class KubeflowEnvironmentService extends KubernetesEnvironmentService {
this.config.operator, this.config.apiVersion, keyValutConfig, azureStorage);
this.azureStorageAccountName = azureKubeflowClusterConfig.azureStorage.accountName;
this.azureStorageShare = azureKubeflowClusterConfig.azureStorage.azureShare;
this.genericK8sClient.setNamespace = this.config.namespace ?? "default";
this.createStoragePromise = this.createAzureStorage(
azureKubeflowClusterConfig.keyVault.vaultName,
azureKubeflowClusterConfig.keyVault.name
......@@ -186,7 +187,7 @@ export class KubeflowEnvironmentService extends KubernetesEnvironmentService {
kind: this.kubernetesCRDClient.jobKind,
metadata: {
name: kubeflowJobName,
namespace: 'default',
namespace: this.kubernetesCRDClient.namespace,
labels: {
app: this.NNI_KUBERNETES_TRIAL_LABEL,
expId: this.experimentId,
......
......@@ -77,7 +77,7 @@ export class KubernetesEnvironmentService extends EnvironmentService {
if (this.genericK8sClient === undefined) {
throw new Error("genericK8sClient undefined!");
}
const namespace = this.genericK8sClient.getNamespace ? this.genericK8sClient.getNamespace : "default"
const namespace = this.genericK8sClient.getNamespace ?? "default";
await this.genericK8sClient.createSecret(
{
apiVersion: 'v1',
......@@ -180,7 +180,7 @@ export class KubernetesEnvironmentService extends EnvironmentService {
const body = fs.readFileSync(filePath).toString('base64');
const registrySecretName = String.Format('nni-secret-{0}', uniqueString(8)
.toLowerCase());
const namespace = this.genericK8sClient.getNamespace ? this.genericK8sClient.getNamespace : "default"
const namespace = this.genericK8sClient.getNamespace ?? "default";
await this.genericK8sClient.createSecret(
{
apiVersion: 'v1',
......
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