Skip to content

Commit

Permalink
small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
misko committed Dec 29, 2024
1 parent b56750f commit e48c5f4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions spf/scripts/make_splits.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

splits=/mnt/md2/splits/
name=dec26
name=dec28
n=90 # 90% for train

ls /mnt/ssd/2d_wallarray_v2_data/*/*.zarr -d | shuf > ${splits}/${name}_full.txt
Expand All @@ -15,5 +15,5 @@ tail -n $(( total - cutoff )) "${splits}/${name}_notcircle.txt" >> ${splits}/${n

# add in rover to validation
ls /mnt/ssd/rovers/merged/nov*.zarr -d >> ${splits}/${name}_train.txt
ls /mnt/ssd/rovers/merged/dec*.zarr -d | grep -v dec26 >> ${splits}/${name}_train.txt
ls /mnt/ssd/rovers/merged/dec*.zarr -d | grep dec26 >> ${splits}/${name}_val.txt
ls /mnt/ssd/rovers/merged/dec*.zarr -d | grep -v dec28_mission[34] >> ${splits}/${name}_train.txt
ls /mnt/ssd/rovers/merged/dec*.zarr -d | grep dec28_mission[34] >> ${splits}/${name}_val.txt
3 changes: 1 addition & 2 deletions spf/scripts/train_single_point.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,14 +248,13 @@ def load_train_dataset(prefix):
# create alternate val_ds
alternate_val_ds_lists = {}
for ds in val_datasets:
key = f"{ds.get_collector_identifier()}:{ds.get_wavelength_identifier()}:{ds.yaml_config['routine']}"
key = f"{ds.get_collector_identifier()}:{ds.get_wavelength_identifier()}:rf_{ds.rf_bandwidths[0]:0.3e}:{ds.yaml_config['routine']}"
if key not in alternate_val_ds_lists:
alternate_val_ds_lists[key] = []
alternate_val_ds_lists[key].append(ds)
alternate_val_ds = {}
for key, ds_list in alternate_val_ds_lists.items():
alternate_val_ds[key] = torch.utils.data.ConcatDataset(ds_list)

# if we train_on_val just take everything
if not datasets_config["train_on_val"]:
val_idxs = list(range(len(val_ds)))
Expand Down

0 comments on commit e48c5f4

Please sign in to comment.