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
416b8b53
Unverified
Commit
416b8b53
authored
Dec 21, 2018
by
chicm-ms
Committed by
GitHub
Dec 21, 2018
Browse files
Fix nniManager unit test (#515)
parent
61ebfb00
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
14 deletions
+7
-14
src/nni_manager/core/test/nnimanager.test.ts
src/nni_manager/core/test/nnimanager.test.ts
+7
-14
No files found.
src/nni_manager/core/test/nnimanager.test.ts
View file @
416b8b53
...
@@ -57,15 +57,15 @@ describe('Unit test for nnimanager', function () {
...
@@ -57,15 +57,15 @@ describe('Unit test for nnimanager', function () {
trainingServicePlatform
:
'
local
'
,
trainingServicePlatform
:
'
local
'
,
searchSpace
:
'
{"x":1}
'
,
searchSpace
:
'
{"x":1}
'
,
tuner
:
{
tuner
:
{
className
:
'
EvolutionTuner
'
,
className
:
'
TPE
'
,
classArgs
:
{
classArgs
:
{
optimize_mode
:
'
maximize
'
optimize_mode
:
'
maximize
'
},
},
checkpointDir
:
''
,
checkpointDir
:
''
,
gpuNum
:
1
gpuNum
:
0
},
},
assessor
:
{
assessor
:
{
className
:
'
Medianstop
Assessor
'
,
className
:
'
Medianstop
'
,
checkpointDir
:
''
,
checkpointDir
:
''
,
gpuNum
:
1
gpuNum
:
1
}
}
...
@@ -74,9 +74,12 @@ describe('Unit test for nnimanager', function () {
...
@@ -74,9 +74,12 @@ describe('Unit test for nnimanager', function () {
before
(
async
()
=>
{
before
(
async
()
=>
{
await
initContainer
();
await
initContainer
();
nniManager
=
component
.
get
(
Manager
);
nniManager
=
component
.
get
(
Manager
);
const
expId
:
string
=
await
nniManager
.
startExperiment
(
experimentParams
);
assert
(
expId
);
});
});
after
(()
=>
{
after
(
async
()
=>
{
await
nniManager
.
stopExperiment
();
cleanupUnitTest
();
cleanupUnitTest
();
})
})
...
@@ -84,15 +87,6 @@ describe('Unit test for nnimanager', function () {
...
@@ -84,15 +87,6 @@ describe('Unit test for nnimanager', function () {
//TODO: add resume experiment unit test
//TODO: add resume experiment unit test
})
})
it
(
'
test startExperiment
'
,
()
=>
{
return
nniManager
.
startExperiment
(
experimentParams
).
then
(
function
(
experimentId
)
{
expect
(
experimentId
.
length
).
to
.
be
.
equal
(
8
);
}).
catch
(
function
(
error
)
{
assert
.
fail
(
error
);
})
})
it
(
'
test listTrialJobs
'
,
()
=>
{
it
(
'
test listTrialJobs
'
,
()
=>
{
//FIXME: not implemented
//FIXME: not implemented
//return nniManager.listTrialJobs().then(function (trialJobDetails) {
//return nniManager.listTrialJobs().then(function (trialJobDetails) {
...
@@ -147,7 +141,6 @@ describe('Unit test for nnimanager', function () {
...
@@ -147,7 +141,6 @@ describe('Unit test for nnimanager', function () {
})
})
})
})
it
(
'
test addCustomizedTrialJob
'
,
()
=>
{
it
(
'
test addCustomizedTrialJob
'
,
()
=>
{
return
nniManager
.
addCustomizedTrialJob
(
'
hyperParams
'
).
then
(()
=>
{
return
nniManager
.
addCustomizedTrialJob
(
'
hyperParams
'
).
then
(()
=>
{
...
...
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