Skip to content
Snippets Groups Projects
Select Git revision
  • enxhi_issue460_remove_TOAR-I_access
  • michael_issue459_preprocess_german_stations
  • sh_pollutants
  • develop protected
  • master default protected
  • release_v2.4.0
  • michael_issue450_feat_load-ifs-data
  • lukas_issue457_feat_set-config-paths-as-parameter
  • lukas_issue454_feat_use-toar-statistics-api-v2
  • lukas_issue453_refac_advanced-retry-strategy
  • lukas_issue452_bug_update-proj-version
  • lukas_issue449_refac_load-era5-data-from-toar-db
  • lukas_issue451_feat_robust-apriori-estimate-for-short-timeseries
  • lukas_issue448_feat_load-model-from-path
  • lukas_issue447_feat_store-and-load-local-clim-apriori-data
  • lukas_issue445_feat_data-insight-plot-monthly-distribution
  • lukas_issue442_feat_bias-free-evaluation
  • lukas_issue444_feat_choose-interp-method-cams
  • 414-include-crps-analysis-and-other-ens-verif-methods-or-plots
  • lukas_issue384_feat_aqw-data-handler
  • v2.4.0 protected
  • v2.3.0 protected
  • v2.2.0 protected
  • v2.1.0 protected
  • Kleinert_etal_2022_initial_submission
  • v2.0.0 protected
  • v1.5.0 protected
  • v1.4.0 protected
  • v1.3.0 protected
  • v1.2.1 protected
  • v1.2.0 protected
  • v1.1.0 protected
  • IntelliO3-ts-v1.0_R1-submit
  • v1.0.0 protected
  • v0.12.2 protected
  • v0.12.1 protected
  • v0.12.0 protected
  • v0.11.0 protected
  • v0.10.0 protected
  • IntelliO3-ts-v1.0_initial-submit
40 results

run.py

Blame
  • run.py 1.53 KiB
    __author__ = "Lukas Leufen"
    __date__ = '2020-06-29'
    
    import argparse
    from mlair.workflows import DefaultWorkflow
    # from mlair.model_modules.recurrent_networks import RNN as chosen_model
    from mlair.helpers import remove_items
    from mlair.configuration.defaults import DEFAULT_PLOT_LIST
    import os
    import tensorflow as tf
    
    
    def load_stations():
        import json
        try:
            filename = 'supplement/station_list_north_german_plain_rural.json'
            with open(filename, 'r') as jfile:
                stations = json.load(jfile)
        except FileNotFoundError:
            stations = None
        return stations
    
    
    def main(parser_args):
        # tf.compat.v1.disable_v2_behavior()
        plots = remove_items(DEFAULT_PLOT_LIST, ["PlotConditionalQuantiles", "PlotPeriodogram"])
        workflow = DefaultWorkflow(  # stations=load_stations(),
            # stations=["DEBW087","DEBW013", "DEBW107",  "DEBW076"],
            stations=["DEBW013", "DEBW087", "DEBW107", "DEBW076"],
            train_model=False, create_new_model=True, network="UBA",
            evaluate_feature_importance=False,  # plot_list=["PlotCompetitiveSkillScore"],
            competitors=["test_model", "test_model2"],
            competitor_path=os.path.join(os.getcwd(), "data", "comp_test"),
            **parser_args.__dict__, start_script=__file__)
        workflow.run()
    
    
    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)