Skip to content
Snippets Groups Projects
Select Git revision
  • d2a90c97abc2826891eb177279f7648e4e7a7dbd
  • 2023 default
  • pages protected
  • 2022-matse
  • 2022
  • 2021
  • 2019
  • master
8 results

index.html

Blame
  • run.py 1.94 KiB
    __author__ = "Lukas Leufen"
    __date__ = '2019-11-14'
    
    
    import argparse
    import json
    import os
    
    from src.run_modules.experiment_setup import ExperimentSetup
    from src.run_modules.partition_check import PartitionCheck
    from src.run_modules.model_setup import ModelSetup
    from src.run_modules.post_processing import PostProcessing
    from src.run_modules.pre_processing import PreProcessing
    from src.run_modules.run_environment import RunEnvironment
    from src.run_modules.training import Training
    
    
    def main(parser_args):
        
        station_filename = "German_background_stations.json"
        with open(station_filename) as jfile:
            stations = json.load(jfile)
    
        with RunEnvironment():
    
            ExperimentSetup(parser_args,
                            data_path=f"{os.getcwd()}/raw_input_IntelliO3-ts/",
                            # hpc_hosts=["yo"], #
                            stations=stations,
                            evaluate_bootstraps=False,
                            station_type='background', window_lead_time=4, window_history_size=6,
                            trainable=False, create_new_model=False, permute_data_on_training=True,
                            extreme_values=3., train_min_length=365, val_min_length=365, test_min_length=365,
                            create_new_bootstraps=False,
                            plot_list=["PlotMonthlySummary", "PlotStationMap", "PlotClimatologicalSkillScore",
                                       "PlotCompetitiveSkillScore", "PlotBootstrapSkillScore", "PlotConditionalQuantiles",
                                       "PlotAvailability"],
    
                            )
    
            PreProcessing()
    
            PartitionCheck()
            
            ModelSetup()
    
            Training()
    
            PostProcessing()
    
    
    if __name__ == "__main__":
        parser = argparse.ArgumentParser()
        parser.add_argument('--experiment_date', metavar='--exp_date', type=str, default="testrun",
                            help="set experiment date as string")
        args = parser.parse_args()
    
        main(args)