atom icon indicating copy to clipboard operation
atom copied to clipboard

Batch execution listing experiment folders wrongly

Open brunofavs opened this issue 9 months ago • 2 comments

This line :

https://github.com/lardemua/atom/blob/6d2230d85eaa4a2075619a0c91164efdbec63a25/atom_batch_execution/scripts/process_results#L98-L101

It's not doing what it's supposed to be doing.



['results/nig_0.1-ntfv_0.25_run001_fold001',
'results/nig_0.1-ntfv_0.25_run001_fold002',
'results/nig_0.1-ntfv_0.25_run001_fold003',
'results/nig_0.1-ntfv_0.25_run001_fold004',
'results/nig_0.1-ntfv_0.25_run001_fold005',
'results/nig_0.1-ntfv_0.25_run002_fold001',
'results/nig_0.1-ntfv_0.25_run002_fold002',
'results/nig_0.1-ntfv_0.25_run002_fold003',
'results/nig_0.1-ntfv_0.25_run002_fold004',
'results/nig_0.1-ntfv_0.25_run002_fold005',
'results/nig_0.1-ntfv_0.25_run003_fold001',
'results/nig_0.1-ntfv_0.25_run003_fold002',
'results/nig_0.1-ntfv_0.25_run003_fold003',
'results/nig_0.1-ntfv_0.25_run003_fold004',
'results/nig_0.1-ntfv_0.25_run003_fold005']
results/nig_0.1-ntfv_0.25_run001_fold001


['results/nig_0.15-ntfv_0.15_run001_fold001',
'results/nig_0.15-ntfv_0.15_run001_fold002',
'results/nig_0.15-ntfv_0.15_run001_fold003',
'results/nig_0.15-ntfv_0.15_run001_fold004',
'results/nig_0.15-ntfv_0.15_run001_fold005',
'results/nig_0.15-ntfv_0.15_run002_fold001',
'results/nig_0.15-ntfv_0.15_run002_fold002',
'results/nig_0.15-ntfv_0.15_run002_fold003',
'results/nig_0.15-ntfv_0.15_run002_fold004',
'results/nig_0.15-ntfv_0.15_run002_fold005',
'results/nig_0.15-ntfv_0.15_run003_fold001',
'results/nig_0.15-ntfv_0.15_run003_fold002',
'results/nig_0.15-ntfv_0.15_run003_fold003',
'results/nig_0.15-ntfv_0.15_run003_fold004',
'results/nig_0.15-ntfv_0.15_run003_fold005',
'results/nig_0.15-ntfv_0.1_run001_fold001',
'results/nig_0.15-ntfv_0.1_run001_fold002',
'results/nig_0.15-ntfv_0.1_run001_fold003',
'results/nig_0.15-ntfv_0.1_run001_fold004',
'results/nig_0.15-ntfv_0.1_run001_fold005',
'results/nig_0.15-ntfv_0.1_run002_fold001',
'results/nig_0.15-ntfv_0.1_run002_fold002',
'results/nig_0.15-ntfv_0.1_run002_fold003',
'results/nig_0.15-ntfv_0.1_run002_fold004',
'results/nig_0.15-ntfv_0.1_run002_fold005',
'results/nig_0.15-ntfv_0.1_run003_fold001',
'results/nig_0.15-ntfv_0.1_run003_fold002',
'results/nig_0.15-ntfv_0.1_run003_fold003',
'results/nig_0.15-ntfv_0.1_run003_fold004',
'results/nig_0.15-ntfv_0.1_run003_fold005']

This is the print of the said line. When grepping the nig 0.15 ntfv 0.15 experiment it grabs wrong things with it as well.

brunofavs avatar May 10 '24 02:05 brunofavs

Seems to be "fixed".

What was happening is that glob.glob(args['results_folder'] + '/' + experiment + '*') with the nig_0.15-ntfv_0.1 experiment was also grepping the nig_0.15-ntfv_0.15.

Adding a "_" should fixed all cases since AS LONG AS we make sure to not use underscores in the experiment names.

A experience named nig_0.15-ntfv_0.1_banana would break in the same way it was breaking now.

I'm not the biggest fan of this solution because it's prone to breaking sneakily. There's not a lot we can do. One will always be a substring of the other.

What we can do is rewrite any underscores in the naming to hyphens in the batch execution. Like a safeguard, leaving underscore as a escape character. That or substitute the underscore in _fold_run for a very unusual escape character, like «fold«run or something, albeit I agree it would look kinda funky.

What is your opinion on this @miguelriemoliveira ?

brunofavs avatar May 10 '24 02:05 brunofavs

That or a way more complicated filtering mechanism, considering now the experience settings are also on a yaml file for each folder, which is more bulletproof than having the settings encoded in the name.

brunofavs avatar May 10 '24 03:05 brunofavs