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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
esde
machine-learning
AMBS
Commits
609a7034
Commit
609a7034
authored
Jun 6, 2021
by
BING GONG
Browse files
Options
Downloads
Patches
Plain Diff
add setup_gpu-config back
parent
86a3271d
No related branches found
No related tags found
No related merge requests found
Pipeline
#69364
passed
Jun 6, 2021
Stage: build
Stage: test
Stage: deploy
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
video_prediction_tools/main_scripts/main_visualize_postprocess.py
+4
-2
4 additions, 2 deletions
...ediction_tools/main_scripts/main_visualize_postprocess.py
with
4 additions
and
2 deletions
video_prediction_tools/main_scripts/main_visualize_postprocess.py
+
4
−
2
View file @
609a7034
...
@@ -31,7 +31,7 @@ from postprocess_plotting import plot_avg_eval_metrics, plot_cond_quantile, crea
...
@@ -31,7 +31,7 @@ from postprocess_plotting import plot_avg_eval_metrics, plot_cond_quantile, crea
class
Postprocess
(
TrainModel
):
class
Postprocess
(
TrainModel
):
def
__init__
(
self
,
results_dir
=
None
,
checkpoint
=
None
,
mode
=
"
test
"
,
batch_size
=
None
,
num_stochastic_samples
=
1
,
def
__init__
(
self
,
results_dir
=
None
,
checkpoint
=
None
,
mode
=
"
test
"
,
batch_size
=
None
,
num_stochastic_samples
=
1
,
stochastic_plot_id
=
0
,
seed
=
None
,
channel
=
0
,
args
=
None
,
run_mode
=
"
deterministic
"
,
stochastic_plot_id
=
0
,
gpu_mem_frac
=
None
,
seed
=
None
,
channel
=
0
,
args
=
None
,
run_mode
=
"
deterministic
"
,
eval_metrics
=
None
):
eval_metrics
=
None
):
"""
"""
Initialization of the class instance for postprocessing (generation of forecasts from trained model +
Initialization of the class instance for postprocessing (generation of forecasts from trained model +
...
@@ -43,6 +43,7 @@ class Postprocess(TrainModel):
...
@@ -43,6 +43,7 @@ class Postprocess(TrainModel):
:param num_stochastic_samples: number of ensemble members for variational models (SAVP, VAE), default: 1
:param num_stochastic_samples: number of ensemble members for variational models (SAVP, VAE), default: 1
not supported yet!!!
not supported yet!!!
:param stochastic_plot_id: not supported yet!
:param stochastic_plot_id: not supported yet!
:param gpu_mem_frac: fraction of GPU memory to be pre-allocated
:param seed: Integer controlling randomization
:param seed: Integer controlling randomization
:param channel: Channel of interest for statistical evaluation
:param channel: Channel of interest for statistical evaluation
:param args: namespace of parsed arguments
:param args: namespace of parsed arguments
...
@@ -53,6 +54,7 @@ class Postprocess(TrainModel):
...
@@ -53,6 +54,7 @@ class Postprocess(TrainModel):
self
.
results_dir
=
self
.
output_dir
=
os
.
path
.
normpath
(
results_dir
)
self
.
results_dir
=
self
.
output_dir
=
os
.
path
.
normpath
(
results_dir
)
_
=
check_dir
(
self
.
results_dir
,
lcreate
=
True
)
_
=
check_dir
(
self
.
results_dir
,
lcreate
=
True
)
self
.
batch_size
=
batch_size
self
.
batch_size
=
batch_size
self
.
gpu_mem_frac
=
gpu_mem_frac
self
.
seed
=
seed
self
.
seed
=
seed
self
.
set_seed
()
self
.
set_seed
()
self
.
num_stochastic_samples
=
num_stochastic_samples
self
.
num_stochastic_samples
=
num_stochastic_samples
...
@@ -70,7 +72,7 @@ class Postprocess(TrainModel):
...
@@ -70,7 +72,7 @@ class Postprocess(TrainModel):
self
.
nboots_block
=
1000
self
.
nboots_block
=
1000
self
.
block_length
=
7
*
24
# this corresponds to a block length of 7 days in case of hourly forecasts
self
.
block_length
=
7
*
24
# this corresponds to a block length of 7 days in case of hourly forecasts
# initialize ev
e
rything to get an executable Postprocess instance
# initialize evrything to get an executable Postprocess instance
self
.
save_args_to_option_json
()
# create options.json-in results directory
self
.
save_args_to_option_json
()
# create options.json-in results directory
self
.
copy_data_model_json
()
# copy over JSON-files from model directory
self
.
copy_data_model_json
()
# copy over JSON-files from model directory
# get some parameters related to model and dataset
# get some parameters related to model and dataset
...
...
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
sign in
to comment