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
227a4619
Unverified
Commit
227a4619
authored
Jul 18, 2019
by
chicm-ms
Committed by
GitHub
Jul 18, 2019
Browse files
Update NNIManager.getTrialJob to contain all hyper parameters (#1288)
* Update NNIManager.getTrialJob
parent
797f0e2c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
5 deletions
+9
-5
src/nni_manager/core/nniDataStore.ts
src/nni_manager/core/nniDataStore.ts
+1
-0
src/nni_manager/core/nnimanager.ts
src/nni_manager/core/nnimanager.ts
+2
-4
src/nni_manager/core/test/mockedDatastore.ts
src/nni_manager/core/test/mockedDatastore.ts
+6
-1
No files found.
src/nni_manager/core/nniDataStore.ts
View file @
227a4619
...
@@ -141,6 +141,7 @@ class NNIDataStore implements DataStore {
...
@@ -141,6 +141,7 @@ class NNIDataStore implements DataStore {
public
async
getTrialJob
(
trialJobId
:
string
):
Promise
<
TrialJobInfo
>
{
public
async
getTrialJob
(
trialJobId
:
string
):
Promise
<
TrialJobInfo
>
{
const
trialJobs
:
TrialJobInfo
[]
=
await
this
.
queryTrialJobs
(
undefined
,
trialJobId
);
const
trialJobs
:
TrialJobInfo
[]
=
await
this
.
queryTrialJobs
(
undefined
,
trialJobId
);
assert
(
trialJobs
.
length
<=
1
);
return
trialJobs
[
0
];
return
trialJobs
[
0
];
}
}
...
...
src/nni_manager/core/nnimanager.ts
View file @
227a4619
...
@@ -242,10 +242,8 @@ class NNIManager implements Manager {
...
@@ -242,10 +242,8 @@ class NNIManager implements Manager {
});
});
}
}
public
getTrialJob
(
trialJobId
:
string
):
Promise
<
TrialJobDetail
>
{
public
getTrialJob
(
trialJobId
:
string
):
Promise
<
TrialJobInfo
>
{
return
Promise
.
resolve
(
return
this
.
dataStore
.
getTrialJob
(
trialJobId
);
this
.
trainingService
.
getTrialJob
(
trialJobId
)
);
}
}
public
async
setClusterMetadata
(
key
:
string
,
value
:
string
):
Promise
<
void
>
{
public
async
setClusterMetadata
(
key
:
string
,
value
:
string
):
Promise
<
void
>
{
...
...
src/nni_manager/core/test/mockedDatastore.ts
View file @
227a4619
...
@@ -221,7 +221,12 @@ class MockedDataStore implements DataStore {
...
@@ -221,7 +221,12 @@ class MockedDataStore implements DataStore {
}
}
public
getTrialJob
(
trialJobId
:
string
):
Promise
<
TrialJobInfo
>
{
public
getTrialJob
(
trialJobId
:
string
):
Promise
<
TrialJobInfo
>
{
throw
new
Error
(
"
Method not implemented.
"
);
return
Promise
.
resolve
({
id
:
'
1234
'
,
status
:
'
SUCCEEDED
'
,
startTime
:
Date
.
now
(),
endTime
:
Date
.
now
()
});
}
}
private
async
getFinalMetricData
(
trialJobId
:
string
):
Promise
<
any
>
{
private
async
getFinalMetricData
(
trialJobId
:
string
):
Promise
<
any
>
{
...
...
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