Skip to content

Commit

Permalink
gestione dei file name con gli spazi
Browse files Browse the repository at this point in the history
  • Loading branch information
meronmi committed Nov 22, 2024
1 parent 1e4ffc7 commit 9a18eec
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion manager_0_user_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
# config_fn = r'V:\foodsec\Projects\SNYF\stable_input_data\DZ\DZMultiple_WC-Algeria-ASAP_config.json'
tune_on_condor = False
else:
config_fn = r'/eos/jeodpp/data/projects/ML4CAST/ZA/summer/ZAsummer_Maize_(corn)_WC-South_Africa-ASAP_config.json'
# ZA
# config_fn = r'/eos/jeodpp/data/projects/ML4CAST/ZA/summer/ZAsummer_Maize_(corn)_WC-South_Africa-ASAP_config.json'
# DZ
config_fn = r'/eos/jeodpp/data/projects/ML4CAST/DZ/DZMultiple_WC-Algeria-ASAP_config.json'
tune_on_condor = True
time_step_check = 60 # in minutes

Expand Down
4 changes: 3 additions & 1 deletion tuner.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from B_preprocess import b100_load
from D_modelling import d090_model_wrapper
from F_post_processsing import F100_analyze_hindcast_output
import re

def remove_files(path):
"""
Expand Down Expand Up @@ -172,7 +173,8 @@ def tuneB(run_name, config_fn, tune_on_condor, runType, spec_files_list):
os.remove(condor_task_list_fn1)
f_obj = open(condor_task_list_fn1, 'a')
for el in spec_files_list1:
f_obj.write(f'{str(el)} {config_fn} {run_name} {runType}\n')
# f_obj.write(f'"{str(el)}" {config_fn} {run_name} {runType}\n')
f_obj.write(f"'{re.escape(str(el))}' {config_fn} {run_name} {runType}\n")
f_obj.close()
# Make sure that the run.sh in this project is executable (# chmod 755 run.sh)
# adjust the condor.submit template
Expand Down

0 comments on commit 9a18eec

Please sign in to comment.