Instructions to use msherry/pakflood-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use msherry/pakflood-lora with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
Download code/configs/baseline_frozen.yaml from msherry/pakflood-lora: direct link, hf CLI and curl.
- Browser
- Download file 3.44 kB
-
https://huggingface.co/msherry/pakflood-lora/resolve/main/code/configs/baseline_frozen.yaml
- Command line
-
hf download hf://msherry/pakflood-lora/code/configs/baseline_frozen.yaml
-
curl -L -o baseline_frozen.yaml https://huggingface.co/msherry/pakflood-lora/resolve/main/code/configs/baseline_frozen.yaml
3.44 kB
| seed_everything: 0 | |
| trainer: | |
| accelerator: auto | |
| strategy: auto | |
| devices: auto | |
| num_nodes: 1 | |
| precision: bf16-mixed | |
| logger: | |
| class_path: TensorBoardLogger | |
| init_args: | |
| save_dir: workdir/pakflood | |
| name: baseline_frozen | |
| version: v1 | |
| callbacks: | |
| - class_path: lightning.pytorch.callbacks.EarlyStopping | |
| init_args: | |
| monitor: val/IoU_flood | |
| mode: max | |
| patience: 5 | |
| strict: true | |
| verbose: true | |
| - class_path: lightning.pytorch.callbacks.TQDMProgressBar | |
| init_args: | |
| refresh_rate: 100 | |
| - class_path: LearningRateMonitor | |
| init_args: | |
| logging_interval: epoch | |
| - class_path: terratorch.cli_tools.StateDictAwareModelCheckpoint | |
| init_args: | |
| filename: best | |
| monitor: val/IoU_flood | |
| mode: max | |
| save_top_k: 1 | |
| save_last: true | |
| - class_path: terratorch.cli_tools.StateDictAwareModelCheckpoint | |
| init_args: | |
| filename: best_state_dict | |
| monitor: val/IoU_flood | |
| mode: max | |
| save_top_k: 1 | |
| save_last: false | |
| save_weights_only: true | |
| max_epochs: 10 | |
| check_val_every_n_epoch: 1 | |
| log_every_n_steps: 100 | |
| enable_checkpointing: true | |
| default_root_dir: workdir/pakflood/baseline_frozen/v1/ | |
| data: | |
| class_path: geoid_flood.datamodules.geoid.GEOIDFloodDataModule | |
| init_args: | |
| root: data/geoid-flood | |
| batch_size: 32 | |
| num_workers: 8 | |
| train_transform: | |
| - class_path: albumentations.D4 | |
| - class_path: albumentations.pytorch.ToTensorV2 | |
| val_transform: | |
| - class_path: albumentations.pytorch.ToTensorV2 | |
| test_transform: | |
| - class_path: albumentations.pytorch.ToTensorV2 | |
| predict_transform: | |
| - class_path: albumentations.pytorch.ToTensorV2 | |
| drop_last: true | |
| no_data_replace: 0.0 | |
| no_label_replace: 255 | |
| modalities: | |
| - s1grd | |
| image_scope: | |
| - pre | |
| - post | |
| output_bands: | |
| - VV | |
| - VH | |
| means: | |
| VV: -12.599 | |
| VH: -20.293 | |
| stds: | |
| VV: 5.195 | |
| VH: 5.89 | |
| metadata_filename: data_tiles_s256_st128.csv | |
| max_cloud_cover: 1 | |
| min_positive: 0.0 | |
| min_valid_proportion: 0.01 | |
| paired: true | |
| fuse_paired: true | |
| model: | |
| class_path: pakflood.tasks.FloodCEDiceTask | |
| init_args: | |
| model_factory: EncoderDecoderFactory | |
| model_args: | |
| backbone: terratorch_terramind_v1_base | |
| backbone_pretrained: true | |
| backbone_in_chans: 4 | |
| backbone_modalities: | |
| - sen1grd | |
| backbone_bands: | |
| sen1grd: | |
| - VV | |
| - VH | |
| - VV | |
| - VH | |
| necks: | |
| - name: SelectIndices | |
| indices: | |
| - 2 | |
| - 5 | |
| - 8 | |
| - 11 | |
| - name: ReshapeTokensToImage | |
| remove_cls_token: false | |
| - name: LearnedInterpolateToPyramidal | |
| decoder: UNetDecoder | |
| decoder_channels: | |
| - 512 | |
| - 256 | |
| - 128 | |
| - 64 | |
| num_classes: 3 | |
| head_dropout: 0.3 | |
| loss: ce | |
| class_names: | |
| - background | |
| - permanent_water | |
| - flood | |
| tiled_inference_parameters: | |
| h_crop: 256 | |
| h_stride: 128 | |
| w_crop: 256 | |
| w_stride: 128 | |
| average_patches: true | |
| verbose: true | |
| ignore_index: 255 | |
| freeze_backbone: true | |
| freeze_decoder: false | |
| plot_on_val: true | |
| tiled_inference_on_validation: false | |
| tiled_inference_on_testing: false | |
| optimizer: AdamW | |
| lr: 5.0e-06 | |
| optimizer_hparams: | |
| weight_decay: 0.1 | |
| scheduler: CosineAnnealingLR | |
| scheduler_hparams: | |
| T_max: 10 | |
| eta_min: 1e-6 | |
| last_epoch: -1 | |