Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Shreyan Chowdhury
moodwalk
Commits
78ef5ebb
Commit
78ef5ebb
authored
Sep 10, 2019
by
Shreyan Chowdhury
Browse files
bug fix in config parser
parent
5a5a798c
Changes
1
Hide whitespace changes
Inline
Side-by-side
experiments/experiment_baseline.py
View file @
78ef5ebb
...
...
@@ -20,12 +20,22 @@ def run(hparams):
exp
=
Experiment
(
save_dir
=
CURR_RUN_PATH
)
def
setup_config
():
def
print_config
():
global
config
st
=
'---------CONFIG--------
\n
'
for
k
in
config
.
keys
():
st
+=
k
+
':'
+
str
(
config
.
get
(
k
))
+
'
\n
'
return
st
conf
=
hparams
.
config
conf_func
=
globals
()[
conf
]
try
:
conf_func
()
except
:
logger
.
error
(
f
"Config
{
conf
}
not defined"
)
if
conf
is
not
None
:
conf_func
=
globals
()[
conf
]
try
:
conf_func
()
except
:
logger
.
error
(
f
"Config
{
conf
}
not defined"
)
logger
.
info
(
print_config
())
setup_config
()
global
config
...
...
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