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

add meta_postporcess template

parent 9aee527c
No related branches found
No related tags found
No related merge requests found
Pipeline #90919 failed
......@@ -2,12 +2,12 @@
## Controlling Batch-job
#SBATCH --account=deepacf
#SBATCH --nodes=1
#SBATCH --ntasks=13
#SBATCH --ntasks=1
##SBATCH --ntasks-per-node=13
#SBATCH --cpus-per-task=1
#SBATCH --output=data_extraction_era5-out.%j
#SBATCH --error=data_extraction_era5-err.%j
#SBATCH --time=04:20:00
#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
......@@ -17,22 +17,15 @@
echo "Do not run the template scripts"
exit 99
######### Template identifier (don't remove) #########
jutil env activate -p deepacf
# Name of virtual environment
VIRT_ENV_NAME="my_venv"
# Loading mouldes
source ../env_setup/modules_preprocess+extract.sh
# Activate virtual environment if needed (and possible)
if [ -z ${VIRTUAL_ENV} ]; then
if [[ -f ../${VIRT_ENV_NAME}/bin/activate ]]; then
echo "Activating virtual environment..."
source ../${VIRT_ENV_NAME}/bin/activate
else
echo "ERROR: Requested virtual environment ${VIRT_ENV_NAME} not found..."
exit 1
fi
fi
# 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-License-Identifier: MIT
......@@ -9,7 +10,9 @@ from __future__ import print_function
__email__ = "b.gong@fz-juelich.de"
__author__ = "Bing Gong, Yan Ji"
__date__ = "2020-12-04"
__update_date__ = "2022-02-02"
__updatedate__ = "2022-02-02"
import argparse
import os
from matplotlib.pylab import plt
import json
......@@ -271,6 +274,7 @@ class MetaPostprocess(object):
def main():
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.",
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")
......@@ -278,7 +282,7 @@ def main():
parser.add_argument("--enable_skill_scores", help="compared by skill scores or the absolute evaluation values",default=True)
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)
meta()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment