Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hardcoded paths in example configs #455

Closed
daniszw opened this issue Feb 24, 2025 · 2 comments · Fixed by #458
Closed

Hardcoded paths in example configs #455

daniszw opened this issue Feb 24, 2025 · 2 comments · Fixed by #458
Assignees
Labels

Comments

@daniszw
Copy link
Collaborator

daniszw commented Feb 24, 2025

We still have some hardcoded paths in example configs...

save_dir: /dccstor/geofm-finetuning/carlosgomes/torchgeo_floods

default_root_dir: /dccstor/geofm-finetuning/carlosgomes/torchgeo_floods

train_data_root: /dccstor/geofm-finetuning/flood_mapping/sen1floods11/data/data/flood_events/HandLabeled/S2Hand/
train_label_data_root: /dccstor/geofm-finetuning/flood_mapping/sen1floods11/data/data/flood_events/HandLabeled/LabelHand
val_data_root: /dccstor/geofm-finetuning/flood_mapping/sen1floods11/data/data/flood_events/HandLabeled/S2Hand/
val_label_data_root: /dccstor/geofm-finetuning/flood_mapping/sen1floods11/data/data/flood_events/HandLabeled/LabelHand
test_data_root: /dccstor/geofm-finetuning/flood_mapping/sen1floods11/data/data/flood_events/HandLabeled/S2Hand/
test_label_data_root: /dccstor/geofm-finetuning/flood_mapping/sen1floods11/data/data/flood_events/HandLabeled/LabelHand
# these must be obtained by running terratorch/examples/scripts/convert_sen1floods11_splits.py on the original split csv files
train_split: /dccstor/geofm-finetuning/flood_mapping/sen1floods11/splits/splits/flood_handlabeled/flood_train_data_S2.txt
test_split: /dccstor/geofm-finetuning/flood_mapping/sen1floods11/splits/splits/flood_handlabeled/flood_test_data_S2.txt
val_split: /dccstor/geofm-finetuning/flood_mapping/sen1floods11/splits/splits/flood_handlabeled/flood_valid_data_S2.txt


The same pattern can be seen in examples dofa_sen1floods11_uper.yaml and satlas_sen1floods11_uper.yaml


In these other examples we also have hardcoded paths:

data_path_surface: /home/jalmeida/Projetos/terratorch/examples/scripts/merra-2/
data_path_vertical: /home/jalmeida/Projetos/terratorch/examples/scripts/merra-2/
climatology_path_surface: /home/jalmeida/Projetos/terratorch/examples/scripts/climatology/
climatology_path_vertical: /home/jalmeida/Projetos/terratorch/examples/scripts/climatology/

input_scalers_surface_path: /home/jalmeida/Projetos/terratorch/examples/scripts/climatology/musigma_surface.nc
input_scalers_vertical_path: /home/jalmeida/Projetos/terratorch/examples/scripts/climatology/musigma_vertical.nc
output_scalers_surface_path: /home/jalmeida/Projetos/terratorch/examples/scripts/climatology/anomaly_variance_surface.nc
output_scalers_vertical_path: /home/jalmeida/Projetos/terratorch/examples/scripts/climatology/anomaly_variance_vertical.nc

data_path_surface: /home/jalmeida/Projetos/terratorch/examples/scripts/merra-2/
data_path_vertical: /home/jalmeida/Projetos/terratorch/examples/scripts/merra-2/
climatology_path_surface: /home/jalmeida/Projetos/terratorch/examples/scripts/climatology/
climatology_path_vertical: /home/jalmeida/Projetos/terratorch/examples/scripts/climatology/

train_data_path: /dccstor/terratorch/users/rkie/gitco/terratorch
valid_data_path: /dccstor/terratorch/users/rkie/gitco/terratorch

@Joao-L-S-Almeida Joao-L-S-Almeida self-assigned this Feb 25, 2025
@Joao-L-S-Almeida Joao-L-S-Almeida linked a pull request Feb 25, 2025 that will close this issue
@Joao-L-S-Almeida Joao-L-S-Almeida removed a link to a pull request Feb 25, 2025
@Joao-L-S-Almeida Joao-L-S-Almeida linked a pull request Feb 25, 2025 that will close this issue
@Joao-L-S-Almeida
Copy link
Member

@daniszw I replaced it with generic paths in #458.

@daniszw
Copy link
Collaborator Author

daniszw commented Feb 28, 2025

Thanks! I would also suggest having a similar pattern of paths in all examples, and remove any non-english words from paths (like "Projetos"). For example, many configs have something like:
<your_path_here> or <sen1floods11_root>/v1.1/data/flood_events/HandLabeled/S2Hand/; I would use something similar to keep consistency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants