Skip to content
Snippets Groups Projects
Commit 4e9d2721 authored by gong1's avatar gong1
Browse files

Merge branch 'bing_issue#148_meta_postprocess' into develop

parents 393355cd e353124f
No related branches found
No related tags found
No related merge requests found
Pipeline #90920 failed
#!/bin/bash -x
## Controlling Batch-job
#SBATCH --account=deepacf
#SBATCH --nodes=1
#SBATCH --ntasks=1
##SBATCH --ntasks-per-node=13
#SBATCH --cpus-per-task=1
#SBATCH --output=meta_postprocess_era5-out.%j
#SBATCH --error=meta_postprocess_era5-err.%j
#SBATCH --time=00:20:00
#SBATCH --partition=batch
#SBATCH --gres=gpu:0
#SBATCH --mail-type=ALL
#SBATCH --mail-user=me@somewhere.com
######### Template identifier (don't remove) #########
echo "Do not run the template scripts"
exit 99
######### Template identifier (don't remove) #########
jutil env activate -p deepacf
# Declare input parameters
root_dir=/p/project/deepacf/deeprain/video_prediction_shared_folder/
analysis_config=video_prediction_tools/meta_postprocess_config/meta_config.json
metric=mse
exp_id=test
enable_skill_scores=True
srun python ../main_scripts/main_meta_postprocess.py --root_dir ${root_dir} --analysis_config ${analysis_config} \
--metric ${metric} --exp_id ${exp_id} --enable_skill_scores ${enable_skill_scores}
# coding=utf-8
# SPDX-FileCopyrightText: 2021 Earth System Data Exploration (ESDE), Jülich Supercomputing Center (JSC) # SPDX-FileCopyrightText: 2021 Earth System Data Exploration (ESDE), Jülich Supercomputing Center (JSC)
# #
# SPDX-License-Identifier: MIT # SPDX-License-Identifier: MIT
...@@ -9,7 +10,9 @@ from __future__ import print_function ...@@ -9,7 +10,9 @@ from __future__ import print_function
__email__ = "b.gong@fz-juelich.de" __email__ = "b.gong@fz-juelich.de"
__author__ = "Bing Gong, Yan Ji" __author__ = "Bing Gong, Yan Ji"
__date__ = "2020-12-04" __date__ = "2020-12-04"
__update_date__ = "2022-02-02" __updatedate__ = "2022-02-02"
import argparse
import os import os
from matplotlib.pylab import plt from matplotlib.pylab import plt
import json import json
...@@ -271,6 +274,7 @@ class MetaPostprocess(object): ...@@ -271,6 +274,7 @@ class MetaPostprocess(object):
def main(): def main():
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
parser.add_argument("--root_dir", type=str, required=True, help="The root path for output dir")
parser.add_argument("--analysis_config", type=str, required=True, help="The path points to the meta_postprocess configuration file.", parser.add_argument("--analysis_config", type=str, required=True, help="The path points to the meta_postprocess configuration file.",
default="../meta_postprocess_config/meta_config.json") default="../meta_postprocess_config/meta_config.json")
parser.add_argument("--metric", help="Based on which the models are compared, the value should be in one of [mse,ssim,acc,texture]",default="mse") parser.add_argument("--metric", help="Based on which the models are compared, the value should be in one of [mse,ssim,acc,texture]",default="mse")
...@@ -278,7 +282,7 @@ def main(): ...@@ -278,7 +282,7 @@ def main():
parser.add_argument("--enable_skill_scores", help="compared by skill scores or the absolute evaluation values",default=True) parser.add_argument("--enable_skill_scores", help="compared by skill scores or the absolute evaluation values",default=True)
args = parser.parse_args() args = parser.parse_args()
meta = MetaPostprocess(analysis_config=args.analysis_config, metric=args.metric, exp_id=args.metric, meta = MetaPostprocess(root_dir=args.root_dir,analysis_config=args.analysis_config, metric=args.metric, exp_id=args.metric,
enable_skill_scores=args.enable_skill_scores) enable_skill_scores=args.enable_skill_scores)
meta() meta()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment