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
8edf150f
Commit
8edf150f
authored
3 years ago
by
masak1112
Browse files
Options
Downloads
Patches
Plain Diff
runscript can find the checkpoints subfolder
parent
943018d4
No related branches found
No related tags found
No related merge requests found
Pipeline
#93153
failed
3 years ago
Stage: build
Stage: test
Stage: deploy
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
video_prediction_tools/utils/runscript_generator/config_postprocess.py
+12
-4
12 additions, 4 deletions
...ion_tools/utils/runscript_generator/config_postprocess.py
with
12 additions
and
4 deletions
video_prediction_tools/utils/runscript_generator/config_postprocess.py
+
12
−
4
View file @
8edf150f
...
@@ -76,20 +76,28 @@ class Config_Postprocess(Config_runscript_base):
...
@@ -76,20 +76,28 @@ class Config_Postprocess(Config_runscript_base):
self
.
model
=
os
.
path
.
basename
(
dir_base
)
self
.
model
=
os
.
path
.
basename
(
dir_base
)
# List the subdirectories...
# List the subdirectories...
_
=
Config_Postprocess
.
get_subdir_list
(
dir_base
)
_
=
Config_Postprocess
.
get_subdir_list
(
dir_base
)
# ... and obtain the checkpoint directory
# Chose the checkpoint directory
ckp_req_str
=
"
Chose 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
)
# List the subdirectories...
_
=
Config_Postprocess
.
get_subdir_list
(
dir_base
)
# ... and obtain the model directory with checkpoints
trained_dir_req_str
=
"
Choose a trained model from the experiment list above:
"
trained_dir_req_str
=
"
Choose a trained model from the experiment list above:
"
trained_err
=
FileNotFoundError
(
"
No trained model parameters found.
"
)
trained_err
=
FileNotFoundError
(
"
No trained model parameters found.
"
)
self
.
checkpoint_dir
=
Config_Postprocess
.
keyboard_interaction
(
trained_dir_req_str
,
self
.
checkpoint_dir
=
Config_Postprocess
.
keyboard_interaction
(
trained_dir_req_str
,
Config_Postprocess
.
check_traindir
,
Config_Postprocess
.
check_traindir
,
trained_err
,
ntries
=
3
,
prefix2arg
=
dir_base
+
"
/
"
)
trained_err
,
ntries
=
3
,
prefix2arg
=
dir_base
+
"
/
"
)
# get the relevant information from checkpoint_dir in order to construct source_dir and results_dir
# get the relevant information from checkpoint_dir in order to construct source_dir and results_dir
# (following naming convention)
# (following naming convention)
cp_dir_split
=
Config_Postprocess
.
path_rec_split
(
self
.
checkpoint_dir
)
cp_dir_split
=
Config_Postprocess
.
path_rec_split
(
self
.
checkpoint_dir
)
cp_dir_split
=
list
(
filter
(
None
,
cp_dir_split
))
# get rid of empty list elements
cp_dir_split
=
list
(
filter
(
None
,
cp_dir_split
))
# get rid of empty list elements
base_dir
,
exp_dir_base
,
exp_dir
=
"
/
"
+
os
.
path
.
join
(
*
cp_dir_split
[:
-
4
]),
cp_dir_split
[
-
3
],
cp_dir_split
[
-
1
]
base_dir
,
exp_dir_base
,
exp_dir
=
"
/
"
+
os
.
path
.
join
(
*
cp_dir_split
[:
-
4
]),
cp_dir_split
[
-
3
],
cp_dir_split
[
-
2
]
self
.
runscript_target
=
self
.
rscrpt_tmpl_prefix
+
self
.
dataset
+
"
_
"
+
exp_dir
+
"
.sh
"
self
.
runscript_target
=
self
.
rscrpt_tmpl_prefix
+
self
.
dataset
+
"
_
"
+
exp_dir
+
"
.sh
"
# Set results_dir
# Set results_dir
...
...
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