captain-project / notebooks

Jupiter notebooks with tutorials demonstrating the use of CAPTAIN
6 stars 2 forks source link

I can't find Trained_model folder, can you help us? #1

Open yokotsuno12 opened 1 year ago

yokotsuno12 commented 1 year ago

Hello,

Sorry to bother you, we are trying the Analysis of Empirical Data notebook and we can't find the "trained_models" folder :

FileNotFoundError Traceback (most recent call last) Cell In [22], line 5 1 #trained_model_file = 'trained_models/full_monitor_protect_at_once_d4_n8-0.log' 3 output_file = 'output' ----> 5 env, out_file = cn.run_policy_empirical(env, 6 trained_model=trained_model_file, 7 obsMode=1, # full species monitoring 8 observePolicy=2, # recurrent monitoring, at-once protection 9 n_nodes=[8, 0], 10 budget=0.1, 11 protection_target=0.1, 12 stop_at_end_budget=True, 13 seed=4321, 14 update_features=10, 15 wd=wd, 16 result_file=output_file)

File ~/Desktop/01_PhD/05_First_DL_Modelling/07_OH2022/captain-project-main/captain/algorithms/runPolicyEmpirical.py:177, in run_policy_empirical(env, trained_model, obsMode, observePolicy, n_nodes, budget, protection_target, n_steps, stop_at_end_budget, stop_at_target_met, wd, seed, verbose, update_features, result_file, init_sp_quadrant_list_only_once, temperature, deterministic_policy, replicates, max_workers) 174 env_list.append(env_rep) 176 # load policy --> 177 policy = load_policy_empirical( 178 obsMode=obsMode, 179 trained_model=trained_model, 180 n_NN_nodes=n_nodes, 181 temperature=temperature, 182 num_output=env.bioDivGrid._n_pus, 183 ) 185 evolutionRunner = EvolutionPredictEmpirical(update_features=update_features, 186 deterministic_policy=deterministic_policy) 188 env_list = launch_runner(env_list, policy, evolutionRunner, max_workers)

File ~/Desktop/01_PhD/05_First_DL_Modelling/07_OH2022/captain-project-main/captain/algorithms/empirical_env_setup.py:116, in load_policy_empirical(obsMode, trained_model, n_NN_nodes, temperature, observe_error, sp_threshold_feature_extraction, num_output) 105 def load_policy_empirical( 106 obsMode=1, 107 trained_model=None, (...) 114 115 # load trained model --> 116 head = next(open(trained_model)).split() 117 loaded_ws = np.loadtxt(trained_model, skiprows=1) 118 selected_epoch = -1

FileNotFoundError: [Errno 2] No such file or directory: 'trained_models/full_monitor_protect_at_once_d4_n8-0.log'

Do you know what this is for? Thank you for your reply !

yokotsuno12 commented 1 year ago

We fixed this non-issue with a path name change. Sorry for bothering you!

dsilvestro commented 1 year ago

Pre-trained models under different settings can be downloaded here

yokotsuno12 commented 1 year ago

I'm so sorry, we had a misunderstanding with my team mate, we actually didn't solve it... Thank you for replying to us.

nicolas-geysse commented 1 year ago

Pre-trained models under different settings can be downloaded here

Hey, sorry, it seems the file can't be downloaded :(

dsilvestro commented 1 year ago

sorry - try this link