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
cc5a4fc5
Unverified
Commit
cc5a4fc5
authored
Aug 06, 2021
by
liuzhe-lz
Committed by
GitHub
Aug 06, 2021
Browse files
fix bugs (#4036)
Co-authored-by:
liuzhe
<
zhe.liu@microsoft.com
>
parent
a15eeab6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
nni/tools/nnictl/launcher.py
nni/tools/nnictl/launcher.py
+1
-1
ts/nni_manager/rest_server/restHandler.ts
ts/nni_manager/rest_server/restHandler.ts
+4
-4
No files found.
nni/tools/nnictl/launcher.py
View file @
cc5a4fc5
...
@@ -600,7 +600,7 @@ def manage_external_experiment(args, mode):
...
@@ -600,7 +600,7 @@ def manage_external_experiment(args, mode):
else
:
else
:
print_normal
(
'NNI can not detect experiment id in argument, will use last folder name as experiment id in experiment_dir argument.'
)
print_normal
(
'NNI can not detect experiment id in argument, will use last folder name as experiment id in experiment_dir argument.'
)
experiment_id
=
Path
(
args
.
experiment_dir
).
name
experiment_id
=
Path
(
args
.
experiment_dir
).
name
log_dir
=
os
.
path
.
dirname
(
args
.
experiment_dir
)
log_dir
=
str
(
Path
(
args
.
experiment_dir
)
.
parent
)
if
not
experiment_id
:
if
not
experiment_id
:
print_error
(
"Please set experiment id argument, or add id as the last folder name in experiment_dir argument."
)
print_error
(
"Please set experiment id argument, or add id as the last folder name in experiment_dir argument."
)
exit
(
1
)
exit
(
1
)
...
...
ts/nni_manager/rest_server/restHandler.ts
View file @
cc5a4fc5
...
@@ -306,10 +306,10 @@ class NNIRestHandler {
...
@@ -306,10 +306,10 @@ class NNIRestHandler {
encoding
=
'
utf8
'
;
encoding
=
'
utf8
'
;
}
}
this
.
nniManager
.
getTrialFile
(
req
.
params
.
id
,
filename
).
then
((
content
:
Buffer
|
string
)
=>
{
this
.
nniManager
.
getTrialFile
(
req
.
params
.
id
,
filename
).
then
((
content
:
Buffer
|
string
)
=>
{
if
(
content
instanceof
Buffer
)
{
const
contentType
=
content
instanceof
Buffer
?
'
application/octet-stream
'
:
'
text/plain
'
;
res
.
header
(
'
Content-Type
'
,
'
application/octet-stream
'
);
res
.
header
(
'
Content-Type
'
,
contentType
);
}
else
if
(
content
===
''
)
{
if
(
content
===
''
)
{
content
=
`
${
filename
}
is empty.`
;
content
=
`
${
filename
}
is empty.`
;
// FIXME: this should be handled in front-end
}
}
res
.
send
(
content
);
res
.
send
(
content
);
}).
catch
((
err
:
Error
)
=>
{
}).
catch
((
err
:
Error
)
=>
{
...
...
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