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
7a1f05ae
Unverified
Commit
7a1f05ae
authored
Mar 11, 2021
by
liuzhe-lz
Committed by
GitHub
Mar 11, 2021
Browse files
Merge pull request #3444 from microsoft/v2.1
V2.1 merge back to master
parents
539a7cd7
a0ae02e6
Changes
67
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
33 additions
and
19 deletions
+33
-19
nni/retiarii/strategy/utils.py
nni/retiarii/strategy/utils.py
+3
-0
nni/retiarii/trial_entry.py
nni/retiarii/trial_entry.py
+3
-0
nni/retiarii/utils.py
nni/retiarii/utils.py
+3
-0
nni/tools/nnictl/launcher.py
nni/tools/nnictl/launcher.py
+4
-3
test/config/assessors/curvefitting.yml
test/config/assessors/curvefitting.yml
+1
-1
test/nni_test/nnitest/run_tests.py
test/nni_test/nnitest/run_tests.py
+2
-2
ts/nni_manager/core/nnimanager.ts
ts/nni_manager/core/nnimanager.ts
+17
-13
No files found.
nni/retiarii/strategy/utils.py
View file @
7a1f05ae
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import
collections
from
typing
import
Dict
,
Any
,
List
from
..graph
import
Model
...
...
nni/retiarii/trial_entry.py
View file @
7a1f05ae
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
"""
Entrypoint for trials.
...
...
nni/retiarii/utils.py
View file @
7a1f05ae
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import
inspect
import
warnings
from
collections
import
defaultdict
...
...
nni/tools/nnictl/launcher.py
View file @
7a1f05ae
...
...
@@ -3,6 +3,7 @@
import
json
import
os
from
pathlib
import
Path
import
sys
import
string
import
random
...
...
@@ -590,14 +591,14 @@ def create_experiment(args):
except
Exception
:
print_warning
(
'Validation with V1 schema failed. Trying to convert from V2 format...'
)
try
:
config
=
ExperimentConfig
(
**
experiment_config
)
config
=
ExperimentConfig
(
_base_path
=
Path
(
config_path
).
parent
,
**
experiment_config
)
experiment_config
=
convert
.
to_v1_yaml
(
config
)
except
Exception
as
e
:
print_error
(
f
'Con
version from
v2 format
failed
:
{
repr
(
e
)
}
'
)
print_error
(
f
'Con
fig in v2 format validation failed, the config error in
v2 format
is
:
{
repr
(
e
)
}
'
)
try
:
validate_all_content
(
experiment_config
,
config_path
)
except
Exception
as
e
:
print_error
(
f
'Config in v1 format validation failed
.
{
repr
(
e
)
}
'
)
print_error
(
f
'Config in v1 format validation failed
, the config error in v1 format is:
{
repr
(
e
)
}
'
)
exit
(
1
)
try
:
...
...
test/config/assessors/curvefitting.yml
View file @
7a1f05ae
authorName
:
nni
experimentName
:
default_test
maxExecDuration
:
5
m
maxExecDuration
:
10
m
maxTrialNum
:
8
trialConcurrency
:
8
searchSpacePath
:
../naive_trial/search_space.json
...
...
test/nni_test/nnitest/run_tests.py
View file @
7a1f05ae
...
...
@@ -260,9 +260,9 @@ def run(args):
continue
# remote mode need more time to cleanup
if
args
.
ts
==
'remote'
:
wait_for_port_available
(
8080
,
18
0
)
wait_for_port_available
(
8080
,
24
0
)
else
:
wait_for_port_available
(
8080
,
3
0
)
wait_for_port_available
(
8080
,
6
0
)
# adl mode need more time to cleanup PVC
if
args
.
ts
==
'adl'
and
name
==
'nnictl-resume-2'
:
...
...
ts/nni_manager/core/nnimanager.ts
View file @
7a1f05ae
...
...
@@ -326,22 +326,26 @@ class NNIManager implements Manager {
}
public
async
stopExperimentBottomHalf
():
Promise
<
void
>
{
const
trialJobList
:
TrialJobDetail
[]
=
await
this
.
trainingService
.
listTrialJobs
();
// DON'T try to make it in parallel, the training service may not handle it well.
// If there is performance concern, consider to support batch cancellation on training service.
for
(
const
trialJob
of
trialJobList
)
{
if
(
trialJob
.
status
===
'
RUNNING
'
||
trialJob
.
status
===
'
WAITING
'
)
{
try
{
this
.
log
.
info
(
`cancelTrialJob:
${
trialJob
.
id
}
`
);
await
this
.
trainingService
.
cancelTrialJob
(
trialJob
.
id
);
}
catch
(
error
)
{
this
.
log
.
debug
(
`ignorable error on canceling trial
${
trialJob
.
id
}
.
${
error
}
`
);
try
{
const
trialJobList
:
TrialJobDetail
[]
=
await
this
.
trainingService
.
listTrialJobs
();
// DON'T try to make it in parallel, the training service may not handle it well.
// If there is performance concern, consider to support batch cancellation on training service.
for
(
const
trialJob
of
trialJobList
)
{
if
(
trialJob
.
status
===
'
RUNNING
'
||
trialJob
.
status
===
'
WAITING
'
)
{
try
{
this
.
log
.
info
(
`cancelTrialJob:
${
trialJob
.
id
}
`
);
await
this
.
trainingService
.
cancelTrialJob
(
trialJob
.
id
);
}
catch
(
error
)
{
this
.
log
.
debug
(
`ignorable error on canceling trial
${
trialJob
.
id
}
.
${
error
}
`
);
}
}
}
await
this
.
trainingService
.
cleanUp
();
}
catch
(
err
)
{
this
.
log
.
error
(
`
${
err
.
stack
}
`
);
}
await
this
.
trainingService
.
cleanUp
();
if
(
this
.
experimentProfile
.
endTime
===
undefined
)
{
this
.
setEndtime
();
}
...
...
Prev
1
2
3
4
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