-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmanager_0_user_params.py
73 lines (70 loc) · 3.32 KB
/
manager_0_user_params.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
import sys
import os
#############################
# 1. Config file, run type, name, and where to tune
#############################
# run_name = 'ZM_20241220'# '20241016_75_100_maize_sunflower_soybeans_NorthernCape' #'20241004_75_100_maize_sunflower_soybeans'
# runtype is overwritten when called by manager_50_ope
runType = 'fast_tuning' #always 'fast_tuning' when tuning # this is fixed for tuning ['tuning', 'fast_tuning', 'opeForecast']
if 'win' in sys.platform:
# ZA
# config_fn = r'V:\foodsec\Projects\SNYF\stable_input_data\ZA\summer\ZAsummer_Maize_(corn)_WC-South_Africa-ASAP_config.json'
# run_name = 'ZA_20241226'
# DZ
# config_fn = r'V:\foodsec\Projects\SNYF\stable_input_data\DZ\DZMultiple_WC-Algeria-ASAP_config.json'
# run_name = 'DZ_20241226'
# ZM Zambia
# config_fn = r'V:\foodsec\Projects\SNYF\stable_input_data\ZM\annual\Maize_(corn)_WC-Zambia-HARVESTAT.json'
# BE Benin ASAP
# config_fn = r'V:\foodsec\Projects\SNYF\stable_input_data\BE\BEMaize_(corn)_WC-Benin-ASAP.json'
# run_name = 'BE_20241226'
# MZ Mozambique ASAP
# config_fn = r'V:\foodsec\Projects\SNYF\stable_input_data\MZ\main\Maize_(corn)_WC-Mozambique-FEWSNET.json'
# run_name = 'MZ_20250122'
# MW Malawi
config_fn = r'V:\foodsec\Projects\SNYF\stable_input_data\MW\main\Maize_(corn)_WC-Malawi-HARVESTAT.json'
run_name = 'MW_20250122'
tune_on_condor = False
else:
# limit multithreat (even setting njobs = 4, undelying libriaries were using more, see https://github.com/joblib/joblib/issues/793)
os.environ['MKL_NUM_THREADS'] = '1'
os.environ['OPENBLAS_NUM_THREADS'] = '1'
os.environ['OMP_NUM_THREADS'] = '1'
# ZA
# config_fn = r'/eos/jeodpp/data/projects/ML4CAST/ZA/summer/ZAsummer_Maize_(corn)_WC-South_Africa-ASAP_config.json'
# run_name = 'ZA_20241226'
# DZ
# config_fn = r'/eos/jeodpp/data/projects/ML4CAST/DZ/DZMultiple_WC-Algeria-ASAP_config.json'
# run_name = 'DZ_20241226'
# ZM zambia
# config_fn = r'/eos/jeodpp/data/projects/ML4CAST/ZM/annual/Maize_(corn)_WC-Zambia-HARVESTAT.json'
# run_name = 'ZM_20241226'
# BE Benin ASAP
# config_fn = r'/eos/jeodpp/data/projects/ML4CAST/BE/BEMaize_(corn)_WC-Benin-ASAP.json'
# run_name = 'BE_20241226'
# MZ Mozambique
# config_fn = r'/eos/jeodpp/data/projects/ML4CAST/MZ/main/Maize_(corn)_WC-Mozambique-FEWSNET.json'
# run_name = 'MZ_20250122'
# MW Malawi
config_fn = r'/eos/jeodpp/data/projects/ML4CAST/MW/main/Maize_(corn)_WC-Malawi-HARVESTAT.json'
run_name = 'MW_20250122'
tune_on_condor = True
time_step_check = 60 # in minutes
#############################
# 2. Params for tuning
#############################
# # Percentage of admin to retain (based on area). I.e. rank by area and retain only the largest %
# prct2retain = 100 -->moved to config
# Minutes to wait for asking condor_q
time_step_check = 60
# metric for best model selection
metric = 'RMSE_val'
# ml models to rerun after fust tuning (obsrvation show that the best model found by standard tuning is within the first 10 found by fast tuning)
n = 20
#############################
# 3.Specification for ope run (runType = 'opeForecast')
#############################
# month X means that all months up to X (included) are used, so this is possible in month X+1
forecastingMonth = 5 # 7
# This year
forecastingYear = 2024 #2023