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
yaoyuping
nnDetection
Commits
64ad8dfa
Commit
64ad8dfa
authored
Jul 25, 2021
by
mibaumgartner
Browse files
color to logger
parent
263cdb19
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
3 deletions
+18
-3
scripts/consolidate.py
scripts/consolidate.py
+6
-1
scripts/predict.py
scripts/predict.py
+6
-1
scripts/train.py
scripts/train.py
+6
-1
No files found.
scripts/consolidate.py
View file @
64ad8dfa
...
...
@@ -138,7 +138,12 @@ def main():
target_dir
=
model_dir
/
"consolidated"
logger
.
remove
()
logger
.
add
(
sys
.
stdout
,
format
=
"{level} {message}"
,
level
=
"INFO"
)
logger
.
add
(
sys
.
stdout
,
format
=
"<level>{level} {message}</level>"
,
level
=
"INFO"
,
colorize
=
True
,
)
logger
.
add
(
Path
(
target_dir
)
/
"consolidate.log"
,
level
=
"DEBUG"
)
logger
.
info
(
f
"looking for models in
{
model_dir
}
"
)
...
...
scripts/predict.py
View file @
64ad8dfa
...
...
@@ -63,7 +63,12 @@ def run(cfg: dict,
prediction_dir
=
training_dir
/
"test_predictions"
logger
.
remove
()
logger
.
add
(
sys
.
stdout
,
format
=
"{level} {message}"
,
level
=
"INFO"
)
logger
.
add
(
sys
.
stdout
,
format
=
"<level>{level} {message}</level>"
,
level
=
"INFO"
,
colorize
=
True
,
)
logger
.
add
(
Path
(
training_dir
)
/
"inference.log"
,
level
=
"INFO"
)
if
process
:
...
...
scripts/train.py
View file @
64ad8dfa
...
...
@@ -201,7 +201,12 @@ def _train(
{
"trainer"
:
OmegaConf
.
to_container
(
cfg
[
"trainer_cfg"
],
resolve
=
True
)}))
logger
.
remove
()
logger
.
add
(
sys
.
stdout
,
format
=
"{level} {message}"
,
level
=
"INFO"
)
logger
.
add
(
sys
.
stdout
,
format
=
"<level>{level} {message}</level>"
,
level
=
"INFO"
,
colorize
=
True
,
)
log_file
=
Path
(
os
.
getcwd
())
/
"train.log"
logger
.
add
(
log_file
,
level
=
"INFO"
)
logger
.
info
(
f
"Log file at
{
log_file
}
"
)
...
...
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