Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
nni
Commits
f5b89bb6
Unverified
Commit
f5b89bb6
authored
Apr 19, 2022
by
J-shang
Committed by
GitHub
Apr 19, 2022
Browse files
Merge pull request #4776 from microsoft/v2.7
parents
7aa44612
1546962f
Changes
104
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
7 deletions
+9
-7
ts/nni_manager/training_service/remote_machine/remoteMachineTrainingService.ts
...ng_service/remote_machine/remoteMachineTrainingService.ts
+2
-2
ts/nni_manager/training_service/reusable/environments/kubernetes/frameworkcontrollerEnvironmentService.ts
...ments/kubernetes/frameworkcontrollerEnvironmentService.ts
+2
-1
ts/nni_manager/training_service/reusable/environments/kubernetes/kubeflowEnvironmentService.ts
...ble/environments/kubernetes/kubeflowEnvironmentService.ts
+3
-2
ts/nni_manager/training_service/reusable/environments/kubernetes/kubernetesEnvironmentService.ts
...e/environments/kubernetes/kubernetesEnvironmentService.ts
+2
-2
No files found.
ts/nni_manager/training_service/remote_machine/remoteMachineTrainingService.ts
View file @
f5b89bb6
...
...
@@ -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
);
...
...
ts/nni_manager/training_service/reusable/environments/kubernetes/frameworkcontrollerEnvironmentService.ts
View file @
f5b89bb6
...
...
@@ -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
,
...
...
ts/nni_manager/training_service/reusable/environments/kubernetes/kubeflowEnvironmentService.ts
View file @
f5b89bb6
...
...
@@ -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
,
...
...
ts/nni_manager/training_service/reusable/environments/kubernetes/kubernetesEnvironmentService.ts
View file @
f5b89bb6
...
...
@@ -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
'
,
...
...
Prev
1
2
3
4
5
6
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment