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
95f693e9
Commit
95f693e9
authored
4 years ago
by
Michael Langguth
Browse files
Options
Downloads
Patches
Plain Diff
Correct path-construction to data split-templates.
parent
c8588439
No related branches found
No related tags found
No related merge requests found
Pipeline
#59786
passed
4 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/config_runscripts/config_training.py
+9
-6
9 additions, 6 deletions
video_prediction_tools/config_runscripts/config_training.py
with
9 additions
and
6 deletions
video_prediction_tools/config_runscripts/config_training.py
+
9
−
6
View file @
95f693e9
...
@@ -104,11 +104,12 @@ class Config_Train(Config_runscript_base):
...
@@ -104,11 +104,12 @@ class Config_Train(Config_runscript_base):
os
.
makedirs
(
self
.
destination_dir
)
os
.
makedirs
(
self
.
destination_dir
)
# Create json-file for data splitting
# Create json-file for data splitting
source_datasplit
=
os
.
path
.
join
(
"
..
"
,
"
data_split
"
,
"
datasplit_template.json
"
)
source_datasplit
=
os
.
path
.
join
(
"
..
"
,
"
data_split
"
,
self
.
dataset
,
"
datasplit_template.json
"
)
dest_datasplit
=
os
.
path
.
join
(
self
.
destination_dir
,
"
data_split.json
"
)
dest_datasplit
=
os
.
path
.
join
(
self
.
destination_dir
,
"
data_split.json
"
)
# sanity check (default data_split json-file exists)
# sanity check (default data_split json-file exists)
if
not
os
.
path
.
isfile
(
source_datasplit
):
if
not
os
.
path
.
isfile
(
source_datasplit
):
raise
FileNotFoundError
(
"
%{0}: Could not find default data_split json-file
'
{1}
'"
.
format
(
method_name
,
source_datasplit
))
raise
FileNotFoundError
(
"
%{0}: Could not find default data_split json-file
'
{1}
'"
.
format
(
method_name
,
source_datasplit
))
# ...copy over json-file for data splitting...
# ...copy over json-file for data splitting...
os
.
system
(
"
cp
"
+
source_datasplit
+
"
"
+
dest_datasplit
)
os
.
system
(
"
cp
"
+
source_datasplit
+
"
"
+
dest_datasplit
)
# ...and open vim after some delay
# ...and open vim after some delay
...
@@ -119,16 +120,18 @@ class Config_Train(Config_runscript_base):
...
@@ -119,16 +120,18 @@ class Config_Train(Config_runscript_base):
sp
.
call
(
"
sed -i
'
/^#/d
'
{0}
"
.
format
(
dest_datasplit
),
shell
=
True
)
sp
.
call
(
"
sed -i
'
/^#/d
'
{0}
"
.
format
(
dest_datasplit
),
shell
=
True
)
# Create json-file for hyperparameters
# Create json-file for hyperparameters
source_hparams
=
os
.
path
.
join
(
"
..
"
,
"
hparams
"
,
self
.
dataset
,
self
.
model
,
"
model_hparams.json
"
)
source_hparams
=
os
.
path
.
join
(
"
..
"
,
"
hparams
"
,
self
.
dataset
,
self
.
model
,
"
model_hparams_template.json
"
)
dest_hparams
=
os
.
path
.
join
(
self
.
destination_dir
,
"
model_hparams.json
"
)
# sanity check (default hyperparameter json-file exists)
# sanity check (default hyperparameter json-file exists)
if
not
os
.
path
.
isfile
(
source_hparams
):
if
not
os
.
path
.
isfile
(
source_hparams
):
raise
FileNotFoundError
(
"
%{0}: Could not find default hyperparameter json-file
'
%{1}
'"
.
format
(
method_name
,
source_hparams
))
raise
FileNotFoundError
(
"
%{0}: Could not find default hyperparameter json-file
'
%{1}
'"
.
format
(
method_name
,
source_hparams
))
# ...copy over json-file for hyperparamters...
# ...copy over json-file for hyperparamters...
os
.
system
(
"
cp
"
+
source_hparams
+
"
"
+
self
.
destination_dir
)
os
.
system
(
"
cp
"
+
source_hparams
+
"
"
+
dest_hparams
)
# ...and open vim after some delay
# ...and open vim after some delay
print
(
"
*** Please configure the model hyperparameters:
"
)
print
(
"
*** Please configure the model hyperparameters:
"
)
time
.
sleep
(
3
)
time
.
sleep
(
3
)
cmd_vim
=
os
.
environ
.
get
(
'
EDITOR
'
,
'
vi
'
)
+
'
'
+
os
.
path
.
join
(
self
.
destination_dir
,
"
model
_hparams
.json
"
)
cmd_vim
=
os
.
environ
.
get
(
'
EDITOR
'
,
'
vi
'
)
+
'
'
+
dest
_hparams
sp
.
call
(
cmd_vim
,
shell
=
True
)
sp
.
call
(
cmd_vim
,
shell
=
True
)
#
#
# -----------------------------------------------------------------------------------
# -----------------------------------------------------------------------------------
...
...
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