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
af89df8c
Unverified
Commit
af89df8c
authored
May 16, 2019
by
SparkSnail
Committed by
GitHub
May 16, 2019
Browse files
Fix gpu detector in localTrainingService (#1068)
parent
5af01545
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
src/nni_manager/training_service/local/gpuScheduler.ts
src/nni_manager/training_service/local/gpuScheduler.ts
+10
-6
No files found.
src/nni_manager/training_service/local/gpuScheduler.ts
View file @
af89df8c
...
@@ -105,12 +105,16 @@ class GPUScheduler {
...
@@ -105,12 +105,16 @@ class GPUScheduler {
}
}
private
async
updateGPUSummary
():
Promise
<
void
>
{
private
async
updateGPUSummary
():
Promise
<
void
>
{
const
cmdresult
:
cpp
.
childProcessPromise
.
Result
=
let
gpuMetricPath
=
path
.
join
(
this
.
gpuMetricCollectorScriptFolder
,
'
gpu_metrics
'
);
await
execTail
(
path
.
join
(
this
.
gpuMetricCollectorScriptFolder
,
'
gpu_metrics
'
));
if
(
fs
.
existsSync
(
gpuMetricPath
))
{
if
(
cmdresult
&&
cmdresult
.
stdout
)
{
const
cmdresult
:
cpp
.
childProcessPromise
.
Result
=
await
execTail
(
gpuMetricPath
);
this
.
gpuSummary
=
<
GPUSummary
>
JSON
.
parse
(
cmdresult
.
stdout
);
if
(
cmdresult
&&
cmdresult
.
stdout
)
{
}
else
{
this
.
gpuSummary
=
<
GPUSummary
>
JSON
.
parse
(
cmdresult
.
stdout
);
this
.
log
.
error
(
'
Could not get gpu metrics information!
'
);
}
else
{
this
.
log
.
error
(
'
Could not get gpu metrics information!
'
);
}
}
else
{
this
.
log
.
warning
(
'
gpu_metrics file does not exist!
'
)
}
}
}
}
}
}
...
...
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