Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
nni
Commits
e6eb6eab
Unverified
Commit
e6eb6eab
authored
Jan 08, 2019
by
SparkSnail
Committed by
GitHub
Jan 08, 2019
Browse files
support frameworkcontroller log (#572)
support frameworkcontroller log
parent
f437107d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
2 deletions
+43
-2
examples/trials/mnist/config_frameworkcontroller.yml
examples/trials/mnist/config_frameworkcontroller.yml
+41
-0
src/sdk/pynni/nni/platform/local.py
src/sdk/pynni/nni/platform/local.py
+2
-2
No files found.
examples/trials/mnist/config_frameworkcontroller.yml
0 → 100644
View file @
e6eb6eab
authorName
:
default
experimentName
:
example_mnist
trialConcurrency
:
1
maxExecDuration
:
1h
maxTrialNum
:
10
#choice: local, remote, pai, kubeflow
trainingServicePlatform
:
frameworkcontroller
searchSpacePath
:
search_space.json
#choice: true, false
useAnnotation
:
false
tuner
:
#choice: TPE, Random, Anneal, Evolution
builtinTunerName
:
TPE
classArgs
:
#choice: maximize, minimize
optimize_mode
:
maximize
assessor
:
builtinAssessorName
:
Medianstop
classArgs
:
optimize_mode
:
maximize
gpuNum
:
0
trial
:
codeDir
:
.
taskRoles
:
-
name
:
worker
taskNum
:
1
command
:
python3 mnist.py
gpuNum
:
1
cpuNum
:
1
memoryMB
:
8192
image
:
msranni/nni:latest
frameworkAttemptCompletionPolicy
:
minFailedTaskCount
:
1
minSucceededTaskCount
:
1
frameworkcontrollerConfig
:
storage
:
nfs
nfs
:
# Your NFS server IP, like 10.10.10.10
server
:
{
your_nfs_server_ip
}
# Your NFS server export path, like /var/nfs/nni
path
:
{
your_nfs_server_export_path
}
\ No newline at end of file
src/sdk/pynni/nni/platform/local.py
View file @
e6eb6eab
...
@@ -36,7 +36,7 @@ if not os.path.exists(_outputdir):
...
@@ -36,7 +36,7 @@ if not os.path.exists(_outputdir):
os
.
makedirs
(
_outputdir
)
os
.
makedirs
(
_outputdir
)
_nni_platform
=
os
.
environ
[
'NNI_PLATFORM'
]
_nni_platform
=
os
.
environ
[
'NNI_PLATFORM'
]
if
_nni_platform
not
in
[
'pai'
,
'kubeflow'
]:
if
_nni_platform
not
in
[
'pai'
,
'kubeflow'
,
'frameworkcontroller'
]:
_log_file_path
=
os
.
path
.
join
(
_outputdir
,
'trial.log'
)
_log_file_path
=
os
.
path
.
join
(
_outputdir
,
'trial.log'
)
init_logger
(
_log_file_path
)
init_logger
(
_log_file_path
)
...
@@ -77,7 +77,7 @@ def get_next_parameter():
...
@@ -77,7 +77,7 @@ def get_next_parameter():
return
params
return
params
def
send_metric
(
string
):
def
send_metric
(
string
):
if
_nni_platform
in
[
'pai'
,
'kubeflow'
]:
if
_nni_platform
in
[
'pai'
,
'kubeflow'
,
'frameworkcontroller'
]:
data
=
(
string
).
encode
(
'utf8'
)
data
=
(
string
).
encode
(
'utf8'
)
assert
len
(
data
)
<
1000000
,
'Metric too long'
assert
len
(
data
)
<
1000000
,
'Metric too long'
print
(
'NNISDK_ME%s'
%
(
data
))
print
(
'NNISDK_ME%s'
%
(
data
))
...
...
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