Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
AMBS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
esde
machine-learning
AMBS
Commits
f744d97d
Commit
f744d97d
authored
2 years ago
by
Michael Langguth
Browse files
Options
Downloads
Patches
Plain Diff
Trouble shooting in config_postprocess.py in case user only presses 'Enter'.
parent
92fcdfde
No related branches found
No related tags found
No related merge requests found
Pipeline
#105962
failed
2 years ago
Stage: build
Stage: test
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
video_prediction_tools/utils/runscript_generator/config_postprocess.py
+10
-11
10 additions, 11 deletions
...ion_tools/utils/runscript_generator/config_postprocess.py
with
10 additions
and
11 deletions
video_prediction_tools/utils/runscript_generator/config_postprocess.py
+
10
−
11
View file @
f744d97d
...
...
@@ -78,7 +78,7 @@ class Config_Postprocess(Config_runscript_base):
_
=
Config_Postprocess
.
get_subdir_list
(
dir_base
)
# Chose the checkpoint directory
ckp_req_str
=
"
Chose a checkpoint directory from the list above:
"
ckp_req_str
=
"
Cho
o
se a checkpoint directory from the list above:
"
ckp_req_err
=
NotADirectoryError
(
"
Could not find the passed directory.
"
)
dir_base
=
Config_Postprocess
.
keyboard_interaction
(
ckp_req_str
,
Config_Postprocess
.
check_dir
,
ckp_req_err
,
prefix2arg
=
dir_base
+
"
/
"
,
ntries
=
2
)
...
...
@@ -172,24 +172,23 @@ class Config_Postprocess(Config_runscript_base):
status
=
False
model_in
=
os
.
path
.
basename
(
model_path
)
if
model_in
==
"
help
"
:
if
not
silent
:
print
(
"
**** Known models ****
"
)
for
model
in
Config_Postprocess
.
list_models
:
print
(
model
)
print
(
"
**** Known models ****
"
)
model_in
=
os
.
path
.
basename
(
model_path
)
# try to infer model-name (empty in case user simply pressed enter)
if
not
os
.
path
.
isdir
(
model_path
):
if
model_in
==
"
help
"
or
not
os
.
path
.
isdir
(
model_path
):
if
not
silent
:
print
(
"
The directory {0} does not exist
"
.
format
(
model_path
))
if
model_in
!=
"
help
"
:
print
(
"
The directory {0} does not exist
"
.
format
(
model_path
))
try
:
_
=
Config_Postprocess
.
get_subdir_list
(
os
.
path
.
dirname
(
model_path
))
except
:
print
(
"
The base directory does not exist as well!
"
)
return
status
if
not
model_in
in
Config_Postprocess
.
list_models
:
if
not
model_in
:
# user just printed 'Enter'
_
=
Config_Postprocess
.
get_subdir_list
(
os
.
path
.
dirname
(
model_path
))
return
status
if
not
model_in
in
Config_Postprocess
.
list_models
:
if
not
silent
:
print
(
"
%{0}: WARNING: Unknown model name passed, but trained model seems to be present.
\n
"
.
format
(
method
)
+
"
Please delete the directory
'
{0}
'
if this is not the case!
"
.
format
(
model_path
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment