From 65f36b5b2665abf0e892f81a11efd663c046def8 Mon Sep 17 00:00:00 2001 From: ryanp Date: Tue, 12 Aug 2025 12:08:20 -0700 Subject: [PATCH 01/16] Start task config work --- .gitignore | 1 + .../2025_08_12_embeds/OUT_classify.yaml | 1127 +++++++++++++++++ .../configs/2025_08_12_embeds/base.yaml | 58 + .../configs/2025_08_12_embeds/classify.yaml | 42 + .../scripts/make_task_embeds.py | 392 ++++++ .../2025_07_joint_finetune/scripts/run.py | 6 + rslp/helios/model.py | 226 +++- tests/integration/helios/test_task_embeds.py | 152 +++ 8 files changed, 2003 insertions(+), 1 deletion(-) create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/OUT_classify.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/base.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/classify.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/scripts/make_task_embeds.py create mode 100644 tests/integration/helios/test_task_embeds.py diff --git a/.gitignore b/.gitignore index daafefc2..ab6a136b 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ rslp/crop_type_mapping/csv/ rslp/crop_type_mapping/geoparquets/ rslp/mangrove/csv/ log*.txt +*.egg-info # for local finetuning runs /config.yaml diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/OUT_classify.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/OUT_classify.yaml new file mode 100644 index 00000000..22cf9504 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/OUT_classify.yaml @@ -0,0 +1,1127 @@ +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + batch_sizes: + crop_type_classification: 32 + cropland_classification: 16 + vessel_classification: 16 + data_modules: + crop_type_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 32 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: [] + sentinel2_1: [] + sentinel2_10: [] + sentinel2_11: [] + sentinel2_2: [] + sentinel2_3: [] + sentinel2_4: [] + sentinel2_5: [] + sentinel2_6: [] + sentinel2_7: [] + sentinel2_8: [] + sentinel2_9: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + sentinel1_0: [] + sentinel1_1: [] + sentinel1_10: [] + sentinel1_11: [] + sentinel1_2: [] + sentinel1_3: [] + sentinel1_4: [] + sentinel1_5: [] + sentinel1_6: [] + sentinel1_7: [] + sentinel1_8: [] + sentinel1_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.pad.Pad + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + mode: center + size: 8 + inputs: + label: + data_type: vector + is_target: true + layers: + - label + sentinel1_0: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + sentinel1_1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + sentinel1_10: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.10 + passthrough: true + sentinel1_11: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.11 + passthrough: true + sentinel1_2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + sentinel1_3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + sentinel1_4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.4 + passthrough: true + sentinel1_5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.5 + passthrough: true + sentinel1_6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.6 + passthrough: true + sentinel1_7: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.7 + passthrough: true + sentinel1_8: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.8 + passthrough: true + sentinel1_9: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.9 + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/crop/kenya_nandi/20250625 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + crop_type_classification: + label: targets + tasks: + crop_type_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Coffee + - Trees + - Grassland + - Maize + - Sugarcane + - Tea + - Water + - Built-up + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + test_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: val + train_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: train + val_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: val + cropland_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 16 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: [] + sentinel2_1: [] + sentinel2_10: [] + sentinel2_11: [] + sentinel2_2: [] + sentinel2_3: [] + sentinel2_4: [] + sentinel2_5: [] + sentinel2_6: [] + sentinel2_7: [] + sentinel2_8: [] + sentinel2_9: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + sentinel1_0: [] + sentinel1_1: [] + sentinel1_10: [] + sentinel1_11: [] + sentinel1_2: [] + sentinel1_3: [] + sentinel1_4: [] + sentinel1_5: [] + sentinel1_6: [] + sentinel1_7: [] + sentinel1_8: [] + sentinel1_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.pad.Pad + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + mode: center + size: 8 + inputs: + label: + data_type: vector + is_target: true + layers: + - label + sentinel1_0: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1 + passthrough: true + sentinel1_1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.1 + passthrough: true + sentinel1_10: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.10 + passthrough: true + sentinel1_11: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.11 + passthrough: true + sentinel1_2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.2 + passthrough: true + sentinel1_3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.3 + passthrough: true + sentinel1_4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.4 + passthrough: true + sentinel1_5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.5 + passthrough: true + sentinel1_6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.6 + passthrough: true + sentinel1_7: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.7 + passthrough: true + sentinel1_8: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.8 + passthrough: true + sentinel1_9: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.9 + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/crop/worldcereal_cropland/20250626 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + cropland_classification: + label: targets + tasks: + cropland_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Cropland + - Non-Cropland + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + test_config: + groups: + - h3_sample100_66K + tags: + split: val + train_config: + groups: + - h3_sample100_66K + tags: + split: train + val_config: + groups: + - h3_sample100_66K + tags: + split: val + vessel_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 16 + default_config: + transforms: + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + label: + data_type: vector + is_target: true + layers: + - label + landsat: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/landsat_vessel_detection/classifier/dataset_20250624 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + vessel_classification: + label: targets + tasks: + vessel_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + allow_invalid: true + classes: + - correct + - incorrect + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: label + skip_unknown_categories: true + test_config: + groups: + - phase2a_completed + tags: + split: val + train_config: + groups: + - selected_copy + - phase2a_completed + - phase3a_selected + tags: + split: train + val_config: + groups: + - phase2a_completed + tags: + split: val + num_workers: 16 + refill_batches: true + sample_mode: random_cycle +model: + class_path: rslp.helios.lightning_module.MoELightningModule + init_args: + lr: 0.0001 + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + decoder_to_target: + ClassificationHead: + - vessel_classification + - crop_type_classification + - cropland_classification + decoders: + ClassificationHead: + - class_path: rslearn.models.pooling_decoder.PoolingDecoder + init_args: + in_channels: 768 + out_channels: 12 + - class_path: rslearn.train.tasks.classification.ClassificationHead + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + use_task_lora: true + selector: + - encoder + task_embed_opts: + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/2025_08_12_task_embeds.pt + type: precomputed + lazy_decode: true + task_label_offsets: + crop_type_classification: + num_outputs: 8 + offset: 2 + outputs_key: class + cropland_classification: + num_outputs: 2 + offset: 10 + outputs_key: class + vessel_classification: + num_outputs: 2 + offset: 0 + outputs_key: class + trunk: + class_path: rslearn.models.trunk.DecoderTrunk + init_args: + layers: + - class_path: rslearn.models.trunk.MoETransformer + init_args: + dim: 768 + expert_mult: 2 + n_heads: 12 + n_layers: 2 + num_experts: 8 + num_slots: 1 + task_embedding: + class_path: rslearn.models.task_embedding.TaskChannelEmbedding + init_args: + add_spatial_embed: true + encoder_embedding_size: 768 + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 100 + eta_min: 0 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + crop_type_classification: + label: targets + cropland_classification: + label: targets + vessel_classification: + label: targets + tasks: + crop_type_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Coffee + - Trees + - Grassland + - Maize + - Sugarcane + - Tea + - Water + - Built-up + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + cropland_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Cropland + - Non-Cropland + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + vessel_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + allow_invalid: true + classes: + - correct + - incorrect + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: label + skip_unknown_categories: true +rslp_experiment: placeholder +rslp_project: placeholder +trainer: + accumulate_grad_batches: 3 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: epoch + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + mode: min + monitor: val_loss + save_last: true + save_top_k: 1 + - class_path: rslearn.train.callbacks.freeze_unfreeze.FreezeUnfreeze + init_args: + module_selector: + - model + - encoder + - 0 + unfreeze_at_epoch: 20 + unfreeze_lr_factor: 10 + max_epochs: 200 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/base.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/base.yaml new file mode 100644 index 00000000..15a33d59 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/base.yaml @@ -0,0 +1,58 @@ +model: + class_path: rslp.helios.lightning_module.MoELightningModule + init_args: + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: "{CHECKPOINT_PATH}" + selector: ["encoder"] + forward_kwargs: + patch_size: {PATCH_SIZE} + model_overrides: + encoder_config: + use_task_lora: true + task_embed_opts: + type: "precomputed" + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/2025_08_12_task_embeds.pt + decoders: # Filled in by make_multidataset_config.py + lazy_decode: true + lr: 0.0001 + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 100 + eta_min: 0 + +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + sample_mode: random_cycle + refill_batches: true + num_workers: 16 + data_modules: # Filled in by make_multidataset_config.py + +trainer: + max_epochs: 200 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: "epoch" + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + save_top_k: 1 + save_last: true + monitor: val_loss + mode: min + - class_path: rslearn.train.callbacks.freeze_unfreeze.FreezeUnfreeze + init_args: + module_selector: ["model", "encoder", 0] + unfreeze_at_epoch: 20 + unfreeze_lr_factor: 10 + +rslp_project: placeholder +rslp_experiment: placeholder + +all_dataset_info_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v3_multitask/all_dataset_info.yaml \ No newline at end of file diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/classify.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/classify.yaml new file mode 100644 index 00000000..e28ec5b5 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/classify.yaml @@ -0,0 +1,42 @@ +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/OUT_classify.yaml + +dataset_cfgs: + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_classifier_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_nandi_crop_type/finetune_s1_s2_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_worldcereal_cropland/finetune_s1_s2_cosinelr.yaml + +substitutions: + patch_size: 8 + encoder_embedding_size: 768 + helios_checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + +global_overrides: + model: + init_args: + model: + init_args: + trunk: + class_path: rslearn.models.trunk.DecoderTrunk + init_args: + task_embedding: + class_path: rslearn.models.task_embedding.TaskChannelEmbedding + init_args: + encoder_embedding_size: 768 + add_spatial_embed: true + layers: + - class_path: rslearn.models.trunk.MoETransformer + init_args: + dim: 768 + n_layers: 2 + n_heads: 12 + num_experts: 8 + num_slots: 1 + expert_mult: 2 + trainer: + accumulate_grad_batches: 3 + +merge_options: + merge_heads: true + merge_task_labels: true + same_label_groups: diff --git a/one_off_projects/2025_07_joint_finetune/scripts/make_task_embeds.py b/one_off_projects/2025_07_joint_finetune/scripts/make_task_embeds.py new file mode 100644 index 00000000..be0c8ac6 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/scripts/make_task_embeds.py @@ -0,0 +1,392 @@ +"""Build compact task embeddings from rslearn configs. + +Mean similarity with anchor subtraction is 0.48 (including self-self similarities), +which is much better than the 0.73 without anchor subtraction. + +If you add the qwen embedding templating plus the anchor subtraction, the mean +similarity between embeddings is 0.36, but similar tasks are still high. + +If you don't truncate, then you need to use a projection layer in the helios encoder +to get the dimensions down to 768. With MLR, qwen's embeddings are pretty even so. + +Current commands +================ +python make_task_embeds.py --anchor --instruct --truncate 768 +""" +import os +import hashlib +import argparse +import json +from pathlib import Path +from typing import Any, Dict, List, Tuple, Set, Optional + +import torch +import torch.nn.functional as F +import yaml +from transformers import AutoTokenizer, AutoModel +from rslp.helios.model import deep_merge + +KEEP_INPUT_FAMILIES = ("sentinel1", "sentinel2", "landsat", "srtm") +DROP_INPUTS = {"mask", "image", "targets", "label"} +DEFAULT_INSTRUCT_PROMPT = """ +You are creating a similarity embedding for remote-sensing tasks. +Focus on the *content*, not formatting. Down-weight boilerplate and shared structure. + +Emphasize: +- Task TYPE (classification/detection/segmentation/regression and any special variants) +- Target schema (property_name, classes/labels, numeric target meaning) +- Sensing MODALITIES actually used (sentinel1, sentinel2, landsat) +- Domain/topic keywords (e.g., vessels, cropland, wind turbines, solar farms) +- Geographic or dataset hints (if present) + +De-emphasize: +- Generic YAML keys, ordering, punctuation +- Training/runtime settings (batch size, paths, workers, dtypes, masks) +- Repeated time slices or band indices (e.g., sentinel2_0..11) +""" + + +# ---------------- File gathering ---------------- + +def load_yaml(path: str) -> Dict[str, Any]: + with open(path, "r") as f: + return yaml.safe_load(f) or {} + +def gather_task_files(base_dir: str, task: str) -> List[str]: + """ + Return sorted YAML files under {base_dir}/{task} excluding *soup.yaml. + Merges in filename order for determinism. + """ + d = Path(base_dir) / task + if not d.is_dir(): + raise FileNotFoundError(f"Task directory not found: {d}") + files = [str(p) for p in sorted(d.glob("*.yaml")) if not str(p).endswith("soup.yaml")] + if not files: + raise FileNotFoundError(f"No YAML configs (excluding *soup.yaml) in {d}") + return files + + +# ---------------- Compact extraction & summary ---------------- + +def _sorted_items(d: Dict[str, Any]) -> List[Tuple[str, Any]]: + return sorted((d or {}).items(), key=lambda kv: kv[0]) + +def _family_from_key(k: str) -> Optional[str]: + k = k.lower() + if k in DROP_INPUTS: + return None + # map many spellings to canonical families + if k.startswith(("s1", "sentinel1")): + return "sentinel1" + if k.startswith(("s2", "sentinel2")): + return "sentinel2" + if k.startswith("landsat"): + return "landsat" + if k.startswith("srtm"): + return "srtm" + return None # ignore everything else + +def _short_task_type(class_path: Optional[str]) -> Optional[str]: + if not class_path: + return None + tail = class_path.split(".")[-1] # e.g., ClassificationTask + if tail.endswith("Task"): + tail = tail[:-4] + return tail.lower() # classification, detection, segmentation, regression, etc. + +def extract_task_core(cfg: Dict[str, Any]) -> Dict[str, Any]: + """ + Keep only: collapsed input families, and task definition (type, property_name, classes). + """ + data = (cfg.get("data") or {}) + init = (data.get("init_args") or {}) + keep: Dict[str, Any] = {} + + # Collapse inputs to canonical families + inputs = (init.get("inputs") or {}) + fams: Set[str] = set() + for key in inputs.keys(): + fam = _family_from_key(str(key)) + if fam and any(fam == f for f in KEEP_INPUT_FAMILIES): + fams.add(fam) + keep["inputs_families"] = sorted(fams) + + # Task(s) + task = (init.get("task") or {}) + class_path = task.get("class_path", "") + tinit = (task.get("init_args") or {}) + + def _salient(sub_def: Dict[str, Any]) -> Dict[str, Any]: + out: Dict[str, Any] = {} + tp = _short_task_type(sub_def.get("class_path")) + if tp: + out["type"] = tp + ia = sub_def.get("init_args") or {} + if "property_name" in ia: + out["property_name"] = ia["property_name"] + if isinstance(ia.get("classes"), list): + out["classes"] = ia["classes"] + return out + + if "MultiTask" in class_path or class_path.endswith("MultiTask"): + tasks = (tinit.get("tasks") or {}) + keep["tasks"] = {name: _salient(defn or {}) for name, defn in _sorted_items(tasks)} + # input_mapping often repeats {'targets': ...}; skip unless special cases needed + else: + single = {"class_path": class_path, "init_args": tinit} + keep["task"] = _salient(single) + + return keep + +def build_task_summary(task_name: str, cfg: Dict[str, Any]) -> str: + """ + Compact representation: + task= + inputs= # subset of sentinel1,sentinel2,landsat,srtm + For multitask: one block per subtask with short type & classes. + For single task: type/classes inline. + """ + core = extract_task_core(cfg) + lines: List[str] = [f"task={task_name}"] + + fams = core.get("inputs_families") or [] + if fams: + lines.append("inputs=" + ",".join(fams)) + + if "tasks" in core: + for sub_name in sorted(core["tasks"].keys()): + sub = core["tasks"][sub_name] or {} + lines.append(f"subtask:{sub_name}") + if sub.get("type"): + lines.append(f" type={sub['type']}") + if sub.get("property_name"): + lines.append(f" property_name={sub['property_name']}") + if sub.get("classes"): + lines.append(" classes=" + ",".join(map(str, sub["classes"]))) + else: + st = core.get("task", {}) + if st.get("type"): + lines.append(f"type={st['type']}") + if st.get("property_name"): + lines.append(f"property_name={st['property_name']}") + if st.get("classes"): + lines.append("classes=" + ",".join(map(str, st["classes"]))) + + return "\n".join(lines) + +def extract_decoder_primary_key(cfg: Dict[str, Any]) -> Optional[str]: + """ + Scrape model.init_args.model.init_args.decoders and return the FIRST key. + """ + try: + model = (cfg.get("model") or {}) + m_i = (model.get("init_args") or {}) + inner = (m_i.get("model") or {}) + inner_i = (inner.get("init_args") or {}) + decs = (inner_i.get("decoders") or {}) + for k in decs.keys(): + return k + return None + except Exception: + return None + + +# ---------------- Embedding helpers ---------------- + +def get_detailed_instruct(task_description: str, query: str) -> str: + """Instruction template for qwen embedding models.""" + return f"Instruct: {task_description}\nQuery:{query}" + +def load_embedder(model_name: str, device: Optional[str]): + tok = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True) + mdl = AutoModel.from_pretrained(model_name, trust_remote_code=True) + mdl.eval() + dev = device or ("cuda" if torch.cuda.is_available() else "cpu") + mdl.to(dev) + return tok, mdl, dev + +@torch.inference_mode() +def embed_texts_with( + tokenizer, model, device: str, + texts: List[str], truncate: int | None = None, max_len: int = 8192 +) -> torch.Tensor: + enc = tokenizer(texts, padding=True, truncation=True, max_length=max_len, return_tensors="pt") + enc = {k: v.to(device) for k, v in enc.items()} + out = model(**enc) + + hidden = out.last_hidden_state # [B, T, H] + mask = enc["attention_mask"].unsqueeze(-1) # [B, T, 1] + if truncate is not None: + hidden = hidden[..., :truncate] + + emb = (hidden * mask).sum(1) / mask.sum(1).clamp(min=1) + emb = F.normalize(emb, p=2, dim=-1) + + return emb.detach().cpu() # [N, D] + + +# ---------------- Anchor summary ---------------- + +def build_anchor_summary() -> str: + """ + Build a boilerplate placeholder config and summarize it using the same code path. + This captures template structure so its embedding can be subtracted. + """ + dummy_cfg = { + "data": { + "init_args": { + "inputs": { + "sentinel1": {}, + "sentinel2": {}, + "landsat": {}, + "srtm": {}, + }, + "task": { + "class_path": "rslearn.train.tasks.task.TaskTask", + "init_args": { + "property_name": "category", + "classes": ["A", "B"] + } + } + } + } + } + return build_task_summary("placeholder_task", dummy_cfg) + + +# ---------------- CLI ---------------- + +def parse_args() -> argparse.Namespace: + p = argparse.ArgumentParser(description="Build compact task embeddings from rslearn configs.") + p.add_argument( + "--base-dir", + help="Base dir containing per-task subdirs.", + default="/weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs" + ) + p.add_argument( + "--out-path", + default="/weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/2025_08_12_task_embeds.pt", + help="Path to save torch dict {task_key: tensor[D]}." + ) + p.add_argument( + "--dump-texts", + default="/weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/2025_08_12_task_texts.jsonl", + help="Optional JSONL for {task_dir, task_key, text}." + ) + p.add_argument("--tasks", nargs="*", help="Task dir names (none = auto: subdirs starting with v2_*)") + p.add_argument("--model", default="Qwen/Qwen3-Embedding-8B", help="HF embedding model to use.") + p.add_argument("--device", default=None, help="Device override, e.g. 'cuda' or 'cpu'.") + p.add_argument("--anchor", action="store_true", help="Enable anchor subtraction.") + p.add_argument("--instruct", action="store_true", help="Use instruct template for embedding models.") + p.add_argument( + "--prompt", + default=DEFAULT_INSTRUCT_PROMPT, + help="Prompt to add to the task description if instruct is enabled." + ) + p.add_argument("--truncate", type=int, default=None, help="Truncate task embeddings to this dimension.") + return p.parse_args() + + +def main() -> None: + args = parse_args() + if not args.tasks: + args.tasks = [name for name in os.listdir(args.base_dir) if name.startswith("v2_")] + + summaries: List[str] = [] + keys: List[str] = [] + merged_cfgs: List[Dict[str, Any]] = [] + + for task_dir in args.tasks: + merged: Dict[str, Any] = {} + for p in gather_task_files(args.base_dir, task_dir): + merged = deep_merge(merged, load_yaml(p)) + merged_cfgs.append(merged) + + summaries.append(build_task_summary(task_dir, merged)) + + key = extract_decoder_primary_key(merged) + if not key: + print(f"WARNING: Could not find decoders key for {task_dir}; using directory name.") + key = task_dir + keys.append(key) + + print("=== Configuration ===") + print(f"Model: {args.model}") + print(f"Base dir: {args.base_dir}") + print("Task dirs:") + for task_dir in args.tasks: + print(f" - {task_dir}") + print() + + # Load model once + tokenizer, model, device = load_embedder(args.model, args.device) + if args.instruct: + print(f"\n[Instruct] Using prompt: {args.prompt}") + + # Build anchor embedding from placeholder summary (same summarizer path) + anchor_emb = None + if args.anchor: + anchor_text = build_anchor_summary() + fmt_anchor_text = anchor_text + if args.instruct: + fmt_anchor_text = get_detailed_instruct(anchor_text, args.prompt) + anchor_emb = embed_texts_with( + tokenizer, model, device, [fmt_anchor_text], args.truncate + )[0] # [D] + print("\n[Anchor] Using placeholder summary for anchor subtraction:\n" + anchor_text + "\n") + + # Embed summaries + if args.instruct: + fmt_summaries = [get_detailed_instruct(summary, args.prompt) for summary in summaries] + else: + fmt_summaries = summaries + embs = embed_texts_with(tokenizer, model, device, fmt_summaries, args.truncate) + + # Subtract anchor (if enabled), then renormalize + if anchor_emb is not None: + embs = F.normalize(embs - anchor_emb.unsqueeze(0), p=2, dim=-1) + + # Save dict {task_key: tensor[D]} + result: Dict[str, torch.Tensor] = {k: e.detach().cpu() for k, e in zip(keys, embs)} + + # Add hash of current code for future checking + result["code_hash"] = hashlib.sha256(open(__file__, "rb").read()).hexdigest() + torch.save(result, args.out_path) + + # Optional: dump texts + if args.dump_texts: + with open(args.dump_texts, "w") as f: + for task_dir, key, text in zip(args.tasks, keys, summaries): + f.write(json.dumps({"task_dir": task_dir, "task_key": key, "text": text}) + "\n") + f.write(json.dumps({"code_hash": result["code_hash"]}) + "\n") + if args.anchor: + f.write(json.dumps({"anchor_text": anchor_text}) + "\n") + if args.instruct: + f.write(json.dumps({"prompt": args.prompt}) + "\n") + + # Pretty print keys + result.pop("code_hash") + sorted_keys = sorted(result.keys()) + print("\n=== Saved task keys ===") + for k in sorted_keys: + print(" -", k) + + # Cosine similarity matrix + mat = torch.stack([result[k] for k in sorted_keys], dim=0) # [N, D] + sim = F.cosine_similarity(mat.unsqueeze(1), mat.unsqueeze(0), dim=-1) # [N, N] + + print("\n=== Cosine similarity matrix ===") + header = ["{:>15}".format(k[:13]) for k in sorted_keys] + print("{:>15} {}".format("", " ".join(header))) + for i, k in enumerate(sorted_keys): + row_vals = " ".join(f"{v:>13.3f}" for v in sim[i]) + print("{:>15} {}".format(k[:13], row_vals)) + print("\nMean similarity:", round(sim.mean().item(), 3)) + + print(f"\nSaved dict with {len(result)} entries to {args.out_path}") + if args.dump_texts: + print(f"Wrote plaintext rows to {args.dump_texts}") + + +if __name__ == "__main__": + main() diff --git a/one_off_projects/2025_07_joint_finetune/scripts/run.py b/one_off_projects/2025_07_joint_finetune/scripts/run.py index fed3df2e..0c33b25b 100644 --- a/one_off_projects/2025_07_joint_finetune/scripts/run.py +++ b/one_off_projects/2025_07_joint_finetune/scripts/run.py @@ -47,6 +47,12 @@ ] for cfg in cfgs: cmd.append("--config_paths+=" + cfg) +elif args.cfg == "lora": + args.cfg = "/weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/OUT_classify.yaml" + args.exp_id = "debug_task_lora_classify" + cmd.append("--config_paths+=" + args.cfg) + cmd.append("--allow_missing_weights") + cmd.append("true") else: cmd.append("--config_paths+=" + args.cfg) diff --git a/rslp/helios/model.py b/rslp/helios/model.py index fc161e79..b7e68e0b 100644 --- a/rslp/helios/model.py +++ b/rslp/helios/model.py @@ -3,7 +3,7 @@ import json import os from contextlib import nullcontext -from typing import Any +from typing import Any, Dict import torch from einops import rearrange @@ -32,6 +32,24 @@ } +def deep_merge(a: Dict[str, Any], b: Dict[str, Any]) -> Dict[str, Any]: + """Deep merge two dictionaries in place, override a keys with b keys. + + Args: + a: first dictionary + b: second dictionary + Returns: + merged dictionary + """ + out = dict(a) + for k, v in (b or {}).items(): + if k in out and isinstance(out[k], dict) and isinstance(v, dict): + out[k] = deep_merge(out[k], v) + else: + out[k] = v + return out + + class Helios(torch.nn.Module): """A wrapper to support the Helios model.""" @@ -72,11 +90,34 @@ def __init__( else: self.autocast_dtype = None + self.load_model(checkpoint_path, selector, random_initialization) + + def load_model( + self, + checkpoint_path: str, + selector: list[str | int] = [], + random_initialization: bool = False, + model_overrides: dict[str, Any] = {} + ) -> None: + """Load the model from a checkpoint. + + Args: + checkpoint_path: the checkpoint directory to load. It should contain + config.json file as well as model_and_optim folder. + selector: an optional sequence of attribute names or list indices to select + the sub-module that should be applied on the input images. + random_initialization: whether to skip loading the checkpoint so the + weights are randomly initialized. In this case, the checkpoint is only + used to define the model architecture. + model_overrides: overrides for the model building. + """ # Load the model config and initialize it. # We avoid loading the train module here because it depends on running within # olmo_core. with open(f"{checkpoint_path}/config.json") as f: config_dict = json.load(f) + if model_overrides is not None: + config_dict["model"] = deep_merge(config_dict["model"], model_overrides) model_config = Config.from_dict(config_dict["model"]) model = model_config.build() @@ -190,3 +231,186 @@ def get_backbone_channels(self) -> list: tuples. """ return [(self.patch_size, self.embedding_size)] + + +class TaskConditionedHelios(Helios): + """A wrapper to support task-conditioned Helios models.""" + + def __init__( + self, + checkpoint_path: str, + selector: list[str | int] = [], + forward_kwargs: dict[str, Any] = {}, + random_initialization: bool = False, + embedding_size: int | None = None, + patch_size: int | None = None, + autocast_dtype: str | None = "bfloat16", + task_embed_opts: dict[str, Any] | None = None, + model_overrides: dict[str, Any] | None = None, + ): + """ + Args: + checkpoint_path: the checkpoint directory to load. It should contain + config.json file as well as model_and_optim folder. + selector: optional attribute names or list indices to select a submodule. + forward_kwargs: extra args for forward() besides MaskedHeliosSample. + random_initialization: if True, skip loading checkpoint weights. + embedding_size: optional embedding size reported via get_backbone_channels. + patch_size: optional patch size reported via get_backbone_channels. + autocast_dtype: dtype to use for autocasting (string), or None to disable. + task_embed_opts: configuration for task embeddings + - type: "learned" (embedding table) | "precomputed" (from file) + - path: str (required for "precomputed"; optional as init for "learned") + - dim: int, dimension of task embeddings (overridden by precomputed embeds) + - tasks: list[str], sorted list of tasks (overridden by precomputed embeds) + model_overrides: overrides for the model module. Use this to set task conditioning + options like encoder_config.use_task_lora, etc. + task_dim will automatically be passed through. + """ + # Need to manually initialize the superclass to avoid re-initializing the model + torch.nn.Module.__init__(self) + + self.forward_kwargs = forward_kwargs + self.embedding_size = embedding_size + self.patch_size = patch_size + + if autocast_dtype is not None: + self.autocast_dtype = AUTOCAST_DTYPE_MAP[autocast_dtype] + else: + self.autocast_dtype = None + + # Load the task embeddings (we need the task dimension to initialize helios) + self.load_task_embeds(task_embed_opts) + + # Load the model from the checkpoint + if "encoder_config" not in model_overrides: + logger.warning("No model overrides provided, behavior is the same as Helios") + model_overrides["encoder_config"] = {} + if "task_dim" not in model_overrides.get("encoder_config", {}): + model_overrides["encoder_config"]["task_dim"] = self.task_embed_dim + elif model_overrides["encoder_config"]["task_dim"] != self.task_embed_dim: + actual = model_overrides['encoder_config']['task_dim'] + raise ValueError( + f"task_dim in model_overrides must match task_embed_dim, " + f"got {actual} != {self.task_embed_dim}" + ) + self.load_model( + checkpoint_path, + selector, + random_initialization, + model_overrides, + ) + + def load_task_embeds(self, task_embed_opts: dict[str, Any]) -> None: + """Load the task embeddings. + + Args: + task_embed_opts: configuration for task embeddings + - type: "learned" (embedding table) | "precomputed" (from file) + - path: str (required for "precomputed"; optional as init for "learned") + - dim: int, dimension of task embeddings (overridden by precomputed embeds) + - tasks: list[str], sorted list of tasks (overridden by precomputed embeds) + """ + self.task_embed_type: str = str(task_embed_opts["type"]) + self.task_embed_path: str | None = task_embed_opts.get("path", None) + if self.task_embed_type not in ("learned", "precomputed"): + raise ValueError("task_embed_opts['type'] must be 'learned' or 'precomputed'") + + self.pretrained_task_embeds: torch.Tensor | None = None + if self.task_embed_type == "precomputed": + if self.task_embed_path is None: + raise ValueError("task_embed_opts['path'] must be provided for precomputed embeddings") + self.load_pretrained_embeds() + + elif self.task_embed_type == "learned" and self.task_embed_path is not None: + # Use provided embeddings just to initialize + self.load_pretrained_embeds() + logger.info("Using pretrained task embeds to initialize the embedding table") + + # Some attributes are set by precomputed embeds if they're specified + if not hasattr(self, "task_embed_dim"): + self.task_embed_dim: int = int(task_embed_opts["dim"]) + if not hasattr(self, "tasks"): + self.tasks: list[str] = list(task_embed_opts["tasks"]) + + # Build the embedding table + self.task_embed_table = torch.nn.Embedding( + num_embeddings=len(self.tasks), + embedding_dim=self.task_embed_dim, + ) + + # If we have pretrained vectors (either for precomputed or init), copy them in + if self.pretrained_task_embeds is not None: + with torch.no_grad(): + self.task_embed_table.weight.copy_( + self.pretrained_task_embeds.to(self.task_embed_table.weight.device) + ) + + # If precomputed, freeze the table to avoid accidental training + if self.task_embed_type == "precomputed": + for p in self.task_embed_table.parameters(): + p.requires_grad = False + + def load_pretrained_embeds(self, drop=("code_hash",)) -> None: + """ + Load task embeddings from a file expected to contain a dict. + + Dict format is { task_name (str): 1D torch.Tensor }. + Resulting pretrained embeds are [num_tasks, dim]. + + Args: + drop: list of keys to drop from the dict. + """ + obj = torch.load(self.task_embed_path, map_location="cpu") + obj = {k: v for k, v in obj.items() if k not in drop} + + self.tasks = list(obj.keys()) + logger.info(f"Loaded task embeddings: {self.tasks}") + + dim = obj[self.tasks[0]].shape[0] + logger.info(f"Using task embed dim {dim}") + + rows = [] + for t in self.tasks: + v = obj[t].detach().flatten().to(torch.float32) + if v.dim() != 1 or v.numel() != dim: + raise ValueError( + f"Embedding for task '{t}' must be 1D of length {dim}, " + f"got shape {tuple(v.shape)}" + ) + rows.append(v) + + self.pretrained_task_embeds = torch.stack(rows, dim=0) + self.task_embed_dim = dim + + def compute_task_embeds(self, task_id: torch.Tensor) -> torch.Tensor: + """ + Args: + task_id: Integer tensor of shape (B,) with ids in [0, num_tasks). + Returns: + Tensor of shape (B, dim) with the task embeddings. + """ + idx = task_id.long().to(self.task_embed_table.weight.device) + return self.task_embed_table(idx) + + def forward(self, inputs: list[dict[str, Any]]) -> list[torch.Tensor]: + """ + Compute feature maps from the Helios backbone with task conditioning. + + Inputs: + inputs: list of input dicts. It should include keys corresponding to the + modalities that should be passed to the Helios model. + """ + # Assume dataset_source is consistent across the batch + dataset_source = inputs[0]["dataset_source"] + ids = torch.tensor([self.tasks.index(dataset_source)] * len(inputs)) + task_embeds = self.compute_task_embeds(ids) + + # Feed in task embed and restore previous value if it exists + key = "task_emb" + self.forward_kwargs[key], prev = ( + task_embeds, self.forward_kwargs.get(key) + ) + out = super().forward(inputs) + self.forward_kwargs[key] = prev + return out diff --git a/tests/integration/helios/test_task_embeds.py b/tests/integration/helios/test_task_embeds.py new file mode 100644 index 00000000..bcac5a2a --- /dev/null +++ b/tests/integration/helios/test_task_embeds.py @@ -0,0 +1,152 @@ +"""Testing task-conditioned Helios model.""" + +from pathlib import Path + +import torch +import pytest + +from rslp.helios.model import Helios, TaskConditionedHelios + + +@pytest.fixture +def patch_load_model(monkeypatch: pytest.MonkeyPatch) -> None: + """Prevent real file I/O: make Helios.load_model a no-op.""" + def fake_load_model(self, *args, **kwargs): + # set a harmless placeholder; Helios.forward will be monkeypatched in tests that call it + self.model = None + return None + + monkeypatch.setattr(Helios, "load_model", fake_load_model, raising=True) + + +def _dict_embeds(tasks, dim, base=0.0): + """Build dict: task -> 1D tensor[dim].""" + return {t: (torch.arange(dim, dtype=torch.float32) + float(i) + base) + for i, t in enumerate(tasks)} + + +def test_learned_init(tmp_path: Path, patch_load_model: None) -> None: + """Learned task embeddings initialization from pretrained (dict) and indexing.""" + tasks = ["det", "seg", "depth"] + dim = 4 + d = _dict_embeds(tasks, dim) + ckpt = tmp_path / "embeds.pt" + torch.save(d, ckpt) + + model = TaskConditionedHelios( + checkpoint_path="unused", # load_model is patched to no-op + task_embed_opts={"dim": dim, "type": "learned", "tasks": tasks, "path": str(ckpt)}, + ) + + # Expect weights stacked in the file’s (and thus self.tasks) order + expect = torch.stack([d[t] for t in model.tasks], dim=0) + w = model.task_embed_table.weight.detach().cpu() + assert w.shape == (len(model.tasks), dim) + assert torch.allclose(w, expect) + + # compute_task_embeds coerces dtype & device; indexing correct + idx = torch.tensor([0.0, 2.0]) # float on purpose to test cast->long + out = model.compute_task_embeds(idx) + assert out.shape == (2, dim) + assert torch.allclose(out.cpu(), expect[[0, 2]]) + + +def test_precomputed(tmp_path: Path, patch_load_model: None) -> None: + """Precomputed task embeddings freezing and indexing using dict format.""" + dim = 3 + d = {"a": torch.tensor([1.0, 2.0, 3.0]), + "b": torch.tensor([4.0, 5.0, 6.0])} + ckpt = tmp_path / "embeds.pt" + torch.save(d, ckpt) + + # tasks/dim from file; values in task_embed_opts are ignored for these fields + model = TaskConditionedHelios( + checkpoint_path="unused", + task_embed_opts={"dim": dim, "type": "precomputed", "tasks": ["x","y"], "path": str(ckpt)}, + ) + + # Frozen params + assert all(p.requires_grad is False for p in model.task_embed_table.parameters()) + + # Indexing + expect_full = torch.stack([d[t] for t in model.tasks], dim=0) + idx = torch.tensor([1, 0, 1]) + out = model.compute_task_embeds(idx) + assert out.shape == (3, dim) + assert torch.allclose(out.cpu(), expect_full[[1, 0, 1]]) + + # Even if frozen, weights can be zeroed with no_grad; verify effect + with torch.no_grad(): + model.task_embed_table.weight.zero_() + out2 = model.compute_task_embeds(idx) + assert torch.all(out2 == 0) + + +def test_forward_restore(patch_load_model: None, monkeypatch: pytest.MonkeyPatch) -> None: + """Forward sets and restores task embedding in forward_kwargs.""" + # Patch Helios.forward to assert the task_emb is present + def fake_forward(self, inputs): + assert "task_emb" in self.forward_kwargs + return [torch.tensor(float(len(inputs)))] + + monkeypatch.setattr(Helios, "forward", fake_forward, raising=True) + + tasks = ["x", "y"] + model = TaskConditionedHelios( + checkpoint_path="unused", + task_embed_opts={"dim": 2, "type": "learned", "tasks": tasks}, + ) + # Pre-set a different value to ensure it's restored after forward() + model.forward_kwargs["task_emb"] = "SENTINEL" + + inputs = [{"dataset_source": "x"}, {"dataset_source": "x"}] + out = model.forward(inputs) + assert isinstance(out, list) and out and torch.is_tensor(out[0]) + # Ensure restore happened + assert model.forward_kwargs.get("task_emb") == "SENTINEL" + + +def test_forward_matches(patch_load_model: None, monkeypatch: pytest.MonkeyPatch) -> None: + """If task embeddings are zeroed, TCH should match Helios output (same super()).""" + # Single stub for both: return batch-size tensor, ignore task_emb contents + def simple_forward(self, inputs): + return [torch.tensor(float(len(inputs)))] + + monkeypatch.setattr(Helios, "forward", simple_forward, raising=True) + + base = Helios(checkpoint_path="unused") + tch = TaskConditionedHelios( + checkpoint_path="unused", + task_embed_opts={"dim": 4, "type": "learned", "tasks": ["x", "y"]}, + ) + with torch.no_grad(): + tch.task_embed_table.weight.zero_() + + inputs = [{"dataset_source": "x"}, {"dataset_source": "x"}, {"dataset_source": "x"}] + assert torch.allclose(base.forward(inputs)[0], tch.forward(inputs)[0]) + + +def test_invalid_opts(tmp_path: Path, patch_load_model: None) -> None: + """Invalid task embed opts and malformed dict entries.""" + # Bad type + with pytest.raises(ValueError): + TaskConditionedHelios( + checkpoint_path="unused", + task_embed_opts={"dim": 4, "type": "nope", "tasks": ["a"]}, + ) + # Precomputed without path + with pytest.raises(ValueError): + TaskConditionedHelios( + checkpoint_path="unused", + task_embed_opts={"dim": 2, "type": "precomputed", "tasks": ["a", "b"]}, + ) + # Dict entry with wrong vector length (should raise during load_pretrained_embeds) + tasks, dim = ["a", "b", "c"], 2 + bad = {"a": torch.randn(dim), "b": torch.randn(dim + 1), "c": torch.randn(dim)} + ckpt = tmp_path / "bad.pt" + torch.save(bad, ckpt) + with pytest.raises(ValueError): + TaskConditionedHelios( + checkpoint_path="unused", + task_embed_opts={"dim": dim, "type": "learned", "tasks": tasks, "path": str(ckpt)}, + ) From f96481f42e625c7daf0bdf03448e43b39c69b351 Mon Sep 17 00:00:00 2001 From: ryanp Date: Tue, 12 Aug 2025 20:00:26 +0000 Subject: [PATCH 02/16] Fix partial checkpointing --- rslp/helios/checkpoint.py | 121 ++++++++++++++++++++++++++++++++++++++ rslp/helios/model.py | 10 +++- 2 files changed, 128 insertions(+), 3 deletions(-) create mode 100644 rslp/helios/checkpoint.py diff --git a/rslp/helios/checkpoint.py b/rslp/helios/checkpoint.py new file mode 100644 index 00000000..82d289b7 --- /dev/null +++ b/rslp/helios/checkpoint.py @@ -0,0 +1,121 @@ +""" +Load model and optimizer state in-place from a checkpoint saved via `save_model_and_optim_state()`. + +Copied from https://olmo-core.readthedocs.io/en/stable/_modules/olmo_core/distributed/checkpoint.html#load_model_and_optim_state, +except that we allow for missing weights. + +Goal is eventually to get something like this merged into olmo_core and not have to maintain this. +""" + +from typing import Dict, Optional + +import torch +import torch.distributed as dist +import torch.distributed.checkpoint as dist_cp +import torch.distributed.checkpoint.state_dict as dist_cp_sd +import torch.nn as nn +from olmo_core.aliases import PathOrStr +from olmo_core.io import normalize_path +from olmo_core.utils import gc_cuda +from olmo_core.distributed.checkpoint import ( + RemoteFileSystemReader, + _prepare_state_dict, + swap_param_keys, +) + +@torch.no_grad() +def load_model_and_optim_state( + dir: PathOrStr, + model: nn.Module, + optim: Optional[torch.optim.Optimizer] = None, + *, + process_group: Optional[dist.ProcessGroup] = None, + key_mapping: Optional[Dict[str, str]] = None, + pre_download: bool = False, + work_dir: Optional[PathOrStr] = None, + strict: bool = True, + flatten_optimizer_state: bool = False, + thread_count: Optional[int] = None, + planner: Optional[dist_cp.DefaultLoadPlanner] = None, +): + """ + Load model and optimizer state in-place from a checkpoint saved via :func:`save_model_and_optim_state()`. + This method is agnostic to the distributed topology in that it can load checkpoints saved with a different + distributed topology (e.g. FSDP/FSDP2, DDP). + + .. seealso:: + - :func:`save_model_and_optim_state()` + - :func:`unshard_checkpoint()` + + .. tip:: + With :class:`~torch.distributed.fsdp.FullyShardedDataParallel` models it's not necessary + to set the state dict type before calling this (or :func:`save_model_and_optim_state()`) via + :meth:`~torch.distributed.fsdp.FullyShardedDataParallel.state_dict_type()` or other methods. + This function handles that internally. + + .. warning:: + Due to the way :mod:`torch.distributed.checkpoint` works, if you have keys in the checkpoint + dict that are not present in the current state of the model or optimizer, those keys won't + be loaded. + + For example, if you added a custom field to one of your optimizer's param groups + before saving the checkpoint, but don't have that field in the param group of the optimizer + you're loading into, it won't be added. + + This can cause unexpected behavior if you're not careful. In this case the best thing to do + is to ensure all keys are in present param groups when you initialize the optimizer, before saving + or loading a checkpoint. + + :param dir: Path/URL to the checkpoint saved via :func:`save_model_and_optim_state()`. + :param model: The model to load the state into. + :param optim: The optimizer to load the state into. + :param process_group: The process group to use for distributed collectives. + :param key_mapping: Can be used to load a checkpoint where certain parameter have different names. + This dictionary should map current keys to keys in the checkpoint to be loaded. + :param pre_download: Download and cache relevant remote checkpoint files before trying to read from them. + :param work_dir: A working directory for caching files/directories. + :param strict: Load keys strictly. + :param flatten_optimizer_state: Flatten the optimizer state when loading. This should match + the setting used when saving the state dict and is needed in a distributed setting when + the params in some param groups may differ between ranks, such as with pipeline parallelism. + :param thread_count: Set the number of threads used for certain operations. + :param planner: The planner to use for loading the checkpoint. + """ + dir = normalize_path(dir) + state_dict = _prepare_state_dict( + model, optim, process_group=process_group, flatten_optimizer_state=flatten_optimizer_state + ) + reader = RemoteFileSystemReader( + dir, thread_count=thread_count, pre_download=pre_download, work_dir=work_dir + ) + metadata = reader.read_metadata() + + if key_mapping is not None: + swap_param_keys(state_dict, key_mapping, metadata=metadata) + + dist_cp.load( + state_dict, + checkpoint_id=dir, + storage_reader=reader, + process_group=process_group, + planner=planner, + ) + + if key_mapping is not None: + swap_param_keys(state_dict, key_mapping, reverse=True, quiet=True) + + dist_cp_sd.set_model_state_dict( + model, state_dict["model"], options=dist_cp_sd.StateDictOptions(strict=strict) + ) + gc_cuda() + + if optim is not None: + dist_cp_sd.set_optimizer_state_dict( + model, + optim, + state_dict["optim"], + options=dist_cp_sd.StateDictOptions( + strict=strict, flatten_optimizer_state_dict=flatten_optimizer_state + ), + ) + gc_cuda() diff --git a/rslp/helios/model.py b/rslp/helios/model.py index b7e68e0b..03aee042 100644 --- a/rslp/helios/model.py +++ b/rslp/helios/model.py @@ -6,13 +6,14 @@ from typing import Any, Dict import torch +from torch.distributed.checkpoint import DefaultLoadPlanner from einops import rearrange from helios.data.constants import Modality from helios.nn.flexihelios import TokensAndMasks from helios.train.masking import MaskedHeliosSample, MaskValue from olmo_core.config import Config -from olmo_core.distributed.checkpoint import load_model_and_optim_state +from rslp.helios.checkpoint import load_model_and_optim_state from rslp.log_utils import get_logger logger = get_logger(__name__) @@ -97,7 +98,8 @@ def load_model( checkpoint_path: str, selector: list[str | int] = [], random_initialization: bool = False, - model_overrides: dict[str, Any] = {} + model_overrides: dict[str, Any] = {}, + planner: DefaultLoadPlanner | None = None, ) -> None: """Load the model from a checkpoint. @@ -110,6 +112,7 @@ def load_model( weights are randomly initialized. In this case, the checkpoint is only used to define the model architecture. model_overrides: overrides for the model building. + planner: the planner to use for loading the checkpoint. """ # Load the model config and initialize it. # We avoid loading the train module here because it depends on running within @@ -126,7 +129,7 @@ def load_model( if not random_initialization: train_module_dir = os.path.join(checkpoint_path, "model_and_optim") if os.path.exists(train_module_dir): - load_model_and_optim_state(train_module_dir, model) + load_model_and_optim_state(train_module_dir, model, planner=planner) logger.info(f"loaded helios encoder from {train_module_dir}") else: logger.info(f"could not find helios encoder at {train_module_dir}") @@ -299,6 +302,7 @@ def __init__( selector, random_initialization, model_overrides, + planner=DefaultLoadPlanner(allow_partial_load=True), ) def load_task_embeds(self, task_embed_opts: dict[str, Any]) -> None: From 64729e830b07bdbe053cf3e972748cf7eb9ee236 Mon Sep 17 00:00:00 2001 From: ryanp Date: Mon, 18 Aug 2025 20:39:37 +0000 Subject: [PATCH 03/16] Update checkpointing, task embeds --- .../2025_08_12_embeds/OUT_classify_plain.yaml | 1131 +++++++++++ .../2025_08_12_embeds/OUT_detect_plain.yaml | 1778 ++++++++++++++++ .../2025_08_12_embeds/OUT_segment_plain.yaml | 1315 ++++++++++++ .../configs/2025_08_12_embeds/base.yaml | 21 +- .../configs/2025_08_12_embeds/classify.yaml | 23 +- .../configs/2025_08_12_embeds/detect.yaml | 30 + .../configs/2025_08_12_embeds/segment.yaml | 24 + .../OUT_classify.yaml | 62 +- .../2025_08_15_helios_moe/OUT_detect.yaml | 1782 +++++++++++++++++ .../2025_08_15_helios_moe/OUT_segment.yaml | 1319 ++++++++++++ .../configs/2025_08_15_helios_moe/base.yaml | 72 + .../2025_08_15_helios_moe/classify.yaml | 23 + .../configs/2025_08_15_helios_moe/detect.yaml | 30 + .../2025_08_15_helios_moe/segment.yaml | 24 + .../scripts/make_all_configs.py | 25 + .../scripts/make_task_embeds.py | 134 +- .../2025_07_joint_finetune/scripts/run.py | 14 +- rslp/helios/checkpoint.py | 33 +- rslp/helios/model.py | 84 +- tests/integration/helios/test_task_embeds.py | 52 +- 20 files changed, 7824 insertions(+), 152 deletions(-) create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/OUT_classify_plain.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/OUT_detect_plain.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/OUT_segment_plain.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/detect.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/segment.yaml rename one_off_projects/2025_07_joint_finetune/configs/{2025_08_12_embeds => 2025_08_15_helios_moe}/OUT_classify.yaml (96%) create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/OUT_detect.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/OUT_segment.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/base.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/classify.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/detect.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/segment.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/scripts/make_all_configs.py diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/OUT_classify_plain.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/OUT_classify_plain.yaml new file mode 100644 index 00000000..cbfb635e --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/OUT_classify_plain.yaml @@ -0,0 +1,1131 @@ +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + batch_sizes: + crop_type_classification: 32 + cropland_classification: 16 + vessel_classification: 16 + data_modules: + crop_type_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 32 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: [] + sentinel2_1: [] + sentinel2_10: [] + sentinel2_11: [] + sentinel2_2: [] + sentinel2_3: [] + sentinel2_4: [] + sentinel2_5: [] + sentinel2_6: [] + sentinel2_7: [] + sentinel2_8: [] + sentinel2_9: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + sentinel1_0: [] + sentinel1_1: [] + sentinel1_10: [] + sentinel1_11: [] + sentinel1_2: [] + sentinel1_3: [] + sentinel1_4: [] + sentinel1_5: [] + sentinel1_6: [] + sentinel1_7: [] + sentinel1_8: [] + sentinel1_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.pad.Pad + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + mode: center + size: 8 + inputs: + label: + data_type: vector + is_target: true + layers: + - label + sentinel1_0: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + sentinel1_1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + sentinel1_10: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.10 + passthrough: true + sentinel1_11: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.11 + passthrough: true + sentinel1_2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + sentinel1_3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + sentinel1_4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.4 + passthrough: true + sentinel1_5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.5 + passthrough: true + sentinel1_6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.6 + passthrough: true + sentinel1_7: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.7 + passthrough: true + sentinel1_8: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.8 + passthrough: true + sentinel1_9: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.9 + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/crop/kenya_nandi/20250625 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + crop_type_classification: + label: targets + tasks: + crop_type_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Coffee + - Trees + - Grassland + - Maize + - Sugarcane + - Tea + - Water + - Built-up + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + test_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: val + train_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: train + val_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: val + cropland_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 16 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: [] + sentinel2_1: [] + sentinel2_10: [] + sentinel2_11: [] + sentinel2_2: [] + sentinel2_3: [] + sentinel2_4: [] + sentinel2_5: [] + sentinel2_6: [] + sentinel2_7: [] + sentinel2_8: [] + sentinel2_9: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + sentinel1_0: [] + sentinel1_1: [] + sentinel1_10: [] + sentinel1_11: [] + sentinel1_2: [] + sentinel1_3: [] + sentinel1_4: [] + sentinel1_5: [] + sentinel1_6: [] + sentinel1_7: [] + sentinel1_8: [] + sentinel1_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.pad.Pad + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + mode: center + size: 8 + inputs: + label: + data_type: vector + is_target: true + layers: + - label + sentinel1_0: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1 + passthrough: true + sentinel1_1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.1 + passthrough: true + sentinel1_10: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.10 + passthrough: true + sentinel1_11: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.11 + passthrough: true + sentinel1_2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.2 + passthrough: true + sentinel1_3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.3 + passthrough: true + sentinel1_4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.4 + passthrough: true + sentinel1_5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.5 + passthrough: true + sentinel1_6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.6 + passthrough: true + sentinel1_7: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.7 + passthrough: true + sentinel1_8: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.8 + passthrough: true + sentinel1_9: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.9 + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/crop/worldcereal_cropland/20250626 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + cropland_classification: + label: targets + tasks: + cropland_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Cropland + - Non-Cropland + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + test_config: + groups: + - h3_sample100_66K + tags: + split: val + train_config: + groups: + - h3_sample100_66K + tags: + split: train + val_config: + groups: + - h3_sample100_66K + tags: + split: val + vessel_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 16 + default_config: + transforms: + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + label: + data_type: vector + is_target: true + layers: + - label + landsat: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/landsat_vessel_detection/classifier/dataset_20250624 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + vessel_classification: + label: targets + tasks: + vessel_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + allow_invalid: true + classes: + - correct + - incorrect + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: label + skip_unknown_categories: true + test_config: + groups: + - phase2a_completed + tags: + split: val + train_config: + groups: + - selected_copy + - phase2a_completed + - phase3a_selected + tags: + split: train + val_config: + groups: + - phase2a_completed + tags: + split: val + num_workers: 16 + refill_batches: true + sample_mode: random_cycle +model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.0001 + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + decoder_to_target: + ClassificationHead: + - vessel_classification + - crop_type_classification + - cropland_classification + decoders: + ClassificationHead: + - class_path: rslearn.models.pooling_decoder.PoolingDecoder + init_args: + in_channels: 768 + out_channels: 12 + - class_path: rslearn.train.tasks.classification.ClassificationHead + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_lora_kwargs: + gen_hidden: 64 + task_lora_indices: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 10 + - 11 + use_task_lora: true + selector: + - encoder + task_embed_opts: + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct.pt + type: precomputed + lazy_decode: true + task_label_offsets: + crop_type_classification: + num_outputs: 8 + offset: 2 + outputs_key: class + cropland_classification: + num_outputs: 2 + offset: 10 + outputs_key: class + vessel_classification: + num_outputs: 2 + offset: 0 + outputs_key: class + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 100 + eta_min: 0 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + crop_type_classification: + label: targets + cropland_classification: + label: targets + vessel_classification: + label: targets + tasks: + crop_type_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Coffee + - Trees + - Grassland + - Maize + - Sugarcane + - Tea + - Water + - Built-up + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + cropland_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Cropland + - Non-Cropland + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + vessel_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + allow_invalid: true + classes: + - correct + - incorrect + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: label + skip_unknown_categories: true +rslp_experiment: placeholder +rslp_project: placeholder +trainer: + accumulate_grad_batches: 3 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: epoch + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + mode: min + monitor: val_loss + save_last: true + save_top_k: 1 + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - at_epoch: 0 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - at_epoch: 20 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - lora + max_epochs: 200 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/OUT_detect_plain.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/OUT_detect_plain.yaml new file mode 100644 index 00000000..71107a27 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/OUT_detect_plain.yaml @@ -0,0 +1,1778 @@ +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + batch_sizes: + detect_satlas_marine_infra: 8 + detect_satlas_wind_turbine: 8 + detect_sentinel1_vessels: 8 + detect_sentinel2_vessels: 8 + vessel_detection: 8 + data_modules: + detect_satlas_marine_infra: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/marine_infra/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_marine_infra: + targets: targets + tasks: + detect_satlas_marine_infra: + class_path: rslp.satlas.train.MarineInfraTask + init_args: + box_size: 15 + classes: + - unknown + - platform + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + - - 0.1 + - - 0.2 + - - 0.3 + - - 0.4 + - - 0.5 + - - 0.6 + - - 0.7 + - - 0.8 + - - 0.9 + image_bands: + - 2 + - 1 + - 0 + property_name: category + remap_values: + - - 0 + - 0.25 + - - 0 + - 255 + skip_unknown_categories: true + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 65536 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_satlas_marine_infra + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + val_config: + patch_size: 128 + tags: + split: val + detect_satlas_wind_turbine: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + s25: [] + s26: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + landsat5: [] + landsat6: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + s1a5: [] + s1a6: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + landsat5: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.4 + passthrough: true + landsat6: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.5 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1a5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.4 + passthrough: true + s1a6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.5 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s1d5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.4 + passthrough: true + s1d6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.5 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + s25: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + s26: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/wind_turbine/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_wind_turbine: + targets: targets + tasks: + detect_satlas_wind_turbine: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 65536 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + s25: [] + s26: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + landsat5: [] + landsat6: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + s1a5: [] + s1a6: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_satlas_wind_turbine + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + val_config: + patch_size: 128 + tags: + split: val + detect_sentinel1_vessels: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/sentinel1_vessels/dataset_v1/20250602/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_sentinel1_vessels: + targets: targets + tasks: + detect_sentinel1_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + image_bands: + - 1 + - 1 + - 1 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.5 + test_config: + groups: + - val_ascending + - val_descending + patch_size: 128 + train_config: + groups: + - train_ascending + - train_descending + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 32768 + replacement: true + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_sentinel1_vessels + image_selectors: + - image + - sentinel1 + val_config: + groups: + - val_ascending + - val_descending + patch_size: 128 + detect_sentinel2_vessels: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/sentinel2_vessels/dataset_v1/20250213/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_sentinel2_vessels: + targets: targets + tasks: + detect_sentinel2_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + groups: + - sargassum_val + - split1 + - split7 + patch_size: 128 + train_config: + groups: + - sargassum_train + - split2 + - split3 + - split4 + - split5 + - split6 + - train + - train-bg + - train2 + - train3 + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 131072 + replacement: true + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_sentinel2_vessels + image_selectors: + - image + - sentinel2_l2a + val_config: + groups: + - sargassum_val + - split1 + - split7 + patch_size: 128 + vessel_detection: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/landsat_vessel_detection/detector/dataset_20250624 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + vessel_detection: + targets: targets + tasks: + vessel_detection: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.7 + test_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: val + train_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: train + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + val_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: val + num_workers: 16 + refill_batches: true + sample_mode: random_cycle +model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.0001 + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + decoder_to_target: + FasterRCNN: + - vessel_detection + - detect_satlas_marine_infra + - detect_satlas_wind_turbine + - detect_sentinel1_vessels + - detect_sentinel2_vessels + decoders: + FasterRCNN: + - class_path: rslearn.models.faster_rcnn.FasterRCNN + init_args: + anchor_sizes: + - - 32 + downsample_factors: + - 8 + num_channels: 768 + num_classes: 8 + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_lora_kwargs: + gen_hidden: 64 + task_lora_indices: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 10 + - 11 + use_task_lora: true + selector: + - encoder + task_embed_opts: + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct.pt + type: precomputed + lazy_decode: true + task_label_offsets: + detect_satlas_marine_infra: + num_outputs: 3 + offset: 2 + outputs_key: labels + detect_satlas_wind_turbine: + num_outputs: 3 + offset: 5 + outputs_key: labels + detect_sentinel1_vessels: + num_outputs: 2 + offset: 0 + outputs_key: labels + detect_sentinel2_vessels: + num_outputs: 2 + offset: 0 + outputs_key: labels + vessel_detection: + num_outputs: 2 + offset: 0 + outputs_key: labels + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 100 + eta_min: 0 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_marine_infra: + targets: targets + detect_satlas_wind_turbine: + targets: targets + detect_sentinel1_vessels: + targets: targets + detect_sentinel2_vessels: + targets: targets + vessel_detection: + targets: targets + tasks: + detect_satlas_marine_infra: + class_path: rslp.satlas.train.MarineInfraTask + init_args: + box_size: 15 + classes: + - unknown + - platform + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + - - 0.1 + - - 0.2 + - - 0.3 + - - 0.4 + - - 0.5 + - - 0.6 + - - 0.7 + - - 0.8 + - - 0.9 + image_bands: + - 2 + - 1 + - 0 + property_name: category + remap_values: + - - 0 + - 0.25 + - - 0 + - 255 + skip_unknown_categories: true + detect_satlas_wind_turbine: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + detect_sentinel1_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + image_bands: + - 1 + - 1 + - 1 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.5 + detect_sentinel2_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + vessel_detection: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.7 +rslp_experiment: placeholder +rslp_project: placeholder +trainer: + accumulate_grad_batches: 5 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: epoch + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + mode: min + monitor: val_loss + save_last: true + save_top_k: 1 + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - at_epoch: 0 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - at_epoch: 20 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - lora + max_epochs: 200 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/OUT_segment_plain.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/OUT_segment_plain.yaml new file mode 100644 index 00000000..5d8ba653 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/OUT_segment_plain.yaml @@ -0,0 +1,1315 @@ +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + batch_sizes: + segment: 2 + segment_satlas_solar_farm: 8 + data_modules: + segment: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 2 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_1: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_10: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_11: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_2: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_3: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_4: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_5: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_6: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_7: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_8: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_9: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1d_0: [] + s1d_1: [] + s1d_10: [] + s1d_11: [] + s1d_2: [] + s1d_3: [] + s1d_4: [] + s1d_5: [] + s1d_6: [] + s1d_7: [] + s1d_8: [] + s1d_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + s1d_0: + bands: + - vv + - vh + data_type: raster + layers: + - s1d + passthrough: true + s1d_1: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.1 + passthrough: true + s1d_10: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.10 + passthrough: true + s1d_11: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.11 + passthrough: true + s1d_2: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.2 + passthrough: true + s1d_3: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.3 + passthrough: true + s1d_4: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.4 + passthrough: true + s1d_5: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.5 + passthrough: true + s1d_6: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.6 + passthrough: true + s1d_7: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.7 + passthrough: true + s1d_8: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.8 + passthrough: true + s1d_9: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.9 + passthrough: true + targets: + bands: + - class + data_type: raster + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/pastis/rslearn_dataset/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + segment: + targets: targets + tasks: + segment: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_miou_metric: true + metric_kwargs: + average: micro + num_classes: 20 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + zero_is_invalid: true + test_config: + groups: + - fold5 + train_config: + groups: + - fold1 + - fold2 + - fold3 + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_1: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_10: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_11: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_2: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_3: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_4: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_5: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_6: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_7: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_8: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_9: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1d_0: [] + s1d_1: [] + s1d_10: [] + s1d_11: [] + s1d_2: [] + s1d_3: [] + s1d_4: [] + s1d_5: [] + s1d_6: [] + s1d_7: [] + s1d_8: [] + s1d_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + - target/segment/classes + - target/segment/valid + val_config: + groups: + - fold4 + segment_satlas_solar_farm: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + targets: + bands: + - label + data_type: raster + dtype: INT32 + is_target: true + layers: + - label_raster + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/solar_farm/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + segment_satlas_solar_farm: + targets: targets + tasks: + segment_satlas_solar_farm: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_f1_metric: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + metric_kwargs: + average: micro + num_classes: 2 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 16384 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - target/segment_satlas_solar_farm/classes + - target/segment_satlas_solar_farm/valid + val_config: + patch_size: 128 + tags: + split: val + num_workers: 16 + refill_batches: true + sample_mode: random_cycle +model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.0001 + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + decoder_to_target: + SegmentationHead: + - segment + - segment_satlas_solar_farm + decoders: + SegmentationHead: + - class_path: rslearn.models.unet.UNetDecoder + init_args: + conv_layers_per_resolution: 2 + in_channels: + - - 8 + - 768 + num_channels: + 1: 128 + 2: 256 + 4: 512 + 8: 512 + out_channels: 22 + - class_path: rslearn.train.tasks.segmentation.SegmentationHead + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_lora_kwargs: + gen_hidden: 64 + task_lora_indices: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 10 + - 11 + use_task_lora: true + selector: + - encoder + task_embed_opts: + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct.pt + type: precomputed + lazy_decode: true + task_label_offsets: + segment: + num_outputs: 20 + offset: 0 + outputs_key: classes + segment_satlas_solar_farm: + num_outputs: 2 + offset: 20 + outputs_key: classes + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 100 + eta_min: 0 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + segment: + targets: targets + segment_satlas_solar_farm: + targets: targets + tasks: + segment: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_miou_metric: true + metric_kwargs: + average: micro + num_classes: 20 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + zero_is_invalid: true + segment_satlas_solar_farm: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_f1_metric: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + metric_kwargs: + average: micro + num_classes: 2 + remap_values: + - - 0 + - 1 + - - 0 + - 255 +rslp_experiment: placeholder +rslp_project: placeholder +trainer: + accumulate_grad_batches: 2 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: epoch + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + mode: min + monitor: val_loss + save_last: true + save_top_k: 1 + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - at_epoch: 0 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - at_epoch: 20 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - lora + max_epochs: 200 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/base.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/base.yaml index 15a33d59..eaa7c9ac 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/base.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/base.yaml @@ -13,10 +13,13 @@ model: patch_size: {PATCH_SIZE} model_overrides: encoder_config: - use_task_lora: true + task_lora_kwargs: + use_task_lora: true + task_lora_indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] + gen_hidden: 64 task_embed_opts: type: "precomputed" - path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/2025_08_12_task_embeds.pt + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct.pt decoders: # Filled in by make_multidataset_config.py lazy_decode: true lr: 0.0001 @@ -46,13 +49,17 @@ trainer: save_last: true monitor: val_loss mode: min - - class_path: rslearn.train.callbacks.freeze_unfreeze.FreezeUnfreeze + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning init_args: - module_selector: ["model", "encoder", 0] - unfreeze_at_epoch: 20 - unfreeze_lr_factor: 10 + stages: + - at_epoch: 0 + freeze_selectors: ["encoder"] + unfreeze_selectors: ["head"] + - at_epoch: 20 + freeze_selectors: ["encoder"] + unfreeze_selectors: ["head", "lora"] rslp_project: placeholder rslp_experiment: placeholder -all_dataset_info_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v3_multitask/all_dataset_info.yaml \ No newline at end of file +all_dataset_info_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v3_multitask/all_dataset_info.yaml diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/classify.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/classify.yaml index e28ec5b5..29bb7aa1 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/classify.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/classify.yaml @@ -1,5 +1,5 @@ base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/base.yaml -output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/OUT_classify.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/OUT_classify_plain.yaml dataset_cfgs: - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_classifier_cosinelr.yaml @@ -13,26 +13,7 @@ substitutions: global_overrides: model: - init_args: - model: - init_args: - trunk: - class_path: rslearn.models.trunk.DecoderTrunk - init_args: - task_embedding: - class_path: rslearn.models.task_embedding.TaskChannelEmbedding - init_args: - encoder_embedding_size: 768 - add_spatial_embed: true - layers: - - class_path: rslearn.models.trunk.MoETransformer - init_args: - dim: 768 - n_layers: 2 - n_heads: 12 - num_experts: 8 - num_slots: 1 - expert_mult: 2 + class_path: rslearn.train.lightning_module.RslearnLightningModule trainer: accumulate_grad_batches: 3 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/detect.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/detect.yaml new file mode 100644 index 00000000..adc40f5b --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/detect.yaml @@ -0,0 +1,30 @@ +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/OUT_detect_plain.yaml + +dataset_cfgs: + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_detector_cosinelr.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_marine_infra_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_marine_infra_128/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_wind_turbine_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_wind_turbine_128/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_helios.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel2_vessels_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel2_vessels_128/basecfg_helios.yaml + +substitutions: + patch_size: 8 + encoder_embedding_size: 768 + helios_checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + +global_overrides: + model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + trainer: + accumulate_grad_batches: 5 + +merge_options: + merge_heads: true + merge_task_labels: true + same_label_groups: + - [detect_sentinel1_vessels, detect_sentinel2_vessels, vessel_detection] diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/segment.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/segment.yaml new file mode 100644 index 00000000..9c05597f --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/segment.yaml @@ -0,0 +1,24 @@ +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/OUT_segment_plain.yaml + +dataset_cfgs: + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_pastis/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_pastis/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_solar_farm_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_solar_farm_128/basecfg_helios_mm.yaml + +global_overrides: + model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + trainer: + accumulate_grad_batches: 2 + +merge_options: + merge_heads: true + merge_task_labels: true + same_label_groups: + +substitutions: + patch_size: 8 + encoder_embedding_size: 768 + helios_checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/OUT_classify.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/OUT_classify.yaml similarity index 96% rename from one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/OUT_classify.yaml rename to one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/OUT_classify.yaml index 22cf9504..ec8f07e7 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/OUT_classify.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/OUT_classify.yaml @@ -985,7 +985,7 @@ data: refill_batches: true sample_mode: random_cycle model: - class_path: rslp.helios.lightning_module.MoELightningModule + class_path: rslearn.train.lightning_module.RslearnLightningModule init_args: lr: 0.0001 model: @@ -1011,11 +1011,24 @@ model: patch_size: 8 model_overrides: encoder_config: - use_task_lora: true + task_moe_kwargs: + add_noise: true + expert_mult: 0.5 + noise_mult: 0.2 + num_experts: 4 + num_slots: 1 + task_moe_indices: + - 6 + - 7 + - 8 + - 9 + - 10 + - 11 + use_task_moe: true selector: - encoder task_embed_opts: - path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/2025_08_12_task_embeds.pt + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct.pt type: precomputed lazy_decode: true task_label_offsets: @@ -1031,23 +1044,6 @@ model: num_outputs: 2 offset: 0 outputs_key: class - trunk: - class_path: rslearn.models.trunk.DecoderTrunk - init_args: - layers: - - class_path: rslearn.models.trunk.MoETransformer - init_args: - dim: 768 - expert_mult: 2 - n_heads: 12 - n_layers: 2 - num_experts: 8 - num_slots: 1 - task_embedding: - class_path: rslearn.models.task_embedding.TaskChannelEmbedding - init_args: - add_spatial_embed: true - encoder_embedding_size: 768 scheduler: class_path: rslearn.train.scheduler.CosineAnnealingScheduler init_args: @@ -1116,12 +1112,24 @@ trainer: monitor: val_loss save_last: true save_top_k: 1 - - class_path: rslearn.train.callbacks.freeze_unfreeze.FreezeUnfreeze + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning init_args: - module_selector: - - model - - encoder - - 0 - unfreeze_at_epoch: 20 - unfreeze_lr_factor: 10 + stages: + - at_epoch: 0 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - at_epoch: 20 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - moe + - at_epoch: 40 + freeze_selectors: [] + unfreeze_selectors: + - head + - moe + - encoder max_epochs: 200 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/OUT_detect.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/OUT_detect.yaml new file mode 100644 index 00000000..0e86b06d --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/OUT_detect.yaml @@ -0,0 +1,1782 @@ +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + batch_sizes: + detect_satlas_marine_infra: 8 + detect_satlas_wind_turbine: 8 + detect_sentinel1_vessels: 8 + detect_sentinel2_vessels: 8 + vessel_detection: 8 + data_modules: + detect_satlas_marine_infra: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/marine_infra/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_marine_infra: + targets: targets + tasks: + detect_satlas_marine_infra: + class_path: rslp.satlas.train.MarineInfraTask + init_args: + box_size: 15 + classes: + - unknown + - platform + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + - - 0.1 + - - 0.2 + - - 0.3 + - - 0.4 + - - 0.5 + - - 0.6 + - - 0.7 + - - 0.8 + - - 0.9 + image_bands: + - 2 + - 1 + - 0 + property_name: category + remap_values: + - - 0 + - 0.25 + - - 0 + - 255 + skip_unknown_categories: true + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 65536 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_satlas_marine_infra + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + val_config: + patch_size: 128 + tags: + split: val + detect_satlas_wind_turbine: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + s25: [] + s26: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + landsat5: [] + landsat6: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + s1a5: [] + s1a6: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + landsat5: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.4 + passthrough: true + landsat6: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.5 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1a5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.4 + passthrough: true + s1a6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.5 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s1d5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.4 + passthrough: true + s1d6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.5 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + s25: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + s26: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/wind_turbine/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_wind_turbine: + targets: targets + tasks: + detect_satlas_wind_turbine: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 65536 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + s25: [] + s26: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + landsat5: [] + landsat6: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + s1a5: [] + s1a6: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_satlas_wind_turbine + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + val_config: + patch_size: 128 + tags: + split: val + detect_sentinel1_vessels: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/sentinel1_vessels/dataset_v1/20250602/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_sentinel1_vessels: + targets: targets + tasks: + detect_sentinel1_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + image_bands: + - 1 + - 1 + - 1 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.5 + test_config: + groups: + - val_ascending + - val_descending + patch_size: 128 + train_config: + groups: + - train_ascending + - train_descending + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 32768 + replacement: true + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_sentinel1_vessels + image_selectors: + - image + - sentinel1 + val_config: + groups: + - val_ascending + - val_descending + patch_size: 128 + detect_sentinel2_vessels: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/sentinel2_vessels/dataset_v1/20250213/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_sentinel2_vessels: + targets: targets + tasks: + detect_sentinel2_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + groups: + - sargassum_val + - split1 + - split7 + patch_size: 128 + train_config: + groups: + - sargassum_train + - split2 + - split3 + - split4 + - split5 + - split6 + - train + - train-bg + - train2 + - train3 + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 131072 + replacement: true + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_sentinel2_vessels + image_selectors: + - image + - sentinel2_l2a + val_config: + groups: + - sargassum_val + - split1 + - split7 + patch_size: 128 + vessel_detection: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/landsat_vessel_detection/detector/dataset_20250624 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + vessel_detection: + targets: targets + tasks: + vessel_detection: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.7 + test_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: val + train_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: train + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + val_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: val + num_workers: 16 + refill_batches: true + sample_mode: random_cycle +model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.0001 + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + decoder_to_target: + FasterRCNN: + - vessel_detection + - detect_satlas_marine_infra + - detect_satlas_wind_turbine + - detect_sentinel1_vessels + - detect_sentinel2_vessels + decoders: + FasterRCNN: + - class_path: rslearn.models.faster_rcnn.FasterRCNN + init_args: + anchor_sizes: + - - 32 + downsample_factors: + - 8 + num_channels: 768 + num_classes: 8 + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_moe_kwargs: + add_noise: true + expert_mult: 0.5 + noise_mult: 0.2 + num_experts: 4 + num_slots: 1 + task_moe_indices: + - 6 + - 7 + - 8 + - 9 + - 10 + - 11 + use_task_moe: true + selector: + - encoder + task_embed_opts: + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct.pt + type: precomputed + lazy_decode: true + task_label_offsets: + detect_satlas_marine_infra: + num_outputs: 3 + offset: 2 + outputs_key: labels + detect_satlas_wind_turbine: + num_outputs: 3 + offset: 5 + outputs_key: labels + detect_sentinel1_vessels: + num_outputs: 2 + offset: 0 + outputs_key: labels + detect_sentinel2_vessels: + num_outputs: 2 + offset: 0 + outputs_key: labels + vessel_detection: + num_outputs: 2 + offset: 0 + outputs_key: labels + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 100 + eta_min: 0 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_marine_infra: + targets: targets + detect_satlas_wind_turbine: + targets: targets + detect_sentinel1_vessels: + targets: targets + detect_sentinel2_vessels: + targets: targets + vessel_detection: + targets: targets + tasks: + detect_satlas_marine_infra: + class_path: rslp.satlas.train.MarineInfraTask + init_args: + box_size: 15 + classes: + - unknown + - platform + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + - - 0.1 + - - 0.2 + - - 0.3 + - - 0.4 + - - 0.5 + - - 0.6 + - - 0.7 + - - 0.8 + - - 0.9 + image_bands: + - 2 + - 1 + - 0 + property_name: category + remap_values: + - - 0 + - 0.25 + - - 0 + - 255 + skip_unknown_categories: true + detect_satlas_wind_turbine: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + detect_sentinel1_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + image_bands: + - 1 + - 1 + - 1 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.5 + detect_sentinel2_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + vessel_detection: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.7 +rslp_experiment: placeholder +rslp_project: placeholder +trainer: + accumulate_grad_batches: 5 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: epoch + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + mode: min + monitor: val_loss + save_last: true + save_top_k: 1 + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - at_epoch: 0 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - at_epoch: 20 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - moe + - at_epoch: 40 + freeze_selectors: [] + unfreeze_selectors: + - head + - moe + - encoder + max_epochs: 200 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/OUT_segment.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/OUT_segment.yaml new file mode 100644 index 00000000..2083eb53 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/OUT_segment.yaml @@ -0,0 +1,1319 @@ +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + batch_sizes: + segment: 2 + segment_satlas_solar_farm: 8 + data_modules: + segment: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 2 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_1: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_10: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_11: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_2: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_3: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_4: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_5: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_6: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_7: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_8: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_9: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1d_0: [] + s1d_1: [] + s1d_10: [] + s1d_11: [] + s1d_2: [] + s1d_3: [] + s1d_4: [] + s1d_5: [] + s1d_6: [] + s1d_7: [] + s1d_8: [] + s1d_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + s1d_0: + bands: + - vv + - vh + data_type: raster + layers: + - s1d + passthrough: true + s1d_1: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.1 + passthrough: true + s1d_10: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.10 + passthrough: true + s1d_11: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.11 + passthrough: true + s1d_2: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.2 + passthrough: true + s1d_3: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.3 + passthrough: true + s1d_4: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.4 + passthrough: true + s1d_5: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.5 + passthrough: true + s1d_6: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.6 + passthrough: true + s1d_7: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.7 + passthrough: true + s1d_8: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.8 + passthrough: true + s1d_9: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.9 + passthrough: true + targets: + bands: + - class + data_type: raster + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/pastis/rslearn_dataset/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + segment: + targets: targets + tasks: + segment: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_miou_metric: true + metric_kwargs: + average: micro + num_classes: 20 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + zero_is_invalid: true + test_config: + groups: + - fold5 + train_config: + groups: + - fold1 + - fold2 + - fold3 + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_1: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_10: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_11: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_2: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_3: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_4: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_5: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_6: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_7: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_8: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_9: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1d_0: [] + s1d_1: [] + s1d_10: [] + s1d_11: [] + s1d_2: [] + s1d_3: [] + s1d_4: [] + s1d_5: [] + s1d_6: [] + s1d_7: [] + s1d_8: [] + s1d_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + - target/segment/classes + - target/segment/valid + val_config: + groups: + - fold4 + segment_satlas_solar_farm: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + targets: + bands: + - label + data_type: raster + dtype: INT32 + is_target: true + layers: + - label_raster + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/solar_farm/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + segment_satlas_solar_farm: + targets: targets + tasks: + segment_satlas_solar_farm: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_f1_metric: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + metric_kwargs: + average: micro + num_classes: 2 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 16384 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - target/segment_satlas_solar_farm/classes + - target/segment_satlas_solar_farm/valid + val_config: + patch_size: 128 + tags: + split: val + num_workers: 16 + refill_batches: true + sample_mode: random_cycle +model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.0001 + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + decoder_to_target: + SegmentationHead: + - segment + - segment_satlas_solar_farm + decoders: + SegmentationHead: + - class_path: rslearn.models.unet.UNetDecoder + init_args: + conv_layers_per_resolution: 2 + in_channels: + - - 8 + - 768 + num_channels: + 1: 128 + 2: 256 + 4: 512 + 8: 512 + out_channels: 22 + - class_path: rslearn.train.tasks.segmentation.SegmentationHead + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_moe_kwargs: + add_noise: true + expert_mult: 0.5 + noise_mult: 0.2 + num_experts: 4 + num_slots: 1 + task_moe_indices: + - 6 + - 7 + - 8 + - 9 + - 10 + - 11 + use_task_moe: true + selector: + - encoder + task_embed_opts: + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct.pt + type: precomputed + lazy_decode: true + task_label_offsets: + segment: + num_outputs: 20 + offset: 0 + outputs_key: classes + segment_satlas_solar_farm: + num_outputs: 2 + offset: 20 + outputs_key: classes + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 100 + eta_min: 0 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + segment: + targets: targets + segment_satlas_solar_farm: + targets: targets + tasks: + segment: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_miou_metric: true + metric_kwargs: + average: micro + num_classes: 20 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + zero_is_invalid: true + segment_satlas_solar_farm: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_f1_metric: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + metric_kwargs: + average: micro + num_classes: 2 + remap_values: + - - 0 + - 1 + - - 0 + - 255 +rslp_experiment: placeholder +rslp_project: placeholder +trainer: + accumulate_grad_batches: 2 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: epoch + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + mode: min + monitor: val_loss + save_last: true + save_top_k: 1 + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - at_epoch: 0 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - at_epoch: 20 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - moe + - at_epoch: 40 + freeze_selectors: [] + unfreeze_selectors: + - head + - moe + - encoder + max_epochs: 200 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/base.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/base.yaml new file mode 100644 index 00000000..58001e84 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/base.yaml @@ -0,0 +1,72 @@ +model: + class_path: rslp.helios.lightning_module.MoELightningModule + init_args: + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: "{CHECKPOINT_PATH}" + selector: ["encoder"] + forward_kwargs: + patch_size: {PATCH_SIZE} + model_overrides: + encoder_config: + task_moe_kwargs: + use_task_moe: true + task_moe_indices: [6, 7, 8, 9, 10, 11] + add_noise: true + noise_mult: 0.2 + num_experts: 4 + num_slots: 1 + expert_mult: 0.5 + task_embed_opts: + type: "precomputed" + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct.pt + decoders: # Filled in by make_multidataset_config.py + lazy_decode: true + lr: 0.0001 + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 100 + eta_min: 0 + +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + sample_mode: random_cycle + refill_batches: true + num_workers: 16 + data_modules: # Filled in by make_multidataset_config.py + +trainer: + max_epochs: 200 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: "epoch" + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + save_top_k: 1 + save_last: true + monitor: val_loss + mode: min + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - at_epoch: 0 + freeze_selectors: ["encoder"] + unfreeze_selectors: ["head"] + - at_epoch: 20 + freeze_selectors: ["encoder"] + unfreeze_selectors: ["head", "moe"] + - at_epoch: 40 + freeze_selectors: [] + unfreeze_selectors: ["head", "moe", "encoder"] + +rslp_project: placeholder +rslp_experiment: placeholder + +all_dataset_info_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v3_multitask/all_dataset_info.yaml \ No newline at end of file diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/classify.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/classify.yaml new file mode 100644 index 00000000..062576c6 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/classify.yaml @@ -0,0 +1,23 @@ +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/OUT_classify.yaml + +dataset_cfgs: + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_classifier_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_nandi_crop_type/finetune_s1_s2_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_worldcereal_cropland/finetune_s1_s2_cosinelr.yaml + +substitutions: + patch_size: 8 + encoder_embedding_size: 768 + helios_checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + +global_overrides: + model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + trainer: + accumulate_grad_batches: 3 + +merge_options: + merge_heads: true + merge_task_labels: true + same_label_groups: diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/detect.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/detect.yaml new file mode 100644 index 00000000..da2867f9 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/detect.yaml @@ -0,0 +1,30 @@ +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/OUT_detect.yaml + +dataset_cfgs: + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_detector_cosinelr.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_marine_infra_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_marine_infra_128/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_wind_turbine_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_wind_turbine_128/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_helios.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel2_vessels_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel2_vessels_128/basecfg_helios.yaml + +substitutions: + patch_size: 8 + encoder_embedding_size: 768 + helios_checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + +global_overrides: + model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + trainer: + accumulate_grad_batches: 5 + +merge_options: + merge_heads: true + merge_task_labels: true + same_label_groups: + - [detect_sentinel1_vessels, detect_sentinel2_vessels, vessel_detection] diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/segment.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/segment.yaml new file mode 100644 index 00000000..93f1be78 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/segment.yaml @@ -0,0 +1,24 @@ +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/OUT_segment.yaml + +dataset_cfgs: + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_pastis/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_pastis/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_solar_farm_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_solar_farm_128/basecfg_helios_mm.yaml + +global_overrides: + model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + trainer: + accumulate_grad_batches: 2 + +merge_options: + merge_heads: true + merge_task_labels: true + same_label_groups: + +substitutions: + patch_size: 8 + encoder_embedding_size: 768 + helios_checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 diff --git a/one_off_projects/2025_07_joint_finetune/scripts/make_all_configs.py b/one_off_projects/2025_07_joint_finetune/scripts/make_all_configs.py new file mode 100644 index 00000000..1b66f98c --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/scripts/make_all_configs.py @@ -0,0 +1,25 @@ +import os +import sys + +base_dir = "/weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs" +d = sys.argv[1] + +if not os.path.exists(os.path.join(base_dir, d)): + d = [dd for dd in os.listdir(base_dir) if dd.endswith(d)] + if len(d) == 1: + d = d[0] + else: + i = int(input(f"No such directory. Choose from: {d} (enter index)")) + d = d[i] + +done = [] +for f in os.listdir(os.path.join(base_dir, d)): + if not f.startswith("OUT_") and not f.endswith("base.yaml"): + print(os.path.join(base_dir, d, f)) + os.system(f"python3 make_multidataset_config.py --cfg {os.path.join(base_dir, d, f)}") + done.append(os.path.join(base_dir, d, f)) + +print() +print("========== FINISHED ===========") +for f in done: + print(f" - {f}") diff --git a/one_off_projects/2025_07_joint_finetune/scripts/make_task_embeds.py b/one_off_projects/2025_07_joint_finetune/scripts/make_task_embeds.py index be0c8ac6..4ac365ec 100644 --- a/one_off_projects/2025_07_joint_finetune/scripts/make_task_embeds.py +++ b/one_off_projects/2025_07_joint_finetune/scripts/make_task_embeds.py @@ -7,7 +7,7 @@ similarity between embeddings is 0.36, but similar tasks are still high. If you don't truncate, then you need to use a projection layer in the helios encoder -to get the dimensions down to 768. With MLR, qwen's embeddings are pretty even so. +to get the dimensions down to 768. With MLR, qwen's embeddings are pretty good even so. Current commands ================ @@ -17,15 +17,18 @@ import hashlib import argparse import json +import warnings from pathlib import Path from typing import Any, Dict, List, Tuple, Set, Optional +import numpy as np import torch import torch.nn.functional as F import yaml from transformers import AutoTokenizer, AutoModel from rslp.helios.model import deep_merge +RESET = "\x1b[0m" KEEP_INPUT_FAMILIES = ("sentinel1", "sentinel2", "landsat", "srtm") DROP_INPUTS = {"mask", "image", "targets", "label"} DEFAULT_INSTRUCT_PROMPT = """ @@ -190,6 +193,26 @@ def extract_decoder_primary_key(cfg: Dict[str, Any]) -> Optional[str]: except Exception: return None +# ---------------- Color helpers ---------------- + +def cell_color(v: float, vmin: float, vmax: float) -> str: + # Normalize in [0,1]; handle degenerate range + if vmax <= vmin: + t = 0.0 + else: + t = (v - vmin) / (vmax - vmin) + # Lighter green for lower sim, darker for higher: invert brightness + g = int(round(255 * (1.0 - t))) # background green channel + r = b = 0 + # Choose text color for contrast + # light bg (g >= 128) => black text; dark bg => white text + fg = (0, 0, 0) if g >= 128 else (255, 255, 255) + bg = (r, g, b) + return f"\x1b[38;2;{fg[0]};{fg[1]};{fg[2]}m\x1b[48;2;{bg[0]};{bg[1]};{bg[2]}m" + +def clip(s: str, w: int) -> str: + return s if len(s) <= w else s[: max(1, w - 1)] + "…" + # ---------------- Embedding helpers ---------------- @@ -265,12 +288,12 @@ def parse_args() -> argparse.Namespace: ) p.add_argument( "--out-path", - default="/weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/2025_08_12_task_embeds.pt", + default="/weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds_{info}.pt", help="Path to save torch dict {task_key: tensor[D]}." ) p.add_argument( "--dump-texts", - default="/weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/2025_08_12_task_texts.jsonl", + default="/weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_texts_{info}.jsonl", help="Optional JSONL for {task_dir, task_key, text}." ) p.add_argument("--tasks", nargs="*", help="Task dir names (none = auto: subdirs starting with v2_*)") @@ -289,16 +312,31 @@ def parse_args() -> argparse.Namespace: def main() -> None: args = parse_args() - if not args.tasks: - args.tasks = [name for name in os.listdir(args.base_dir) if name.startswith("v2_")] + tasks = args.tasks + if not tasks: + tasks = [name for name in os.listdir(args.base_dir) if name.startswith("v2_")] + # special case - treat vessel classification + detection separately + landsat_index = tasks.index("v2_landsat_vessels") + tasks.insert(landsat_index, "v2_landsat_vessels") + else: + landsat_index = tasks.index("v2_landsat_vessels") summaries: List[str] = [] keys: List[str] = [] merged_cfgs: List[Dict[str, Any]] = [] - for task_dir in args.tasks: + for i, task_dir in enumerate(tasks): merged: Dict[str, Any] = {} - for p in gather_task_files(args.base_dir, task_dir): + is_landsat_vessels = (task_dir == "v2_landsat_vessels") + + if is_landsat_vessels: + task = "detector" if i == landsat_index else "classifier" + path = "finetune_{}_cosinelr.yaml".format(task) + gathered = [os.path.join(args.base_dir, task_dir, path)] + else: + gathered = gather_task_files(args.base_dir, task_dir) + + for p in gathered: merged = deep_merge(merged, load_yaml(p)) merged_cfgs.append(merged) @@ -310,12 +348,29 @@ def main() -> None: key = task_dir keys.append(key) + # Sort by key alphabetically + keys_index = list(range(len(keys))) + keys_index = list(sorted(keys_index, key=lambda i: keys[i])) + + tasks = [tasks[i] for i in keys_index] + keys = [keys[i] for i in keys_index] + summaries = [summaries[i] for i in keys_index] + merged_cfgs = [merged_cfgs[i] for i in keys_index] + + # Get info string + info = f"__{args.model.split('/')[-1]}__{args.truncate}d" + if args.anchor: + info += "__anchor" + if args.instruct: + info += "__instruct" + print("=== Configuration ===") + print(f"Info: {info}") print(f"Model: {args.model}") print(f"Base dir: {args.base_dir}") - print("Task dirs:") - for task_dir in args.tasks: - print(f" - {task_dir}") + print("Sorted task dir -> key:") + for task_dir, key in zip(tasks, keys): + print(f" - {task_dir:<30} -> {key}") print() # Load model once @@ -351,12 +406,12 @@ def main() -> None: # Add hash of current code for future checking result["code_hash"] = hashlib.sha256(open(__file__, "rb").read()).hexdigest() - torch.save(result, args.out_path) + torch.save(result, args.out_path.format(info=info)) # Optional: dump texts if args.dump_texts: - with open(args.dump_texts, "w") as f: - for task_dir, key, text in zip(args.tasks, keys, summaries): + with open(args.dump_texts.format(info=info), "w") as f: + for task_dir, key, text in zip(tasks, keys, summaries): f.write(json.dumps({"task_dir": task_dir, "task_key": key, "text": text}) + "\n") f.write(json.dumps({"code_hash": result["code_hash"]}) + "\n") if args.anchor: @@ -364,28 +419,47 @@ def main() -> None: if args.instruct: f.write(json.dumps({"prompt": args.prompt}) + "\n") - # Pretty print keys + # Cosine similarity matrix result.pop("code_hash") - sorted_keys = sorted(result.keys()) - print("\n=== Saved task keys ===") - for k in sorted_keys: - print(" -", k) + warnings.filterwarnings("ignore", category=DeprecationWarning) + print(f"=== Cosine similarity matrix ===") - # Cosine similarity matrix - mat = torch.stack([result[k] for k in sorted_keys], dim=0) # [N, D] + mat = torch.stack([result[k] for k in keys], dim=0) # [N, D] sim = F.cosine_similarity(mat.unsqueeze(1), mat.unsqueeze(0), dim=-1) # [N, N] - print("\n=== Cosine similarity matrix ===") - header = ["{:>15}".format(k[:13]) for k in sorted_keys] - print("{:>15} {}".format("", " ".join(header))) - for i, k in enumerate(sorted_keys): - row_vals = " ".join(f"{v:>13.3f}" for v in sim[i]) - print("{:>15} {}".format(k[:13], row_vals)) - print("\nMean similarity:", round(sim.mean().item(), 3)) - - print(f"\nSaved dict with {len(result)} entries to {args.out_path}") + A = sim.detach().cpu().numpy() + N = len(keys) + prec = 3 + + # Label and column widths + clip = lambda s, w: s if len(s) <= w else s[: w - 1] + "…" + idx_digits = max(2, len(str(max(0, N - 1)))) + num_w = max(prec + 2, idx_digits) # width for numbers & headers (e.g., "0.123") + label_w = max(16, min(36, max(len(k) for k in keys) + 1 + 2 + idx_digits)) # "name (idx)" + + vmin, vmax = float(np.nanmin(A)), float(np.nanmax(A)) + + # Header: indices only + header = " ".join(f"{i:>{num_w}d}" for i in range(N)) + print(f"{'':>{label_w}} {header}") + + # Rows: "name (index)" at left; colored cells + for i, name in enumerate(keys): + row_label = f"{name} ({i})" + row_label = clip(row_label, label_w) + cells = [] + for j in range(N): + v = float(A[i, j]) + fmt = f"{v:>{num_w}.{prec}f}" + cells.append(cell_color(v, vmin, vmax) + fmt + RESET) + print(f"{row_label:>{label_w}} " + " ".join(cells)) + + # Summary + print(f"\nRange: [{vmin:.{prec}f}, {vmax:.{prec}f}] Mean similarity: {A.mean():.{prec}f}") + + print(f"\nSaved dict with {len(result)} entries to {args.out_path.format(info=info)}") if args.dump_texts: - print(f"Wrote plaintext rows to {args.dump_texts}") + print(f"Wrote plaintext rows to {args.dump_texts.format(info=info)}") if __name__ == "__main__": diff --git a/one_off_projects/2025_07_joint_finetune/scripts/run.py b/one_off_projects/2025_07_joint_finetune/scripts/run.py index 0c33b25b..2bf309c4 100644 --- a/one_off_projects/2025_07_joint_finetune/scripts/run.py +++ b/one_off_projects/2025_07_joint_finetune/scripts/run.py @@ -1,6 +1,7 @@ import argparse import os import subprocess +from datetime import datetime cmd = [ "python", "-m", "rslp.main", "helios", "launch_finetune", @@ -48,14 +49,21 @@ for cfg in cfgs: cmd.append("--config_paths+=" + cfg) elif args.cfg == "lora": - args.cfg = "/weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/OUT_classify.yaml" + args.cfg = "/weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/OUT_classify_plain.yaml" args.exp_id = "debug_task_lora_classify" cmd.append("--config_paths+=" + args.cfg) - cmd.append("--allow_missing_weights") - cmd.append("true") +elif args.cfg == "moe": + args.cfg = "/weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/OUT_classify.yaml" + args.exp_id = "debug_task_moe_base" + cmd.append("--config_paths+=" + args.cfg) else: cmd.append("--config_paths+=" + args.cfg) + +if args.exp_id == "debug": + now = datetime.now().strftime("%Y-%m-%d_%H-%M-%S") + args.exp_id = f"debug_{now}" + print(args) env = os.environ.copy() diff --git a/rslp/helios/checkpoint.py b/rslp/helios/checkpoint.py index 82d289b7..19c520b6 100644 --- a/rslp/helios/checkpoint.py +++ b/rslp/helios/checkpoint.py @@ -1,5 +1,4 @@ -""" -Load model and optimizer state in-place from a checkpoint saved via `save_model_and_optim_state()`. +"""Load model and optimizer state in-place from a checkpoint saved via `save_model_and_optim_state()`. Copied from https://olmo-core.readthedocs.io/en/stable/_modules/olmo_core/distributed/checkpoint.html#load_model_and_optim_state, except that we allow for missing weights. @@ -7,39 +6,38 @@ Goal is eventually to get something like this merged into olmo_core and not have to maintain this. """ -from typing import Dict, Optional - import torch import torch.distributed as dist import torch.distributed.checkpoint as dist_cp import torch.distributed.checkpoint.state_dict as dist_cp_sd import torch.nn as nn from olmo_core.aliases import PathOrStr -from olmo_core.io import normalize_path -from olmo_core.utils import gc_cuda from olmo_core.distributed.checkpoint import ( RemoteFileSystemReader, _prepare_state_dict, swap_param_keys, ) +from olmo_core.io import normalize_path +from olmo_core.utils import gc_cuda + @torch.no_grad() def load_model_and_optim_state( dir: PathOrStr, model: nn.Module, - optim: Optional[torch.optim.Optimizer] = None, + optim: torch.optim.Optimizer | None = None, *, - process_group: Optional[dist.ProcessGroup] = None, - key_mapping: Optional[Dict[str, str]] = None, + process_group: dist.ProcessGroup | None = None, + key_mapping: dict[str, str] | None = None, pre_download: bool = False, - work_dir: Optional[PathOrStr] = None, + work_dir: PathOrStr | None = None, strict: bool = True, flatten_optimizer_state: bool = False, - thread_count: Optional[int] = None, - planner: Optional[dist_cp.DefaultLoadPlanner] = None, -): - """ - Load model and optimizer state in-place from a checkpoint saved via :func:`save_model_and_optim_state()`. + thread_count: int | None = None, + planner: dist_cp.DefaultLoadPlanner | None = None, +) -> None: + """Load model and optimizer state in-place from a checkpoint saved via :func:`save_model_and_optim_state()`. + This method is agnostic to the distributed topology in that it can load checkpoints saved with a different distributed topology (e.g. FSDP/FSDP2, DDP). @@ -83,7 +81,10 @@ def load_model_and_optim_state( """ dir = normalize_path(dir) state_dict = _prepare_state_dict( - model, optim, process_group=process_group, flatten_optimizer_state=flatten_optimizer_state + model, + optim, + process_group=process_group, + flatten_optimizer_state=flatten_optimizer_state, ) reader = RemoteFileSystemReader( dir, thread_count=thread_count, pre_download=pre_download, work_dir=work_dir diff --git a/rslp/helios/model.py b/rslp/helios/model.py index 03aee042..d7670b4a 100644 --- a/rslp/helios/model.py +++ b/rslp/helios/model.py @@ -2,16 +2,17 @@ import json import os +import re from contextlib import nullcontext -from typing import Any, Dict +from typing import Any import torch -from torch.distributed.checkpoint import DefaultLoadPlanner from einops import rearrange from helios.data.constants import Modality from helios.nn.flexihelios import TokensAndMasks from helios.train.masking import MaskedHeliosSample, MaskValue from olmo_core.config import Config +from torch.distributed.checkpoint import DefaultLoadPlanner from rslp.helios.checkpoint import load_model_and_optim_state from rslp.log_utils import get_logger @@ -33,9 +34,9 @@ } -def deep_merge(a: Dict[str, Any], b: Dict[str, Any]) -> Dict[str, Any]: +def deep_merge(a: dict[str, Any], b: dict[str, Any]) -> dict[str, Any]: """Deep merge two dictionaries in place, override a keys with b keys. - + Args: a: first dictionary b: second dictionary @@ -237,7 +238,7 @@ def get_backbone_channels(self) -> list: class TaskConditionedHelios(Helios): - """A wrapper to support task-conditioned Helios models.""" + """A wrapper to support task-conditioned Helios models via embeddings for each task.""" def __init__( self, @@ -250,8 +251,9 @@ def __init__( autocast_dtype: str | None = "bfloat16", task_embed_opts: dict[str, Any] | None = None, model_overrides: dict[str, Any] | None = None, - ): - """ + ) -> None: + """Initialize task-conditioned helios model, loading task embeddings. + Args: checkpoint_path: the checkpoint directory to load. It should contain config.json file as well as model_and_optim folder. @@ -282,21 +284,31 @@ def __init__( else: self.autocast_dtype = None - # Load the task embeddings (we need the task dimension to initialize helios) - self.load_task_embeds(task_embed_opts) + # Load the task embeddings (we need the task dimension to initialize helios) + self.load_task_embeds(task_embed_opts or {}) + + if model_overrides is None: + model_overrides = {} - # Load the model from the checkpoint if "encoder_config" not in model_overrides: - logger.warning("No model overrides provided, behavior is the same as Helios") - model_overrides["encoder_config"] = {} - if "task_dim" not in model_overrides.get("encoder_config", {}): - model_overrides["encoder_config"]["task_dim"] = self.task_embed_dim - elif model_overrides["encoder_config"]["task_dim"] != self.task_embed_dim: - actual = model_overrides['encoder_config']['task_dim'] - raise ValueError( - f"task_dim in model_overrides must match task_embed_dim, " - f"got {actual} != {self.task_embed_dim}" + logger.warning( + "No model overrides provided, behavior is the same as Helios" ) + model_overrides["encoder_config"] = {} + + # Add task_dim to all task-conditioned kwargs, checking that it matches with + # any preconfigured task_dim values + for k, v in model_overrides["encoder_config"].items(): + if re.match(r"task.*kwargs", k): + if "task_dim" not in v: + v["task_dim"] = self.task_embed_dim + elif v["task_dim"] != self.task_embed_dim: + raise ValueError( + f"task_dim in model_overrides must match task_embed_dim, " + f"got {v['task_dim']} != {self.task_embed_dim}" + ) + + # Load the model from the checkpoint self.load_model( checkpoint_path, selector, @@ -307,7 +319,7 @@ def __init__( def load_task_embeds(self, task_embed_opts: dict[str, Any]) -> None: """Load the task embeddings. - + Args: task_embed_opts: configuration for task embeddings - type: "learned" (embedding table) | "precomputed" (from file) @@ -318,18 +330,24 @@ def load_task_embeds(self, task_embed_opts: dict[str, Any]) -> None: self.task_embed_type: str = str(task_embed_opts["type"]) self.task_embed_path: str | None = task_embed_opts.get("path", None) if self.task_embed_type not in ("learned", "precomputed"): - raise ValueError("task_embed_opts['type'] must be 'learned' or 'precomputed'") + raise ValueError( + "task_embed_opts['type'] must be 'learned' or 'precomputed'" + ) self.pretrained_task_embeds: torch.Tensor | None = None if self.task_embed_type == "precomputed": if self.task_embed_path is None: - raise ValueError("task_embed_opts['path'] must be provided for precomputed embeddings") + raise ValueError( + "task_embed_opts['path'] must be provided for precomputed embeddings" + ) self.load_pretrained_embeds() elif self.task_embed_type == "learned" and self.task_embed_path is not None: # Use provided embeddings just to initialize self.load_pretrained_embeds() - logger.info("Using pretrained task embeds to initialize the embedding table") + logger.info( + "Using pretrained task embeds to initialize the embedding table" + ) # Some attributes are set by precomputed embeds if they're specified if not hasattr(self, "task_embed_dim"): @@ -354,10 +372,9 @@ def load_task_embeds(self, task_embed_opts: dict[str, Any]) -> None: if self.task_embed_type == "precomputed": for p in self.task_embed_table.parameters(): p.requires_grad = False - - def load_pretrained_embeds(self, drop=("code_hash",)) -> None: - """ - Load task embeddings from a file expected to contain a dict. + + def load_pretrained_embeds(self, drop: tuple[str] = ("code_hash",)) -> None: + """Load task embeddings from a file expected to contain a dict. Dict format is { task_name (str): 1D torch.Tensor }. Resulting pretrained embeds are [num_tasks, dim]. @@ -388,9 +405,11 @@ def load_pretrained_embeds(self, drop=("code_hash",)) -> None: self.task_embed_dim = dim def compute_task_embeds(self, task_id: torch.Tensor) -> torch.Tensor: - """ + """Compute or retrieve task embeddings given the task identifiers. + Args: task_id: Integer tensor of shape (B,) with ids in [0, num_tasks). + Returns: Tensor of shape (B, dim) with the task embeddings. """ @@ -398,8 +417,7 @@ def compute_task_embeds(self, task_id: torch.Tensor) -> torch.Tensor: return self.task_embed_table(idx) def forward(self, inputs: list[dict[str, Any]]) -> list[torch.Tensor]: - """ - Compute feature maps from the Helios backbone with task conditioning. + """Compute feature maps from the Helios backbone with task conditioning. Inputs: inputs: list of input dicts. It should include keys corresponding to the @@ -410,11 +428,9 @@ def forward(self, inputs: list[dict[str, Any]]) -> list[torch.Tensor]: ids = torch.tensor([self.tasks.index(dataset_source)] * len(inputs)) task_embeds = self.compute_task_embeds(ids) - # Feed in task embed and restore previous value if it exists + # Feed in task embedding and restore previous value if it exists key = "task_emb" - self.forward_kwargs[key], prev = ( - task_embeds, self.forward_kwargs.get(key) - ) + self.forward_kwargs[key], prev = (task_embeds, self.forward_kwargs.get(key)) out = super().forward(inputs) self.forward_kwargs[key] = prev return out diff --git a/tests/integration/helios/test_task_embeds.py b/tests/integration/helios/test_task_embeds.py index bcac5a2a..6f5a998f 100644 --- a/tests/integration/helios/test_task_embeds.py +++ b/tests/integration/helios/test_task_embeds.py @@ -1,9 +1,10 @@ """Testing task-conditioned Helios model.""" from pathlib import Path +from typing import Any -import torch import pytest +import torch from rslp.helios.model import Helios, TaskConditionedHelios @@ -11,7 +12,8 @@ @pytest.fixture def patch_load_model(monkeypatch: pytest.MonkeyPatch) -> None: """Prevent real file I/O: make Helios.load_model a no-op.""" - def fake_load_model(self, *args, **kwargs): + + def fake_load_model(self: Any, *args: Any, **kwargs: Any) -> None: # set a harmless placeholder; Helios.forward will be monkeypatched in tests that call it self.model = None return None @@ -19,10 +21,12 @@ def fake_load_model(self, *args, **kwargs): monkeypatch.setattr(Helios, "load_model", fake_load_model, raising=True) -def _dict_embeds(tasks, dim, base=0.0): +def _dict_embeds(tasks: list, dim: int, base: float = 0.0) -> dict: """Build dict: task -> 1D tensor[dim].""" - return {t: (torch.arange(dim, dtype=torch.float32) + float(i) + base) - for i, t in enumerate(tasks)} + return { + t: (torch.arange(dim, dtype=torch.float32) + float(i) + base) + for i, t in enumerate(tasks) + } def test_learned_init(tmp_path: Path, patch_load_model: None) -> None: @@ -35,7 +39,12 @@ def test_learned_init(tmp_path: Path, patch_load_model: None) -> None: model = TaskConditionedHelios( checkpoint_path="unused", # load_model is patched to no-op - task_embed_opts={"dim": dim, "type": "learned", "tasks": tasks, "path": str(ckpt)}, + task_embed_opts={ + "dim": dim, + "type": "learned", + "tasks": tasks, + "path": str(ckpt), + }, ) # Expect weights stacked in the file’s (and thus self.tasks) order @@ -54,15 +63,19 @@ def test_learned_init(tmp_path: Path, patch_load_model: None) -> None: def test_precomputed(tmp_path: Path, patch_load_model: None) -> None: """Precomputed task embeddings freezing and indexing using dict format.""" dim = 3 - d = {"a": torch.tensor([1.0, 2.0, 3.0]), - "b": torch.tensor([4.0, 5.0, 6.0])} + d = {"a": torch.tensor([1.0, 2.0, 3.0]), "b": torch.tensor([4.0, 5.0, 6.0])} ckpt = tmp_path / "embeds.pt" torch.save(d, ckpt) # tasks/dim from file; values in task_embed_opts are ignored for these fields model = TaskConditionedHelios( checkpoint_path="unused", - task_embed_opts={"dim": dim, "type": "precomputed", "tasks": ["x","y"], "path": str(ckpt)}, + task_embed_opts={ + "dim": dim, + "type": "precomputed", + "tasks": ["x", "y"], + "path": str(ckpt), + }, ) # Frozen params @@ -82,10 +95,13 @@ def test_precomputed(tmp_path: Path, patch_load_model: None) -> None: assert torch.all(out2 == 0) -def test_forward_restore(patch_load_model: None, monkeypatch: pytest.MonkeyPatch) -> None: +def test_forward_restore( + patch_load_model: None, monkeypatch: pytest.MonkeyPatch +) -> None: """Forward sets and restores task embedding in forward_kwargs.""" + # Patch Helios.forward to assert the task_emb is present - def fake_forward(self, inputs): + def fake_forward(self: Any, inputs: list[torch.tensor]) -> list[torch.tensor]: assert "task_emb" in self.forward_kwargs return [torch.tensor(float(len(inputs)))] @@ -106,10 +122,13 @@ def fake_forward(self, inputs): assert model.forward_kwargs.get("task_emb") == "SENTINEL" -def test_forward_matches(patch_load_model: None, monkeypatch: pytest.MonkeyPatch) -> None: +def test_forward_matches( + patch_load_model: None, monkeypatch: pytest.MonkeyPatch +) -> None: """If task embeddings are zeroed, TCH should match Helios output (same super()).""" + # Single stub for both: return batch-size tensor, ignore task_emb contents - def simple_forward(self, inputs): + def simple_forward(self: Any, inputs: list[torch.tensor]) -> list[torch.tensor]: return [torch.tensor(float(len(inputs)))] monkeypatch.setattr(Helios, "forward", simple_forward, raising=True) @@ -148,5 +167,10 @@ def test_invalid_opts(tmp_path: Path, patch_load_model: None) -> None: with pytest.raises(ValueError): TaskConditionedHelios( checkpoint_path="unused", - task_embed_opts={"dim": dim, "type": "learned", "tasks": tasks, "path": str(ckpt)}, + task_embed_opts={ + "dim": dim, + "type": "learned", + "tasks": tasks, + "path": str(ckpt), + }, ) From 2a0bd33eed2ba672d7579520e9e3f064004a3f3f Mon Sep 17 00:00:00 2001 From: ryanp Date: Mon, 18 Aug 2025 22:22:35 +0000 Subject: [PATCH 04/16] Update dockerfile for uv, cfgs --- helios.Dockerfile | 20 +- ..._classify_plain.yaml => OUT_classify.yaml} | 0 ...{OUT_detect_plain.yaml => OUT_detect.yaml} | 0 ...UT_segment_plain.yaml => OUT_segment.yaml} | 0 .../configs/2025_08_12_embeds/classify.yaml | 2 +- .../configs/2025_08_12_embeds/detect.yaml | 2 +- .../configs/2025_08_12_embeds/segment.yaml | 2 +- .../configs/2025_08_18_task/OUT_classify.yaml | 1144 +++++++++++ .../configs/2025_08_18_task/OUT_detect.yaml | 1791 +++++++++++++++++ .../configs/2025_08_18_task/OUT_segment.yaml | 1328 ++++++++++++ .../configs/2025_08_18_task/base.yaml | 76 + .../configs/2025_08_18_task/classify.yaml | 23 + .../configs/2025_08_18_task/detect.yaml | 30 + .../configs/2025_08_18_task/segment.yaml | 24 + 14 files changed, 4431 insertions(+), 11 deletions(-) rename one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/{OUT_classify_plain.yaml => OUT_classify.yaml} (100%) rename one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/{OUT_detect_plain.yaml => OUT_detect.yaml} (100%) rename one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/{OUT_segment_plain.yaml => OUT_segment.yaml} (100%) create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/OUT_classify.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/OUT_detect.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/OUT_segment.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/base.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/classify.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/detect.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/segment.yaml diff --git a/helios.Dockerfile b/helios.Dockerfile index 1cef91be..fc6a1826 100644 --- a/helios.Dockerfile +++ b/helios.Dockerfile @@ -3,23 +3,27 @@ FROM pytorch/pytorch:2.7.0-cuda12.8-cudnn9-runtime RUN apt update RUN apt install -y libpq-dev ffmpeg libsm6 libxext6 git wget -# Install rslearn and helios (need to be in local directory). +# Install uv - there is an issue with lightning versioning, so hack is to use uv pip. +COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv + +# Prep for rslearn and helios install (need to be in local directory). COPY ./docker_build/rslearn /opt/rslearn COPY ./docker_build/helios /opt/helios COPY requirements.txt /opt/rslearn_projects/requirements.txt COPY ai2_requirements.txt /opt/rslearn_projects/ai2_requirements.txt # We also install terratorch so that we can use the same Docker image for TerraMind -# experiments. -RUN pip install --no-cache-dir git+https://github.com/IBM/terratorch.git -RUN pip install --no-cache-dir geobench==0.0.1 +# experiments, as well as geobench. +RUN uv pip install --system --no-cache-dir git+https://github.com/IBM/terratorch.git +RUN uv pip install --system --no-cache-dir geobench==0.0.1 -RUN pip install --no-cache-dir --upgrade /opt/rslearn[extra] -RUN pip install --no-cache-dir --upgrade /opt/helios -RUN pip install --no-cache-dir -r /opt/rslearn_projects/requirements.txt -r /opt/rslearn_projects/ai2_requirements.txt +# Install rslearn and helios. +RUN uv pip install --system --no-cache-dir --upgrade /opt/rslearn[extra] +RUN uv pip install --system --no-cache-dir --upgrade /opt/helios +RUN uv pip install --system --no-cache-dir -r /opt/rslearn_projects/requirements.txt -r /opt/rslearn_projects/ai2_requirements.txt # Copy rslearn_projects and install it too. COPY . /opt/rslearn_projects/ -RUN pip install --no-cache-dir /opt/rslearn_projects +RUN uv pip install --system --no-cache-dir /opt/rslearn_projects WORKDIR /opt/rslearn_projects diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/OUT_classify_plain.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/OUT_classify.yaml similarity index 100% rename from one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/OUT_classify_plain.yaml rename to one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/OUT_classify.yaml diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/OUT_detect_plain.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/OUT_detect.yaml similarity index 100% rename from one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/OUT_detect_plain.yaml rename to one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/OUT_detect.yaml diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/OUT_segment_plain.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/OUT_segment.yaml similarity index 100% rename from one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/OUT_segment_plain.yaml rename to one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/OUT_segment.yaml diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/classify.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/classify.yaml index 29bb7aa1..ceeaf0d0 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/classify.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/classify.yaml @@ -1,5 +1,5 @@ base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/base.yaml -output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/OUT_classify_plain.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/OUT_classify.yaml dataset_cfgs: - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_classifier_cosinelr.yaml diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/detect.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/detect.yaml index adc40f5b..c6d858a1 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/detect.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/detect.yaml @@ -1,5 +1,5 @@ base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/base.yaml -output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/OUT_detect_plain.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/OUT_detect.yaml dataset_cfgs: - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_detector_cosinelr.yaml diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/segment.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/segment.yaml index 9c05597f..88e708d3 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/segment.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/segment.yaml @@ -1,5 +1,5 @@ base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/base.yaml -output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/OUT_segment_plain.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/OUT_segment.yaml dataset_cfgs: - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_pastis/basecfg_cosinelr.yaml diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/OUT_classify.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/OUT_classify.yaml new file mode 100644 index 00000000..5422c624 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/OUT_classify.yaml @@ -0,0 +1,1144 @@ +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + batch_sizes: + crop_type_classification: 32 + cropland_classification: 16 + vessel_classification: 16 + data_modules: + crop_type_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 32 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: [] + sentinel2_1: [] + sentinel2_10: [] + sentinel2_11: [] + sentinel2_2: [] + sentinel2_3: [] + sentinel2_4: [] + sentinel2_5: [] + sentinel2_6: [] + sentinel2_7: [] + sentinel2_8: [] + sentinel2_9: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + sentinel1_0: [] + sentinel1_1: [] + sentinel1_10: [] + sentinel1_11: [] + sentinel1_2: [] + sentinel1_3: [] + sentinel1_4: [] + sentinel1_5: [] + sentinel1_6: [] + sentinel1_7: [] + sentinel1_8: [] + sentinel1_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.pad.Pad + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + mode: center + size: 8 + inputs: + label: + data_type: vector + is_target: true + layers: + - label + sentinel1_0: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + sentinel1_1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + sentinel1_10: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.10 + passthrough: true + sentinel1_11: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.11 + passthrough: true + sentinel1_2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + sentinel1_3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + sentinel1_4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.4 + passthrough: true + sentinel1_5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.5 + passthrough: true + sentinel1_6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.6 + passthrough: true + sentinel1_7: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.7 + passthrough: true + sentinel1_8: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.8 + passthrough: true + sentinel1_9: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.9 + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/crop/kenya_nandi/20250625 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + crop_type_classification: + label: targets + tasks: + crop_type_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Coffee + - Trees + - Grassland + - Maize + - Sugarcane + - Tea + - Water + - Built-up + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + test_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: val + train_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: train + val_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: val + cropland_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 16 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: [] + sentinel2_1: [] + sentinel2_10: [] + sentinel2_11: [] + sentinel2_2: [] + sentinel2_3: [] + sentinel2_4: [] + sentinel2_5: [] + sentinel2_6: [] + sentinel2_7: [] + sentinel2_8: [] + sentinel2_9: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + sentinel1_0: [] + sentinel1_1: [] + sentinel1_10: [] + sentinel1_11: [] + sentinel1_2: [] + sentinel1_3: [] + sentinel1_4: [] + sentinel1_5: [] + sentinel1_6: [] + sentinel1_7: [] + sentinel1_8: [] + sentinel1_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.pad.Pad + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + mode: center + size: 8 + inputs: + label: + data_type: vector + is_target: true + layers: + - label + sentinel1_0: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1 + passthrough: true + sentinel1_1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.1 + passthrough: true + sentinel1_10: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.10 + passthrough: true + sentinel1_11: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.11 + passthrough: true + sentinel1_2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.2 + passthrough: true + sentinel1_3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.3 + passthrough: true + sentinel1_4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.4 + passthrough: true + sentinel1_5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.5 + passthrough: true + sentinel1_6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.6 + passthrough: true + sentinel1_7: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.7 + passthrough: true + sentinel1_8: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.8 + passthrough: true + sentinel1_9: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.9 + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/crop/worldcereal_cropland/20250626 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + cropland_classification: + label: targets + tasks: + cropland_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Cropland + - Non-Cropland + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + test_config: + groups: + - h3_sample100_66K + tags: + split: val + train_config: + groups: + - h3_sample100_66K + tags: + split: train + val_config: + groups: + - h3_sample100_66K + tags: + split: val + vessel_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 16 + default_config: + transforms: + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + label: + data_type: vector + is_target: true + layers: + - label + landsat: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/landsat_vessel_detection/classifier/dataset_20250624 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + vessel_classification: + label: targets + tasks: + vessel_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + allow_invalid: true + classes: + - correct + - incorrect + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: label + skip_unknown_categories: true + test_config: + groups: + - phase2a_completed + tags: + split: val + train_config: + groups: + - selected_copy + - phase2a_completed + - phase3a_selected + tags: + split: train + val_config: + groups: + - phase2a_completed + tags: + split: val + num_workers: 16 + refill_batches: true + sample_mode: random_cycle +model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.0001 + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + decoder_to_target: + ClassificationHead: + - vessel_classification + - crop_type_classification + - cropland_classification + decoders: + ClassificationHead: + - class_path: rslearn.models.pooling_decoder.PoolingDecoder + init_args: + in_channels: 768 + out_channels: 12 + - class_path: rslearn.train.tasks.classification.ClassificationHead + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_lora_kwargs: + gen_hidden: 64 + task_lora_indices: + - 6 + - 7 + - 8 + - 9 + - 10 + - 11 + use_task_lora: true + task_moe_kwargs: + add_noise: true + expert_mult: 0.5 + noise_mult: 0.2 + num_experts: 4 + num_slots: 1 + task_moe_indices: + - 9 + - 10 + - 11 + use_task_moe: true + selector: + - encoder + task_embed_opts: + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct.pt + type: precomputed + lazy_decode: true + task_label_offsets: + crop_type_classification: + num_outputs: 8 + offset: 2 + outputs_key: class + cropland_classification: + num_outputs: 2 + offset: 10 + outputs_key: class + vessel_classification: + num_outputs: 2 + offset: 0 + outputs_key: class + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 100 + eta_min: 0 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + crop_type_classification: + label: targets + cropland_classification: + label: targets + vessel_classification: + label: targets + tasks: + crop_type_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Coffee + - Trees + - Grassland + - Maize + - Sugarcane + - Tea + - Water + - Built-up + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + cropland_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Cropland + - Non-Cropland + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + vessel_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + allow_invalid: true + classes: + - correct + - incorrect + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: label + skip_unknown_categories: true +rslp_experiment: placeholder +rslp_project: placeholder +trainer: + accumulate_grad_batches: 3 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: epoch + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + mode: min + monitor: val_loss + save_last: true + save_top_k: 1 + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - at_epoch: 0 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - at_epoch: 20 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - moe + - lora + - at_epoch: 40 + freeze_selectors: [] + unfreeze_selectors: + - head + - moe + - lora + - encoder + max_epochs: 200 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/OUT_detect.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/OUT_detect.yaml new file mode 100644 index 00000000..4ab4800f --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/OUT_detect.yaml @@ -0,0 +1,1791 @@ +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + batch_sizes: + detect_satlas_marine_infra: 8 + detect_satlas_wind_turbine: 8 + detect_sentinel1_vessels: 8 + detect_sentinel2_vessels: 8 + vessel_detection: 8 + data_modules: + detect_satlas_marine_infra: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/marine_infra/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_marine_infra: + targets: targets + tasks: + detect_satlas_marine_infra: + class_path: rslp.satlas.train.MarineInfraTask + init_args: + box_size: 15 + classes: + - unknown + - platform + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + - - 0.1 + - - 0.2 + - - 0.3 + - - 0.4 + - - 0.5 + - - 0.6 + - - 0.7 + - - 0.8 + - - 0.9 + image_bands: + - 2 + - 1 + - 0 + property_name: category + remap_values: + - - 0 + - 0.25 + - - 0 + - 255 + skip_unknown_categories: true + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 65536 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_satlas_marine_infra + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + val_config: + patch_size: 128 + tags: + split: val + detect_satlas_wind_turbine: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + s25: [] + s26: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + landsat5: [] + landsat6: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + s1a5: [] + s1a6: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + landsat5: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.4 + passthrough: true + landsat6: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.5 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1a5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.4 + passthrough: true + s1a6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.5 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s1d5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.4 + passthrough: true + s1d6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.5 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + s25: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + s26: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/wind_turbine/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_wind_turbine: + targets: targets + tasks: + detect_satlas_wind_turbine: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 65536 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + s25: [] + s26: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + landsat5: [] + landsat6: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + s1a5: [] + s1a6: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_satlas_wind_turbine + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + val_config: + patch_size: 128 + tags: + split: val + detect_sentinel1_vessels: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/sentinel1_vessels/dataset_v1/20250602/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_sentinel1_vessels: + targets: targets + tasks: + detect_sentinel1_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + image_bands: + - 1 + - 1 + - 1 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.5 + test_config: + groups: + - val_ascending + - val_descending + patch_size: 128 + train_config: + groups: + - train_ascending + - train_descending + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 32768 + replacement: true + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_sentinel1_vessels + image_selectors: + - image + - sentinel1 + val_config: + groups: + - val_ascending + - val_descending + patch_size: 128 + detect_sentinel2_vessels: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/sentinel2_vessels/dataset_v1/20250213/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_sentinel2_vessels: + targets: targets + tasks: + detect_sentinel2_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + groups: + - sargassum_val + - split1 + - split7 + patch_size: 128 + train_config: + groups: + - sargassum_train + - split2 + - split3 + - split4 + - split5 + - split6 + - train + - train-bg + - train2 + - train3 + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 131072 + replacement: true + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_sentinel2_vessels + image_selectors: + - image + - sentinel2_l2a + val_config: + groups: + - sargassum_val + - split1 + - split7 + patch_size: 128 + vessel_detection: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/landsat_vessel_detection/detector/dataset_20250624 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + vessel_detection: + targets: targets + tasks: + vessel_detection: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.7 + test_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: val + train_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: train + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + val_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: val + num_workers: 16 + refill_batches: true + sample_mode: random_cycle +model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.0001 + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + decoder_to_target: + FasterRCNN: + - vessel_detection + - detect_satlas_marine_infra + - detect_satlas_wind_turbine + - detect_sentinel1_vessels + - detect_sentinel2_vessels + decoders: + FasterRCNN: + - class_path: rslearn.models.faster_rcnn.FasterRCNN + init_args: + anchor_sizes: + - - 32 + downsample_factors: + - 8 + num_channels: 768 + num_classes: 8 + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_lora_kwargs: + gen_hidden: 64 + task_lora_indices: + - 6 + - 7 + - 8 + - 9 + - 10 + - 11 + use_task_lora: true + task_moe_kwargs: + add_noise: true + expert_mult: 0.5 + noise_mult: 0.2 + num_experts: 4 + num_slots: 1 + task_moe_indices: + - 9 + - 10 + - 11 + use_task_moe: true + selector: + - encoder + task_embed_opts: + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct.pt + type: precomputed + lazy_decode: true + task_label_offsets: + detect_satlas_marine_infra: + num_outputs: 3 + offset: 2 + outputs_key: labels + detect_satlas_wind_turbine: + num_outputs: 3 + offset: 5 + outputs_key: labels + detect_sentinel1_vessels: + num_outputs: 2 + offset: 0 + outputs_key: labels + detect_sentinel2_vessels: + num_outputs: 2 + offset: 0 + outputs_key: labels + vessel_detection: + num_outputs: 2 + offset: 0 + outputs_key: labels + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 100 + eta_min: 0 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_marine_infra: + targets: targets + detect_satlas_wind_turbine: + targets: targets + detect_sentinel1_vessels: + targets: targets + detect_sentinel2_vessels: + targets: targets + vessel_detection: + targets: targets + tasks: + detect_satlas_marine_infra: + class_path: rslp.satlas.train.MarineInfraTask + init_args: + box_size: 15 + classes: + - unknown + - platform + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + - - 0.1 + - - 0.2 + - - 0.3 + - - 0.4 + - - 0.5 + - - 0.6 + - - 0.7 + - - 0.8 + - - 0.9 + image_bands: + - 2 + - 1 + - 0 + property_name: category + remap_values: + - - 0 + - 0.25 + - - 0 + - 255 + skip_unknown_categories: true + detect_satlas_wind_turbine: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + detect_sentinel1_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + image_bands: + - 1 + - 1 + - 1 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.5 + detect_sentinel2_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + vessel_detection: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.7 +rslp_experiment: placeholder +rslp_project: placeholder +trainer: + accumulate_grad_batches: 5 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: epoch + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + mode: min + monitor: val_loss + save_last: true + save_top_k: 1 + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - at_epoch: 0 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - at_epoch: 20 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - moe + - lora + - at_epoch: 40 + freeze_selectors: [] + unfreeze_selectors: + - head + - moe + - lora + - encoder + max_epochs: 200 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/OUT_segment.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/OUT_segment.yaml new file mode 100644 index 00000000..b0a4d6ea --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/OUT_segment.yaml @@ -0,0 +1,1328 @@ +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + batch_sizes: + segment: 2 + segment_satlas_solar_farm: 8 + data_modules: + segment: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 2 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_1: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_10: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_11: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_2: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_3: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_4: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_5: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_6: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_7: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_8: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_9: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1d_0: [] + s1d_1: [] + s1d_10: [] + s1d_11: [] + s1d_2: [] + s1d_3: [] + s1d_4: [] + s1d_5: [] + s1d_6: [] + s1d_7: [] + s1d_8: [] + s1d_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + s1d_0: + bands: + - vv + - vh + data_type: raster + layers: + - s1d + passthrough: true + s1d_1: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.1 + passthrough: true + s1d_10: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.10 + passthrough: true + s1d_11: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.11 + passthrough: true + s1d_2: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.2 + passthrough: true + s1d_3: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.3 + passthrough: true + s1d_4: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.4 + passthrough: true + s1d_5: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.5 + passthrough: true + s1d_6: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.6 + passthrough: true + s1d_7: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.7 + passthrough: true + s1d_8: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.8 + passthrough: true + s1d_9: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.9 + passthrough: true + targets: + bands: + - class + data_type: raster + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/pastis/rslearn_dataset/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + segment: + targets: targets + tasks: + segment: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_miou_metric: true + metric_kwargs: + average: micro + num_classes: 20 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + zero_is_invalid: true + test_config: + groups: + - fold5 + train_config: + groups: + - fold1 + - fold2 + - fold3 + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_1: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_10: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_11: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_2: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_3: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_4: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_5: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_6: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_7: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_8: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_9: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1d_0: [] + s1d_1: [] + s1d_10: [] + s1d_11: [] + s1d_2: [] + s1d_3: [] + s1d_4: [] + s1d_5: [] + s1d_6: [] + s1d_7: [] + s1d_8: [] + s1d_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + - target/segment/classes + - target/segment/valid + val_config: + groups: + - fold4 + segment_satlas_solar_farm: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + targets: + bands: + - label + data_type: raster + dtype: INT32 + is_target: true + layers: + - label_raster + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/solar_farm/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + segment_satlas_solar_farm: + targets: targets + tasks: + segment_satlas_solar_farm: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_f1_metric: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + metric_kwargs: + average: micro + num_classes: 2 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 16384 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - target/segment_satlas_solar_farm/classes + - target/segment_satlas_solar_farm/valid + val_config: + patch_size: 128 + tags: + split: val + num_workers: 16 + refill_batches: true + sample_mode: random_cycle +model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.0001 + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + decoder_to_target: + SegmentationHead: + - segment + - segment_satlas_solar_farm + decoders: + SegmentationHead: + - class_path: rslearn.models.unet.UNetDecoder + init_args: + conv_layers_per_resolution: 2 + in_channels: + - - 8 + - 768 + num_channels: + 1: 128 + 2: 256 + 4: 512 + 8: 512 + out_channels: 22 + - class_path: rslearn.train.tasks.segmentation.SegmentationHead + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_lora_kwargs: + gen_hidden: 64 + task_lora_indices: + - 6 + - 7 + - 8 + - 9 + - 10 + - 11 + use_task_lora: true + task_moe_kwargs: + add_noise: true + expert_mult: 0.5 + noise_mult: 0.2 + num_experts: 4 + num_slots: 1 + task_moe_indices: + - 9 + - 10 + - 11 + use_task_moe: true + selector: + - encoder + task_embed_opts: + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct.pt + type: precomputed + lazy_decode: true + task_label_offsets: + segment: + num_outputs: 20 + offset: 0 + outputs_key: classes + segment_satlas_solar_farm: + num_outputs: 2 + offset: 20 + outputs_key: classes + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 100 + eta_min: 0 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + segment: + targets: targets + segment_satlas_solar_farm: + targets: targets + tasks: + segment: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_miou_metric: true + metric_kwargs: + average: micro + num_classes: 20 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + zero_is_invalid: true + segment_satlas_solar_farm: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_f1_metric: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + metric_kwargs: + average: micro + num_classes: 2 + remap_values: + - - 0 + - 1 + - - 0 + - 255 +rslp_experiment: placeholder +rslp_project: placeholder +trainer: + accumulate_grad_batches: 2 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: epoch + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + mode: min + monitor: val_loss + save_last: true + save_top_k: 1 + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - at_epoch: 0 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - at_epoch: 20 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - moe + - lora + - at_epoch: 40 + freeze_selectors: [] + unfreeze_selectors: + - head + - moe + - lora + - encoder + max_epochs: 200 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/base.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/base.yaml new file mode 100644 index 00000000..9e0b4c50 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/base.yaml @@ -0,0 +1,76 @@ +model: + class_path: rslp.helios.lightning_module.MoELightningModule + init_args: + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: "{CHECKPOINT_PATH}" + selector: ["encoder"] + forward_kwargs: + patch_size: {PATCH_SIZE} + model_overrides: + encoder_config: + task_lora_kwargs: + use_task_lora: true + task_lora_indices: [6, 7, 8, 9, 10, 11] + gen_hidden: 64 + task_moe_kwargs: + use_task_moe: true + task_moe_indices: [9, 10, 11] + add_noise: true + noise_mult: 0.2 + num_experts: 4 + num_slots: 1 + expert_mult: 0.5 + task_embed_opts: + type: "precomputed" + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct.pt + decoders: # Filled in by make_multidataset_config.py + lazy_decode: true + lr: 0.0001 + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 100 + eta_min: 0 + +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + sample_mode: random_cycle + refill_batches: true + num_workers: 16 + data_modules: # Filled in by make_multidataset_config.py + +trainer: + max_epochs: 200 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: "epoch" + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + save_top_k: 1 + save_last: true + monitor: val_loss + mode: min + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - at_epoch: 0 + freeze_selectors: ["encoder"] + unfreeze_selectors: ["head"] + - at_epoch: 20 + freeze_selectors: ["encoder"] + unfreeze_selectors: ["head", "moe", "lora"] + - at_epoch: 40 + freeze_selectors: [] + unfreeze_selectors: ["head", "moe", "lora", "encoder"] + +rslp_project: placeholder +rslp_experiment: placeholder + +all_dataset_info_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v3_multitask/all_dataset_info.yaml \ No newline at end of file diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/classify.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/classify.yaml new file mode 100644 index 00000000..c5c07428 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/classify.yaml @@ -0,0 +1,23 @@ +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/OUT_classify.yaml + +dataset_cfgs: + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_classifier_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_nandi_crop_type/finetune_s1_s2_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_worldcereal_cropland/finetune_s1_s2_cosinelr.yaml + +substitutions: + patch_size: 8 + encoder_embedding_size: 768 + helios_checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + +global_overrides: + model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + trainer: + accumulate_grad_batches: 3 + +merge_options: + merge_heads: true + merge_task_labels: true + same_label_groups: diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/detect.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/detect.yaml new file mode 100644 index 00000000..67570232 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/detect.yaml @@ -0,0 +1,30 @@ +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/OUT_detect.yaml + +dataset_cfgs: + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_detector_cosinelr.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_marine_infra_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_marine_infra_128/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_wind_turbine_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_wind_turbine_128/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_helios.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel2_vessels_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel2_vessels_128/basecfg_helios.yaml + +substitutions: + patch_size: 8 + encoder_embedding_size: 768 + helios_checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + +global_overrides: + model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + trainer: + accumulate_grad_batches: 5 + +merge_options: + merge_heads: true + merge_task_labels: true + same_label_groups: + - [detect_sentinel1_vessels, detect_sentinel2_vessels, vessel_detection] diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/segment.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/segment.yaml new file mode 100644 index 00000000..5ab8b0ba --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/segment.yaml @@ -0,0 +1,24 @@ +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/OUT_segment.yaml + +dataset_cfgs: + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_pastis/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_pastis/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_solar_farm_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_solar_farm_128/basecfg_helios_mm.yaml + +global_overrides: + model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + trainer: + accumulate_grad_batches: 2 + +merge_options: + merge_heads: true + merge_task_labels: true + same_label_groups: + +substitutions: + patch_size: 8 + encoder_embedding_size: 768 + helios_checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 From d2ed8de588c16dcdd1fb31e59c46edd6adbe95e5 Mon Sep 17 00:00:00 2001 From: ryanp Date: Thu, 21 Aug 2025 03:54:10 +0000 Subject: [PATCH 05/16] Config updates --- .../configs/2025_07_31_moe/OUT_detect.yaml | 7 +- .../configs/2025_07_31_moe/detect.yaml | 8 +- .../configs/2025_08_12_task_lora/OUT_all.yaml | 3294 ++++++++++++++++ .../OUT_classify.yaml | 4 +- .../OUT_detect.yaml | 4 +- .../OUT_segment.yaml | 6 +- .../configs/2025_08_12_task_lora/all.yaml | 39 + .../base.yaml | 4 +- .../classify.yaml | 4 +- .../detect.yaml | 4 +- .../configs/2025_08_12_task_lora/exp_id.txt | 1 + .../segment.yaml | 6 +- .../OUT_classify.yaml | 13 +- .../OUT_detect.yaml | 13 +- .../OUT_segment.yaml | 13 +- .../base.yaml | 12 +- .../classify.yaml | 4 +- .../detect.yaml | 4 +- .../configs/2025_08_15_task_moe/exp_id.txt | 1 + .../segment.yaml | 4 +- .../configs/2025_08_18_task_all/OUT_all.yaml | 3312 +++++++++++++++++ .../OUT_classify.yaml | 15 +- .../OUT_detect.yaml | 15 +- .../OUT_segment.yaml | 17 +- .../configs/2025_08_18_task_all/all.yaml | 39 + .../base.yaml | 12 +- .../classify.yaml | 4 +- .../detect.yaml | 4 +- .../configs/2025_08_18_task_all/exp_id.txt | 1 + .../segment.yaml | 6 +- .../scripts/ckpt_to_distributed.py | 132 + .../scripts/make_all_configs.py | 2 +- .../scripts/make_task_embeds.py | 240 +- .../2025_07_joint_finetune/scripts/run.py | 7 +- .../2025_07_joint_finetune/scripts/run_all.py | 46 + rslp/utils/beaker.py | 2 +- 36 files changed, 7125 insertions(+), 174 deletions(-) create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/OUT_all.yaml rename one_off_projects/2025_07_joint_finetune/configs/{2025_08_12_embeds => 2025_08_12_task_lora}/OUT_classify.yaml (99%) rename one_off_projects/2025_07_joint_finetune/configs/{2025_08_12_embeds => 2025_08_12_task_lora}/OUT_detect.yaml (99%) rename one_off_projects/2025_07_joint_finetune/configs/{2025_08_12_embeds => 2025_08_12_task_lora}/OUT_segment.yaml (99%) create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/all.yaml rename one_off_projects/2025_07_joint_finetune/configs/{2025_08_12_embeds => 2025_08_12_task_lora}/base.yaml (98%) rename one_off_projects/2025_07_joint_finetune/configs/{2025_08_15_helios_moe => 2025_08_12_task_lora}/classify.yaml (87%) rename one_off_projects/2025_07_joint_finetune/configs/{2025_08_15_helios_moe => 2025_08_12_task_lora}/detect.yaml (92%) create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/exp_id.txt rename one_off_projects/2025_07_joint_finetune/configs/{2025_08_18_task => 2025_08_12_task_lora}/segment.yaml (86%) rename one_off_projects/2025_07_joint_finetune/configs/{2025_08_15_helios_moe => 2025_08_15_task_moe}/OUT_classify.yaml (99%) rename one_off_projects/2025_07_joint_finetune/configs/{2025_08_15_helios_moe => 2025_08_15_task_moe}/OUT_detect.yaml (99%) rename one_off_projects/2025_07_joint_finetune/configs/{2025_08_15_helios_moe => 2025_08_15_task_moe}/OUT_segment.yaml (99%) rename one_off_projects/2025_07_joint_finetune/configs/{2025_08_15_helios_moe => 2025_08_15_task_moe}/base.yaml (92%) rename one_off_projects/2025_07_joint_finetune/configs/{2025_08_12_embeds => 2025_08_15_task_moe}/classify.yaml (87%) rename one_off_projects/2025_07_joint_finetune/configs/{2025_08_12_embeds => 2025_08_15_task_moe}/detect.yaml (93%) create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/exp_id.txt rename one_off_projects/2025_07_joint_finetune/configs/{2025_08_12_embeds => 2025_08_15_task_moe}/segment.yaml (88%) create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/OUT_all.yaml rename one_off_projects/2025_07_joint_finetune/configs/{2025_08_18_task => 2025_08_18_task_all}/OUT_classify.yaml (99%) rename one_off_projects/2025_07_joint_finetune/configs/{2025_08_18_task => 2025_08_18_task_all}/OUT_detect.yaml (99%) rename one_off_projects/2025_07_joint_finetune/configs/{2025_08_18_task => 2025_08_18_task_all}/OUT_segment.yaml (99%) create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/all.yaml rename one_off_projects/2025_07_joint_finetune/configs/{2025_08_18_task => 2025_08_18_task_all}/base.yaml (90%) rename one_off_projects/2025_07_joint_finetune/configs/{2025_08_18_task => 2025_08_18_task_all}/classify.yaml (87%) rename one_off_projects/2025_07_joint_finetune/configs/{2025_08_18_task => 2025_08_18_task_all}/detect.yaml (93%) create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/exp_id.txt rename one_off_projects/2025_07_joint_finetune/configs/{2025_08_15_helios_moe => 2025_08_18_task_all}/segment.yaml (86%) create mode 100644 one_off_projects/2025_07_joint_finetune/scripts/ckpt_to_distributed.py create mode 100644 one_off_projects/2025_07_joint_finetune/scripts/run_all.py diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_07_31_moe/OUT_detect.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_07_31_moe/OUT_detect.yaml index 470336ee..08a0dca7 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_07_31_moe/OUT_detect.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_07_31_moe/OUT_detect.yaml @@ -1532,11 +1532,10 @@ model: - class_path: rslearn.models.trunk.MoETransformer init_args: dim: 768 - expert_mult: 2 n_heads: 12 - n_layers: 2 - num_experts: 8 - num_slots: 1 + n_layers: 1 + num_experts: 4 + num_slots: 4 task_embedding: class_path: rslearn.models.task_embedding.TaskChannelEmbedding init_args: diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_07_31_moe/detect.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_07_31_moe/detect.yaml index b3bcdad7..da4c59f5 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_07_31_moe/detect.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_07_31_moe/detect.yaml @@ -34,13 +34,11 @@ global_overrides: - class_path: rslearn.models.trunk.MoETransformer init_args: dim: 768 - n_layers: 2 + n_layers: 1 n_heads: 12 - num_experts: 8 - num_slots: 1 - expert_mult: 2 + num_experts: 4 + num_slots: 4 trainer: - limit_val_batches: 1024 accumulate_grad_batches: 5 merge_options: diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/OUT_all.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/OUT_all.yaml new file mode 100644 index 00000000..f94a8836 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/OUT_all.yaml @@ -0,0 +1,3294 @@ +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + batch_sizes: + crop_type_classification: 32 + cropland_classification: 16 + detect_satlas_marine_infra: 8 + detect_satlas_wind_turbine: 8 + detect_sentinel1_vessels: 8 + detect_sentinel2_vessels: 8 + segment_satlas_solar_farm: 8 + vessel_classification: 16 + vessel_detection: 8 + data_modules: + crop_type_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 32 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: [] + sentinel2_1: [] + sentinel2_10: [] + sentinel2_11: [] + sentinel2_2: [] + sentinel2_3: [] + sentinel2_4: [] + sentinel2_5: [] + sentinel2_6: [] + sentinel2_7: [] + sentinel2_8: [] + sentinel2_9: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + sentinel1_0: [] + sentinel1_1: [] + sentinel1_10: [] + sentinel1_11: [] + sentinel1_2: [] + sentinel1_3: [] + sentinel1_4: [] + sentinel1_5: [] + sentinel1_6: [] + sentinel1_7: [] + sentinel1_8: [] + sentinel1_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.pad.Pad + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + mode: center + size: 8 + inputs: + label: + data_type: vector + is_target: true + layers: + - label + sentinel1_0: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + sentinel1_1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + sentinel1_10: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.10 + passthrough: true + sentinel1_11: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.11 + passthrough: true + sentinel1_2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + sentinel1_3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + sentinel1_4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.4 + passthrough: true + sentinel1_5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.5 + passthrough: true + sentinel1_6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.6 + passthrough: true + sentinel1_7: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.7 + passthrough: true + sentinel1_8: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.8 + passthrough: true + sentinel1_9: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.9 + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/crop/kenya_nandi/20250625 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + crop_type_classification: + label: targets + tasks: + crop_type_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Coffee + - Trees + - Grassland + - Maize + - Sugarcane + - Tea + - Water + - Built-up + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + test_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: val + train_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: train + val_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: val + cropland_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 16 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: [] + sentinel2_1: [] + sentinel2_10: [] + sentinel2_11: [] + sentinel2_2: [] + sentinel2_3: [] + sentinel2_4: [] + sentinel2_5: [] + sentinel2_6: [] + sentinel2_7: [] + sentinel2_8: [] + sentinel2_9: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + sentinel1_0: [] + sentinel1_1: [] + sentinel1_10: [] + sentinel1_11: [] + sentinel1_2: [] + sentinel1_3: [] + sentinel1_4: [] + sentinel1_5: [] + sentinel1_6: [] + sentinel1_7: [] + sentinel1_8: [] + sentinel1_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.pad.Pad + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + mode: center + size: 8 + inputs: + label: + data_type: vector + is_target: true + layers: + - label + sentinel1_0: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1 + passthrough: true + sentinel1_1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.1 + passthrough: true + sentinel1_10: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.10 + passthrough: true + sentinel1_11: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.11 + passthrough: true + sentinel1_2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.2 + passthrough: true + sentinel1_3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.3 + passthrough: true + sentinel1_4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.4 + passthrough: true + sentinel1_5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.5 + passthrough: true + sentinel1_6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.6 + passthrough: true + sentinel1_7: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.7 + passthrough: true + sentinel1_8: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.8 + passthrough: true + sentinel1_9: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.9 + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/crop/worldcereal_cropland/20250626 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + cropland_classification: + label: targets + tasks: + cropland_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Cropland + - Non-Cropland + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + test_config: + groups: + - h3_sample100_66K + tags: + split: val + train_config: + groups: + - h3_sample100_66K + tags: + split: train + val_config: + groups: + - h3_sample100_66K + tags: + split: val + detect_satlas_marine_infra: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/marine_infra/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_marine_infra: + targets: targets + tasks: + detect_satlas_marine_infra: + class_path: rslp.satlas.train.MarineInfraTask + init_args: + box_size: 15 + classes: + - unknown + - platform + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + - - 0.1 + - - 0.2 + - - 0.3 + - - 0.4 + - - 0.5 + - - 0.6 + - - 0.7 + - - 0.8 + - - 0.9 + image_bands: + - 2 + - 1 + - 0 + property_name: category + remap_values: + - - 0 + - 0.25 + - - 0 + - 255 + skip_unknown_categories: true + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 65536 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_satlas_marine_infra + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + val_config: + patch_size: 128 + tags: + split: val + detect_satlas_wind_turbine: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + s25: [] + s26: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + landsat5: [] + landsat6: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + s1a5: [] + s1a6: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + landsat5: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.4 + passthrough: true + landsat6: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.5 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1a5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.4 + passthrough: true + s1a6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.5 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s1d5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.4 + passthrough: true + s1d6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.5 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + s25: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + s26: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/wind_turbine/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_wind_turbine: + targets: targets + tasks: + detect_satlas_wind_turbine: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 65536 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + s25: [] + s26: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + landsat5: [] + landsat6: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + s1a5: [] + s1a6: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_satlas_wind_turbine + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + val_config: + patch_size: 128 + tags: + split: val + detect_sentinel1_vessels: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/sentinel1_vessels/dataset_v1/20250602/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_sentinel1_vessels: + targets: targets + tasks: + detect_sentinel1_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + image_bands: + - 1 + - 1 + - 1 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.5 + test_config: + groups: + - val_ascending + - val_descending + patch_size: 128 + train_config: + groups: + - train_ascending + - train_descending + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 32768 + replacement: true + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_sentinel1_vessels + image_selectors: + - image + - sentinel1 + val_config: + groups: + - val_ascending + - val_descending + patch_size: 128 + detect_sentinel2_vessels: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/sentinel2_vessels/dataset_v1/20250213/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_sentinel2_vessels: + targets: targets + tasks: + detect_sentinel2_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + groups: + - sargassum_val + - split1 + - split7 + patch_size: 128 + train_config: + groups: + - sargassum_train + - split2 + - split3 + - split4 + - split5 + - split6 + - train + - train-bg + - train2 + - train3 + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 131072 + replacement: true + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_sentinel2_vessels + image_selectors: + - image + - sentinel2_l2a + val_config: + groups: + - sargassum_val + - split1 + - split7 + patch_size: 128 + segment_satlas_solar_farm: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + targets: + bands: + - label + data_type: raster + dtype: INT32 + is_target: true + layers: + - label_raster + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/solar_farm/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + segment_satlas_solar_farm: + targets: targets + tasks: + segment_satlas_solar_farm: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_f1_metric: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + metric_kwargs: + average: micro + num_classes: 2 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 16384 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - target/segment_satlas_solar_farm/classes + - target/segment_satlas_solar_farm/valid + val_config: + patch_size: 128 + tags: + split: val + vessel_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 16 + default_config: + transforms: + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + label: + data_type: vector + is_target: true + layers: + - label + landsat: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/landsat_vessel_detection/classifier/dataset_20250624 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + vessel_classification: + label: targets + tasks: + vessel_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + allow_invalid: true + classes: + - correct + - incorrect + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: label + skip_unknown_categories: true + test_config: + groups: + - phase2a_completed + tags: + split: val + train_config: + groups: + - selected_copy + - phase2a_completed + - phase3a_selected + tags: + split: train + val_config: + groups: + - phase2a_completed + tags: + split: val + vessel_detection: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/landsat_vessel_detection/detector/dataset_20250624 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + vessel_detection: + targets: targets + tasks: + vessel_detection: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.7 + test_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: val + train_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: train + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + val_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: val + num_workers: 16 + refill_batches: true + sample_mode: random_cycle +model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.0001 + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + decoder_to_target: + ClassificationHead: + - vessel_classification + - crop_type_classification + - cropland_classification + FasterRCNN: + - vessel_detection + - detect_satlas_marine_infra + - detect_satlas_wind_turbine + - detect_sentinel1_vessels + - detect_sentinel2_vessels + SegmentationHead: + - segment_satlas_solar_farm + decoders: + ClassificationHead: + - class_path: rslearn.models.pooling_decoder.PoolingDecoder + init_args: + in_channels: 768 + out_channels: 12 + - class_path: rslearn.train.tasks.classification.ClassificationHead + FasterRCNN: + - class_path: rslearn.models.faster_rcnn.FasterRCNN + init_args: + anchor_sizes: + - - 32 + downsample_factors: + - 8 + num_channels: 768 + num_classes: 8 + SegmentationHead: + - class_path: rslearn.models.unet.UNetDecoder + init_args: + conv_layers_per_resolution: 2 + in_channels: + - - 8 + - 768 + num_channels: + 1: 128 + 2: 256 + 4: 512 + 8: 512 + out_channels: 2 + - class_path: rslearn.train.tasks.segmentation.SegmentationHead + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_lora_kwargs: + gen_hidden: 64 + task_lora_indices: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 10 + - 11 + use_task_lora: true + selector: + - encoder + task_embed_opts: + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct.pt + type: precomputed + lazy_decode: true + task_label_offsets: + crop_type_classification: + num_outputs: 8 + offset: 2 + outputs_key: class + cropland_classification: + num_outputs: 2 + offset: 10 + outputs_key: class + detect_satlas_marine_infra: + num_outputs: 3 + offset: 2 + outputs_key: labels + detect_satlas_wind_turbine: + num_outputs: 3 + offset: 5 + outputs_key: labels + detect_sentinel1_vessels: + num_outputs: 2 + offset: 0 + outputs_key: labels + detect_sentinel2_vessels: + num_outputs: 2 + offset: 0 + outputs_key: labels + segment_satlas_solar_farm: + num_outputs: 2 + offset: 0 + outputs_key: classes + vessel_classification: + num_outputs: 2 + offset: 0 + outputs_key: class + vessel_detection: + num_outputs: 2 + offset: 0 + outputs_key: labels + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 50 + eta_min: 0 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + crop_type_classification: + label: targets + cropland_classification: + label: targets + detect_satlas_marine_infra: + targets: targets + detect_satlas_wind_turbine: + targets: targets + detect_sentinel1_vessels: + targets: targets + detect_sentinel2_vessels: + targets: targets + segment_satlas_solar_farm: + targets: targets + vessel_classification: + label: targets + vessel_detection: + targets: targets + tasks: + crop_type_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Coffee + - Trees + - Grassland + - Maize + - Sugarcane + - Tea + - Water + - Built-up + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + cropland_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Cropland + - Non-Cropland + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + detect_satlas_marine_infra: + class_path: rslp.satlas.train.MarineInfraTask + init_args: + box_size: 15 + classes: + - unknown + - platform + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + - - 0.1 + - - 0.2 + - - 0.3 + - - 0.4 + - - 0.5 + - - 0.6 + - - 0.7 + - - 0.8 + - - 0.9 + image_bands: + - 2 + - 1 + - 0 + property_name: category + remap_values: + - - 0 + - 0.25 + - - 0 + - 255 + skip_unknown_categories: true + detect_satlas_wind_turbine: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + detect_sentinel1_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + image_bands: + - 1 + - 1 + - 1 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.5 + detect_sentinel2_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + segment_satlas_solar_farm: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_f1_metric: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + metric_kwargs: + average: micro + num_classes: 2 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + vessel_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + allow_invalid: true + classes: + - correct + - incorrect + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: label + skip_unknown_categories: true + vessel_detection: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.7 +rslp_experiment: placeholder +rslp_project: placeholder +trainer: + accumulate_grad_batches: 9 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: epoch + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + mode: min + monitor: val_loss + save_last: true + save_top_k: 1 + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - at_epoch: 0 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - at_epoch: 20 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - lora + max_epochs: 500 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/OUT_classify.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/OUT_classify.yaml similarity index 99% rename from one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/OUT_classify.yaml rename to one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/OUT_classify.yaml index cbfb635e..8367d7a9 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/OUT_classify.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/OUT_classify.yaml @@ -1049,7 +1049,7 @@ model: scheduler: class_path: rslearn.train.scheduler.CosineAnnealingScheduler init_args: - T_max: 100 + T_max: 50 eta_min: 0 task: class_path: rslearn.train.tasks.multi_task.MultiTask @@ -1128,4 +1128,4 @@ trainer: unfreeze_selectors: - head - lora - max_epochs: 200 + max_epochs: 500 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/OUT_detect.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/OUT_detect.yaml similarity index 99% rename from one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/OUT_detect.yaml rename to one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/OUT_detect.yaml index 71107a27..cb4367dc 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/OUT_detect.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/OUT_detect.yaml @@ -1549,7 +1549,7 @@ model: scheduler: class_path: rslearn.train.scheduler.CosineAnnealingScheduler init_args: - T_max: 100 + T_max: 50 eta_min: 0 task: class_path: rslearn.train.tasks.multi_task.MultiTask @@ -1775,4 +1775,4 @@ trainer: unfreeze_selectors: - head - lora - max_epochs: 200 + max_epochs: 500 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/OUT_segment.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/OUT_segment.yaml similarity index 99% rename from one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/OUT_segment.yaml rename to one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/OUT_segment.yaml index 5d8ba653..6d457bad 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/OUT_segment.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/OUT_segment.yaml @@ -1172,7 +1172,7 @@ data: model: class_path: rslearn.train.lightning_module.RslearnLightningModule init_args: - lr: 0.0001 + lr: 0.0002 model: class_path: rslearn.models.multitask.MultiTaskMergedModel init_args: @@ -1237,7 +1237,7 @@ model: scheduler: class_path: rslearn.train.scheduler.CosineAnnealingScheduler init_args: - T_max: 100 + T_max: 50 eta_min: 0 task: class_path: rslearn.train.tasks.multi_task.MultiTask @@ -1312,4 +1312,4 @@ trainer: unfreeze_selectors: - head - lora - max_epochs: 200 + max_epochs: 500 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/all.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/all.yaml new file mode 100644 index 00000000..83686b8f --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/all.yaml @@ -0,0 +1,39 @@ +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/OUT_all.yaml + +dataset_cfgs: + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_classifier_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_nandi_crop_type/finetune_s1_s2_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_worldcereal_cropland/finetune_s1_s2_cosinelr.yaml + + # - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_pastis/basecfg_cosinelr.yaml + # - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_pastis/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_solar_farm_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_solar_farm_128/basecfg_helios_mm.yaml + + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_detector_cosinelr.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_marine_infra_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_marine_infra_128/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_wind_turbine_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_wind_turbine_128/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_helios.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel2_vessels_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel2_vessels_128/basecfg_helios.yaml + +substitutions: + patch_size: 8 + encoder_embedding_size: 768 + helios_checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + +global_overrides: + model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + trainer: + accumulate_grad_batches: 9 + +merge_options: + merge_heads: true + merge_task_labels: true + same_label_groups: + - [detect_sentinel1_vessels, detect_sentinel2_vessels, vessel_detection] \ No newline at end of file diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/base.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/base.yaml similarity index 98% rename from one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/base.yaml rename to one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/base.yaml index eaa7c9ac..17ed45c8 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/base.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/base.yaml @@ -26,7 +26,7 @@ model: scheduler: class_path: rslearn.train.scheduler.CosineAnnealingScheduler init_args: - T_max: 100 + T_max: 50 eta_min: 0 data: @@ -38,7 +38,7 @@ data: data_modules: # Filled in by make_multidataset_config.py trainer: - max_epochs: 200 + max_epochs: 500 callbacks: - class_path: lightning.pytorch.callbacks.LearningRateMonitor init_args: diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/classify.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/classify.yaml similarity index 87% rename from one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/classify.yaml rename to one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/classify.yaml index 062576c6..2ac43c09 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/classify.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/classify.yaml @@ -1,5 +1,5 @@ -base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/base.yaml -output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/OUT_classify.yaml +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/OUT_classify.yaml dataset_cfgs: - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_classifier_cosinelr.yaml diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/detect.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/detect.yaml similarity index 92% rename from one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/detect.yaml rename to one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/detect.yaml index da2867f9..ffe67a94 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/detect.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/detect.yaml @@ -1,5 +1,5 @@ -base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/base.yaml -output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/OUT_detect.yaml +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/OUT_detect.yaml dataset_cfgs: - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_detector_cosinelr.yaml diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/exp_id.txt b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/exp_id.txt new file mode 100644 index 00000000..42e6ff8e --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/exp_id.txt @@ -0,0 +1 @@ +{task}_lora_v4_cyclic \ No newline at end of file diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/segment.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/segment.yaml similarity index 86% rename from one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/segment.yaml rename to one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/segment.yaml index 5ab8b0ba..92288ede 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/segment.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/segment.yaml @@ -1,5 +1,5 @@ -base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/base.yaml -output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/OUT_segment.yaml +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/OUT_segment.yaml dataset_cfgs: - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_pastis/basecfg_cosinelr.yaml @@ -10,6 +10,8 @@ dataset_cfgs: global_overrides: model: class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.0002 trainer: accumulate_grad_batches: 2 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/OUT_classify.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/OUT_classify.yaml similarity index 99% rename from one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/OUT_classify.yaml rename to one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/OUT_classify.yaml index ec8f07e7..86dc3b91 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/OUT_classify.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/OUT_classify.yaml @@ -987,7 +987,7 @@ data: model: class_path: rslearn.train.lightning_module.RslearnLightningModule init_args: - lr: 0.0001 + lr: 0.0002 model: class_path: rslearn.models.multitask.MultiTaskMergedModel init_args: @@ -1013,14 +1013,11 @@ model: encoder_config: task_moe_kwargs: add_noise: true - expert_mult: 0.5 + expert_mult: 1 noise_mult: 0.2 num_experts: 4 - num_slots: 1 + num_slots: 4 task_moe_indices: - - 6 - - 7 - - 8 - 9 - 10 - 11 @@ -1047,7 +1044,7 @@ model: scheduler: class_path: rslearn.train.scheduler.CosineAnnealingScheduler init_args: - T_max: 100 + T_max: 50 eta_min: 0 task: class_path: rslearn.train.tasks.multi_task.MultiTask @@ -1132,4 +1129,4 @@ trainer: - head - moe - encoder - max_epochs: 200 + max_epochs: 500 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/OUT_detect.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/OUT_detect.yaml similarity index 99% rename from one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/OUT_detect.yaml rename to one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/OUT_detect.yaml index 0e86b06d..96564209 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/OUT_detect.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/OUT_detect.yaml @@ -1474,7 +1474,7 @@ data: model: class_path: rslearn.train.lightning_module.RslearnLightningModule init_args: - lr: 0.0001 + lr: 0.0002 model: class_path: rslearn.models.multitask.MultiTaskMergedModel init_args: @@ -1505,14 +1505,11 @@ model: encoder_config: task_moe_kwargs: add_noise: true - expert_mult: 0.5 + expert_mult: 1 noise_mult: 0.2 num_experts: 4 - num_slots: 1 + num_slots: 4 task_moe_indices: - - 6 - - 7 - - 8 - 9 - 10 - 11 @@ -1547,7 +1544,7 @@ model: scheduler: class_path: rslearn.train.scheduler.CosineAnnealingScheduler init_args: - T_max: 100 + T_max: 50 eta_min: 0 task: class_path: rslearn.train.tasks.multi_task.MultiTask @@ -1779,4 +1776,4 @@ trainer: - head - moe - encoder - max_epochs: 200 + max_epochs: 500 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/OUT_segment.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/OUT_segment.yaml similarity index 99% rename from one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/OUT_segment.yaml rename to one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/OUT_segment.yaml index 2083eb53..72112e54 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/OUT_segment.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/OUT_segment.yaml @@ -1172,7 +1172,7 @@ data: model: class_path: rslearn.train.lightning_module.RslearnLightningModule init_args: - lr: 0.0001 + lr: 0.0002 model: class_path: rslearn.models.multitask.MultiTaskMergedModel init_args: @@ -1205,14 +1205,11 @@ model: encoder_config: task_moe_kwargs: add_noise: true - expert_mult: 0.5 + expert_mult: 1 noise_mult: 0.2 num_experts: 4 - num_slots: 1 + num_slots: 4 task_moe_indices: - - 6 - - 7 - - 8 - 9 - 10 - 11 @@ -1235,7 +1232,7 @@ model: scheduler: class_path: rslearn.train.scheduler.CosineAnnealingScheduler init_args: - T_max: 100 + T_max: 50 eta_min: 0 task: class_path: rslearn.train.tasks.multi_task.MultiTask @@ -1316,4 +1313,4 @@ trainer: - head - moe - encoder - max_epochs: 200 + max_epochs: 500 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/base.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/base.yaml similarity index 92% rename from one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/base.yaml rename to one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/base.yaml index 58001e84..68c84047 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/base.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/base.yaml @@ -15,22 +15,22 @@ model: encoder_config: task_moe_kwargs: use_task_moe: true - task_moe_indices: [6, 7, 8, 9, 10, 11] + task_moe_indices: [9, 10, 11] add_noise: true noise_mult: 0.2 num_experts: 4 - num_slots: 1 - expert_mult: 0.5 + num_slots: 4 + expert_mult: 1 task_embed_opts: type: "precomputed" path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct.pt decoders: # Filled in by make_multidataset_config.py lazy_decode: true - lr: 0.0001 + lr: 0.0002 scheduler: class_path: rslearn.train.scheduler.CosineAnnealingScheduler init_args: - T_max: 100 + T_max: 50 eta_min: 0 data: @@ -42,7 +42,7 @@ data: data_modules: # Filled in by make_multidataset_config.py trainer: - max_epochs: 200 + max_epochs: 500 callbacks: - class_path: lightning.pytorch.callbacks.LearningRateMonitor init_args: diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/classify.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/classify.yaml similarity index 87% rename from one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/classify.yaml rename to one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/classify.yaml index ceeaf0d0..30cfb36a 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/classify.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/classify.yaml @@ -1,5 +1,5 @@ -base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/base.yaml -output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/OUT_classify.yaml +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/OUT_classify.yaml dataset_cfgs: - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_classifier_cosinelr.yaml diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/detect.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/detect.yaml similarity index 93% rename from one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/detect.yaml rename to one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/detect.yaml index c6d858a1..0983bb22 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/detect.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/detect.yaml @@ -1,5 +1,5 @@ -base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/base.yaml -output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/OUT_detect.yaml +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/OUT_detect.yaml dataset_cfgs: - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_detector_cosinelr.yaml diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/exp_id.txt b/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/exp_id.txt new file mode 100644 index 00000000..fa20d963 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/exp_id.txt @@ -0,0 +1 @@ +{task}_task_moe_v3freeze_cyclic \ No newline at end of file diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/segment.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/segment.yaml similarity index 88% rename from one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/segment.yaml rename to one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/segment.yaml index 88e708d3..3999f768 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/segment.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/segment.yaml @@ -1,5 +1,5 @@ -base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/base.yaml -output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/OUT_segment.yaml +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/OUT_segment.yaml dataset_cfgs: - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_pastis/basecfg_cosinelr.yaml diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/OUT_all.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/OUT_all.yaml new file mode 100644 index 00000000..235694cb --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/OUT_all.yaml @@ -0,0 +1,3312 @@ +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + batch_sizes: + crop_type_classification: 32 + cropland_classification: 16 + detect_satlas_marine_infra: 8 + detect_satlas_wind_turbine: 8 + detect_sentinel1_vessels: 8 + detect_sentinel2_vessels: 8 + segment_satlas_solar_farm: 8 + vessel_classification: 16 + vessel_detection: 8 + data_modules: + crop_type_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 32 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: [] + sentinel2_1: [] + sentinel2_10: [] + sentinel2_11: [] + sentinel2_2: [] + sentinel2_3: [] + sentinel2_4: [] + sentinel2_5: [] + sentinel2_6: [] + sentinel2_7: [] + sentinel2_8: [] + sentinel2_9: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + sentinel1_0: [] + sentinel1_1: [] + sentinel1_10: [] + sentinel1_11: [] + sentinel1_2: [] + sentinel1_3: [] + sentinel1_4: [] + sentinel1_5: [] + sentinel1_6: [] + sentinel1_7: [] + sentinel1_8: [] + sentinel1_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.pad.Pad + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + mode: center + size: 8 + inputs: + label: + data_type: vector + is_target: true + layers: + - label + sentinel1_0: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + sentinel1_1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + sentinel1_10: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.10 + passthrough: true + sentinel1_11: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.11 + passthrough: true + sentinel1_2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + sentinel1_3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + sentinel1_4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.4 + passthrough: true + sentinel1_5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.5 + passthrough: true + sentinel1_6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.6 + passthrough: true + sentinel1_7: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.7 + passthrough: true + sentinel1_8: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.8 + passthrough: true + sentinel1_9: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.9 + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/crop/kenya_nandi/20250625 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + crop_type_classification: + label: targets + tasks: + crop_type_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Coffee + - Trees + - Grassland + - Maize + - Sugarcane + - Tea + - Water + - Built-up + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + test_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: val + train_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: train + val_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: val + cropland_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 16 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: [] + sentinel2_1: [] + sentinel2_10: [] + sentinel2_11: [] + sentinel2_2: [] + sentinel2_3: [] + sentinel2_4: [] + sentinel2_5: [] + sentinel2_6: [] + sentinel2_7: [] + sentinel2_8: [] + sentinel2_9: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + sentinel1_0: [] + sentinel1_1: [] + sentinel1_10: [] + sentinel1_11: [] + sentinel1_2: [] + sentinel1_3: [] + sentinel1_4: [] + sentinel1_5: [] + sentinel1_6: [] + sentinel1_7: [] + sentinel1_8: [] + sentinel1_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.pad.Pad + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + mode: center + size: 8 + inputs: + label: + data_type: vector + is_target: true + layers: + - label + sentinel1_0: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1 + passthrough: true + sentinel1_1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.1 + passthrough: true + sentinel1_10: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.10 + passthrough: true + sentinel1_11: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.11 + passthrough: true + sentinel1_2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.2 + passthrough: true + sentinel1_3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.3 + passthrough: true + sentinel1_4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.4 + passthrough: true + sentinel1_5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.5 + passthrough: true + sentinel1_6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.6 + passthrough: true + sentinel1_7: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.7 + passthrough: true + sentinel1_8: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.8 + passthrough: true + sentinel1_9: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.9 + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/crop/worldcereal_cropland/20250626 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + cropland_classification: + label: targets + tasks: + cropland_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Cropland + - Non-Cropland + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + test_config: + groups: + - h3_sample100_66K + tags: + split: val + train_config: + groups: + - h3_sample100_66K + tags: + split: train + val_config: + groups: + - h3_sample100_66K + tags: + split: val + detect_satlas_marine_infra: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/marine_infra/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_marine_infra: + targets: targets + tasks: + detect_satlas_marine_infra: + class_path: rslp.satlas.train.MarineInfraTask + init_args: + box_size: 15 + classes: + - unknown + - platform + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + - - 0.1 + - - 0.2 + - - 0.3 + - - 0.4 + - - 0.5 + - - 0.6 + - - 0.7 + - - 0.8 + - - 0.9 + image_bands: + - 2 + - 1 + - 0 + property_name: category + remap_values: + - - 0 + - 0.25 + - - 0 + - 255 + skip_unknown_categories: true + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 65536 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_satlas_marine_infra + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + val_config: + patch_size: 128 + tags: + split: val + detect_satlas_wind_turbine: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + s25: [] + s26: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + landsat5: [] + landsat6: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + s1a5: [] + s1a6: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + landsat5: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.4 + passthrough: true + landsat6: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.5 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1a5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.4 + passthrough: true + s1a6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.5 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s1d5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.4 + passthrough: true + s1d6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.5 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + s25: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + s26: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/wind_turbine/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_wind_turbine: + targets: targets + tasks: + detect_satlas_wind_turbine: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 65536 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + s25: [] + s26: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + landsat5: [] + landsat6: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + s1a5: [] + s1a6: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_satlas_wind_turbine + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + val_config: + patch_size: 128 + tags: + split: val + detect_sentinel1_vessels: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/sentinel1_vessels/dataset_v1/20250602/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_sentinel1_vessels: + targets: targets + tasks: + detect_sentinel1_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + image_bands: + - 1 + - 1 + - 1 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.5 + test_config: + groups: + - val_ascending + - val_descending + patch_size: 128 + train_config: + groups: + - train_ascending + - train_descending + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 32768 + replacement: true + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_sentinel1_vessels + image_selectors: + - image + - sentinel1 + val_config: + groups: + - val_ascending + - val_descending + patch_size: 128 + detect_sentinel2_vessels: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/sentinel2_vessels/dataset_v1/20250213/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_sentinel2_vessels: + targets: targets + tasks: + detect_sentinel2_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + groups: + - sargassum_val + - split1 + - split7 + patch_size: 128 + train_config: + groups: + - sargassum_train + - split2 + - split3 + - split4 + - split5 + - split6 + - train + - train-bg + - train2 + - train3 + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 131072 + replacement: true + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_sentinel2_vessels + image_selectors: + - image + - sentinel2_l2a + val_config: + groups: + - sargassum_val + - split1 + - split7 + patch_size: 128 + segment_satlas_solar_farm: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + targets: + bands: + - label + data_type: raster + dtype: INT32 + is_target: true + layers: + - label_raster + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/solar_farm/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + segment_satlas_solar_farm: + targets: targets + tasks: + segment_satlas_solar_farm: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_f1_metric: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + metric_kwargs: + average: micro + num_classes: 2 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 16384 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - target/segment_satlas_solar_farm/classes + - target/segment_satlas_solar_farm/valid + val_config: + patch_size: 128 + tags: + split: val + vessel_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 16 + default_config: + transforms: + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + label: + data_type: vector + is_target: true + layers: + - label + landsat: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/landsat_vessel_detection/classifier/dataset_20250624 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + vessel_classification: + label: targets + tasks: + vessel_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + allow_invalid: true + classes: + - correct + - incorrect + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: label + skip_unknown_categories: true + test_config: + groups: + - phase2a_completed + tags: + split: val + train_config: + groups: + - selected_copy + - phase2a_completed + - phase3a_selected + tags: + split: train + val_config: + groups: + - phase2a_completed + tags: + split: val + vessel_detection: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/landsat_vessel_detection/detector/dataset_20250624 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + vessel_detection: + targets: targets + tasks: + vessel_detection: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.7 + test_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: val + train_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: train + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + val_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: val + num_workers: 16 + refill_batches: true + sample_mode: random_cycle +model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.0001 + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + decoder_to_target: + ClassificationHead: + - vessel_classification + - crop_type_classification + - cropland_classification + FasterRCNN: + - vessel_detection + - detect_satlas_marine_infra + - detect_satlas_wind_turbine + - detect_sentinel1_vessels + - detect_sentinel2_vessels + SegmentationHead: + - segment_satlas_solar_farm + decoders: + ClassificationHead: + - class_path: rslearn.models.pooling_decoder.PoolingDecoder + init_args: + in_channels: 768 + out_channels: 12 + - class_path: rslearn.train.tasks.classification.ClassificationHead + FasterRCNN: + - class_path: rslearn.models.faster_rcnn.FasterRCNN + init_args: + anchor_sizes: + - - 32 + downsample_factors: + - 8 + num_channels: 768 + num_classes: 8 + SegmentationHead: + - class_path: rslearn.models.unet.UNetDecoder + init_args: + conv_layers_per_resolution: 2 + in_channels: + - - 8 + - 768 + num_channels: + 1: 128 + 2: 256 + 4: 512 + 8: 512 + out_channels: 2 + - class_path: rslearn.train.tasks.segmentation.SegmentationHead + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_lora_kwargs: + gen_hidden: 64 + task_lora_indices: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 10 + - 11 + use_task_lora: true + task_moe_kwargs: + add_noise: true + expert_mult: 4 + noise_mult: 0.2 + num_experts: 4 + num_slots: 4 + task_moe_indices: + - 11 + use_task_moe: true + selector: + - encoder + task_embed_opts: + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct.pt + type: precomputed + lazy_decode: true + task_label_offsets: + crop_type_classification: + num_outputs: 8 + offset: 2 + outputs_key: class + cropland_classification: + num_outputs: 2 + offset: 10 + outputs_key: class + detect_satlas_marine_infra: + num_outputs: 3 + offset: 2 + outputs_key: labels + detect_satlas_wind_turbine: + num_outputs: 3 + offset: 5 + outputs_key: labels + detect_sentinel1_vessels: + num_outputs: 2 + offset: 0 + outputs_key: labels + detect_sentinel2_vessels: + num_outputs: 2 + offset: 0 + outputs_key: labels + segment_satlas_solar_farm: + num_outputs: 2 + offset: 0 + outputs_key: classes + vessel_classification: + num_outputs: 2 + offset: 0 + outputs_key: class + vessel_detection: + num_outputs: 2 + offset: 0 + outputs_key: labels + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 50 + eta_min: 0 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + crop_type_classification: + label: targets + cropland_classification: + label: targets + detect_satlas_marine_infra: + targets: targets + detect_satlas_wind_turbine: + targets: targets + detect_sentinel1_vessels: + targets: targets + detect_sentinel2_vessels: + targets: targets + segment_satlas_solar_farm: + targets: targets + vessel_classification: + label: targets + vessel_detection: + targets: targets + tasks: + crop_type_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Coffee + - Trees + - Grassland + - Maize + - Sugarcane + - Tea + - Water + - Built-up + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + cropland_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Cropland + - Non-Cropland + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + detect_satlas_marine_infra: + class_path: rslp.satlas.train.MarineInfraTask + init_args: + box_size: 15 + classes: + - unknown + - platform + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + - - 0.1 + - - 0.2 + - - 0.3 + - - 0.4 + - - 0.5 + - - 0.6 + - - 0.7 + - - 0.8 + - - 0.9 + image_bands: + - 2 + - 1 + - 0 + property_name: category + remap_values: + - - 0 + - 0.25 + - - 0 + - 255 + skip_unknown_categories: true + detect_satlas_wind_turbine: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + detect_sentinel1_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + image_bands: + - 1 + - 1 + - 1 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.5 + detect_sentinel2_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + segment_satlas_solar_farm: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_f1_metric: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + metric_kwargs: + average: micro + num_classes: 2 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + vessel_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + allow_invalid: true + classes: + - correct + - incorrect + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: label + skip_unknown_categories: true + vessel_detection: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.7 +rslp_experiment: placeholder +rslp_project: placeholder +trainer: + accumulate_grad_batches: 9 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: epoch + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + mode: min + monitor: val_loss + save_last: true + save_top_k: 1 + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - at_epoch: 0 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - moe + - at_epoch: 20 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - moe + - lora + - at_epoch: 40 + freeze_selectors: [] + unfreeze_selectors: + - head + - moe + - lora + - encoder + max_epochs: 200 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/OUT_classify.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/OUT_classify.yaml similarity index 99% rename from one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/OUT_classify.yaml rename to one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/OUT_classify.yaml index 5422c624..16e0cf6a 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/OUT_classify.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/OUT_classify.yaml @@ -1014,6 +1014,12 @@ model: task_lora_kwargs: gen_hidden: 64 task_lora_indices: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 - 6 - 7 - 8 @@ -1023,13 +1029,11 @@ model: use_task_lora: true task_moe_kwargs: add_noise: true - expert_mult: 0.5 + expert_mult: 4 noise_mult: 0.2 num_experts: 4 - num_slots: 1 + num_slots: 4 task_moe_indices: - - 9 - - 10 - 11 use_task_moe: true selector: @@ -1054,7 +1058,7 @@ model: scheduler: class_path: rslearn.train.scheduler.CosineAnnealingScheduler init_args: - T_max: 100 + T_max: 50 eta_min: 0 task: class_path: rslearn.train.tasks.multi_task.MultiTask @@ -1127,6 +1131,7 @@ trainer: - encoder unfreeze_selectors: - head + - moe - at_epoch: 20 freeze_selectors: - encoder diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/OUT_detect.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/OUT_detect.yaml similarity index 99% rename from one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/OUT_detect.yaml rename to one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/OUT_detect.yaml index 4ab4800f..82964d14 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/OUT_detect.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/OUT_detect.yaml @@ -1506,6 +1506,12 @@ model: task_lora_kwargs: gen_hidden: 64 task_lora_indices: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 - 6 - 7 - 8 @@ -1515,13 +1521,11 @@ model: use_task_lora: true task_moe_kwargs: add_noise: true - expert_mult: 0.5 + expert_mult: 4 noise_mult: 0.2 num_experts: 4 - num_slots: 1 + num_slots: 4 task_moe_indices: - - 9 - - 10 - 11 use_task_moe: true selector: @@ -1554,7 +1558,7 @@ model: scheduler: class_path: rslearn.train.scheduler.CosineAnnealingScheduler init_args: - T_max: 100 + T_max: 50 eta_min: 0 task: class_path: rslearn.train.tasks.multi_task.MultiTask @@ -1774,6 +1778,7 @@ trainer: - encoder unfreeze_selectors: - head + - moe - at_epoch: 20 freeze_selectors: - encoder diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/OUT_segment.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/OUT_segment.yaml similarity index 99% rename from one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/OUT_segment.yaml rename to one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/OUT_segment.yaml index b0a4d6ea..8aea6077 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/OUT_segment.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/OUT_segment.yaml @@ -1172,7 +1172,7 @@ data: model: class_path: rslearn.train.lightning_module.RslearnLightningModule init_args: - lr: 0.0001 + lr: 0.0002 model: class_path: rslearn.models.multitask.MultiTaskMergedModel init_args: @@ -1206,6 +1206,12 @@ model: task_lora_kwargs: gen_hidden: 64 task_lora_indices: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 - 6 - 7 - 8 @@ -1215,13 +1221,11 @@ model: use_task_lora: true task_moe_kwargs: add_noise: true - expert_mult: 0.5 + expert_mult: 4 noise_mult: 0.2 num_experts: 4 - num_slots: 1 + num_slots: 4 task_moe_indices: - - 9 - - 10 - 11 use_task_moe: true selector: @@ -1242,7 +1246,7 @@ model: scheduler: class_path: rslearn.train.scheduler.CosineAnnealingScheduler init_args: - T_max: 100 + T_max: 50 eta_min: 0 task: class_path: rslearn.train.tasks.multi_task.MultiTask @@ -1311,6 +1315,7 @@ trainer: - encoder unfreeze_selectors: - head + - moe - at_epoch: 20 freeze_selectors: - encoder diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/all.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/all.yaml new file mode 100644 index 00000000..de42b3d7 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/all.yaml @@ -0,0 +1,39 @@ +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/OUT_all.yaml + +dataset_cfgs: + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_classifier_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_nandi_crop_type/finetune_s1_s2_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_worldcereal_cropland/finetune_s1_s2_cosinelr.yaml + + # - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_pastis/basecfg_cosinelr.yaml + # - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_pastis/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_solar_farm_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_solar_farm_128/basecfg_helios_mm.yaml + + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_detector_cosinelr.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_marine_infra_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_marine_infra_128/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_wind_turbine_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_wind_turbine_128/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_helios.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel2_vessels_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel2_vessels_128/basecfg_helios.yaml + +substitutions: + patch_size: 8 + encoder_embedding_size: 768 + helios_checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + +global_overrides: + model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + trainer: + accumulate_grad_batches: 9 + +merge_options: + merge_heads: true + merge_task_labels: true + same_label_groups: + - [detect_sentinel1_vessels, detect_sentinel2_vessels, vessel_detection] \ No newline at end of file diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/base.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/base.yaml similarity index 90% rename from one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/base.yaml rename to one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/base.yaml index 9e0b4c50..12343d3d 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/base.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/base.yaml @@ -15,16 +15,16 @@ model: encoder_config: task_lora_kwargs: use_task_lora: true - task_lora_indices: [6, 7, 8, 9, 10, 11] + task_lora_indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] gen_hidden: 64 task_moe_kwargs: use_task_moe: true - task_moe_indices: [9, 10, 11] + task_moe_indices: [11] add_noise: true noise_mult: 0.2 num_experts: 4 - num_slots: 1 - expert_mult: 0.5 + num_slots: 4 + expert_mult: 4 task_embed_opts: type: "precomputed" path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct.pt @@ -34,7 +34,7 @@ model: scheduler: class_path: rslearn.train.scheduler.CosineAnnealingScheduler init_args: - T_max: 100 + T_max: 50 eta_min: 0 data: @@ -62,7 +62,7 @@ trainer: stages: - at_epoch: 0 freeze_selectors: ["encoder"] - unfreeze_selectors: ["head"] + unfreeze_selectors: ["head", "moe"] - at_epoch: 20 freeze_selectors: ["encoder"] unfreeze_selectors: ["head", "moe", "lora"] diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/classify.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/classify.yaml similarity index 87% rename from one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/classify.yaml rename to one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/classify.yaml index c5c07428..d1730fbd 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/classify.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/classify.yaml @@ -1,5 +1,5 @@ -base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/base.yaml -output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/OUT_classify.yaml +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/OUT_classify.yaml dataset_cfgs: - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_classifier_cosinelr.yaml diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/detect.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/detect.yaml similarity index 93% rename from one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/detect.yaml rename to one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/detect.yaml index 67570232..9343fea8 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/detect.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/detect.yaml @@ -1,5 +1,5 @@ -base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/base.yaml -output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task/OUT_detect.yaml +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/OUT_detect.yaml dataset_cfgs: - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_detector_cosinelr.yaml diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/exp_id.txt b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/exp_id.txt new file mode 100644 index 00000000..65cbea4f --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/exp_id.txt @@ -0,0 +1 @@ +{task}_lora_task_moe_v5_cyclic \ No newline at end of file diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/segment.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/segment.yaml similarity index 86% rename from one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/segment.yaml rename to one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/segment.yaml index 93f1be78..64c6fa1d 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/segment.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/segment.yaml @@ -1,5 +1,5 @@ -base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/base.yaml -output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_helios_moe/OUT_segment.yaml +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/OUT_segment.yaml dataset_cfgs: - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_pastis/basecfg_cosinelr.yaml @@ -10,6 +10,8 @@ dataset_cfgs: global_overrides: model: class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.0002 trainer: accumulate_grad_batches: 2 diff --git a/one_off_projects/2025_07_joint_finetune/scripts/ckpt_to_distributed.py b/one_off_projects/2025_07_joint_finetune/scripts/ckpt_to_distributed.py new file mode 100644 index 00000000..5d014698 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/scripts/ckpt_to_distributed.py @@ -0,0 +1,132 @@ +"""Convert rslearn-trained checkpoint to distributed format used by helios. + +Use this if trying to do evals on a helios backbone that was trained with rslearn. + +Handles the checkpoint conversion, as well as the overrides for the helios model config +(specified if you want to do things like backbone lora, moe, etc in rslearn). +""" + +import os +import argparse +import json +import yaml +import importlib +import shutil + +from rslearn.train.lightning_module import RestoreConfig +from olmo_core.train.checkpoint import Checkpointer + + +class DummySaver: + + def __init__(self, state_dict): + self.state_dict = state_dict + + def state_dict_to_save(self): + return self.state_dict + + +def ckpt_to_distributed(*args, **kwargs): + + class HeliosExtractor(kwargs.pop("base_class")): + + def __init__(self, *args, **kwargs): + save_path = kwargs.pop("save_path") + ckpt_path = kwargs.pop("ckpt_path") + work_dir = kwargs.pop("work_dir") + + print("=====================") + print(f"save_path: {save_path}") + print(f"ckpt_path: {ckpt_path}") + print(f"work_dir: {work_dir}") + print("=====================\n") + + super().__init__(*args, **kwargs) + + ckpt_path = os.path.join(ckpt_path, "checkpoints", "last.ckpt") + restore_config = RestoreConfig( + ckpt_path, + selector=["state_dict"], + ignore_prefixes=["model.decoders"], + remap_prefixes=[("model.encoder.0.model.", "model.encoder.")] + ) + state_dict = restore_config.get_state_dict() + + dummy_saver = DummySaver(state_dict) + checkpointer = Checkpointer(work_dir=work_dir) + + shutil.rmtree(save_path) + checkpointer.save(save_path, dummy_saver, {}) + + return HeliosExtractor(*args, **kwargs) + + +def resolve_class_path(class_path: str): + module_path, class_name = class_path.rsplit(".", 1) + module = importlib.import_module(module_path) + cls = getattr(module, class_name) + return cls + + +def deep_merge(base, override): + for k, v in override.items(): + v_copy = v.copy() if hasattr(v, "copy") else v + if k.endswith("+"): + k = k[:-1] + if k not in base: + base[k] = [] + base[k].extend(v_copy) + else: + if isinstance(v, dict): + base[k] = deep_merge(base.get(k, {}), v_copy) + else: + base[k] = v_copy + return base + + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + parser.add_argument("--run", type=str, required=True, help="Run directory in args.project (ex: classify_lora_v4)") + parser.add_argument("--project", type=str, default="2025_08_12_task_embeds", help="Project name/wandb project") + parser.add_argument("--work_dir", type=str, default="/weka/dfive-default/ryanp/scratch/_tmp") + parser.add_argument("--save_dir", type=str, default="/weka/dfive-default/ryanp/scratch/distributed_ckpts") + parser.add_argument("--base_dir", type=str, default="/weka/dfive-default/rslearn-eai/projects") + args = parser.parse_args() + + finetune_config_path = os.path.join(args.base_dir, args.project, args.run, "checkpoints", "config.yaml") + with open(finetune_config_path, "r") as f: + finetune_config = yaml.safe_load(f) + enc = finetune_config["model"]["init_args"]["model"]["init_args"]["encoder"][0] + model_config = enc["init_args"] + base_class = resolve_class_path(enc["class_path"]) + + print("=====================") + print(f"base_class: {base_class}") + print(json.dumps(model_config, indent=2) + "\n") + print("=====================\n") + + # save the actual distributed checkpoint + extractor = ckpt_to_distributed( + base_class=base_class, + **model_config, + save_path=os.path.join(args.save_dir, args.run), + ckpt_path=os.path.join(args.base_dir, args.project, args.run), + work_dir=args.work_dir, + ) + + # copy over the config.json (helios config, not the rslearn config.yaml) + base_model_path = os.path.join(model_config["checkpoint_path"], "config.json") + with open(base_model_path, "r") as f: + base_model_config = json.load(f) + + overrides = dict(model=model_config["model_overrides"]) + base_model_config = deep_merge(base_model_config, overrides) + with open(os.path.join(args.save_dir, args.run, "config.json"), "w") as f: + json.dump(base_model_config, f) + + # copy over train/rank0.pt + train_info_path = os.path.join(model_config["checkpoint_path"], "train", "rank0.pt") + train_info_dump = os.path.join(args.save_dir, args.run, "train", "rank0.pt") + shutil.copy(train_info_path, train_info_dump) + + print(f"done! saved to {os.path.join(args.save_dir, args.run)}") diff --git a/one_off_projects/2025_07_joint_finetune/scripts/make_all_configs.py b/one_off_projects/2025_07_joint_finetune/scripts/make_all_configs.py index 1b66f98c..91d1a7c6 100644 --- a/one_off_projects/2025_07_joint_finetune/scripts/make_all_configs.py +++ b/one_off_projects/2025_07_joint_finetune/scripts/make_all_configs.py @@ -14,7 +14,7 @@ done = [] for f in os.listdir(os.path.join(base_dir, d)): - if not f.startswith("OUT_") and not f.endswith("base.yaml"): + if not f.startswith("OUT_") and not f.endswith("base.yaml") and f.endswith(".yaml"): print(os.path.join(base_dir, d, f)) os.system(f"python3 make_multidataset_config.py --cfg {os.path.join(base_dir, d, f)}") done.append(os.path.join(base_dir, d, f)) diff --git a/one_off_projects/2025_07_joint_finetune/scripts/make_task_embeds.py b/one_off_projects/2025_07_joint_finetune/scripts/make_task_embeds.py index 4ac365ec..d5219a49 100644 --- a/one_off_projects/2025_07_joint_finetune/scripts/make_task_embeds.py +++ b/one_off_projects/2025_07_joint_finetune/scripts/make_task_embeds.py @@ -1,4 +1,4 @@ -"""Build compact task embeddings from rslearn configs. +"""Build compact task embeddings from rslearn configs or a monolithic datasets YAML. Mean similarity with anchor subtraction is 0.48 (including self-self similarities), which is much better than the 0.73 without anchor subtraction. @@ -7,11 +7,12 @@ similarity between embeddings is 0.36, but similar tasks are still high. If you don't truncate, then you need to use a projection layer in the helios encoder -to get the dimensions down to 768. With MLR, qwen's embeddings are pretty good even so. +to get the dimensions down to 768. Since qwen supports MLR, just truncating is fine. Current commands ================ -python make_task_embeds.py --anchor --instruct --truncate 768 +V1: python make_task_embeds.py --anchor --instruct --truncate 256 --add_benchmarks +V2: python make_task_embeds.py --anchor --instruct --truncate 256 --from_yaml /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/tasks.yaml """ import os import hashlib @@ -32,20 +33,21 @@ KEEP_INPUT_FAMILIES = ("sentinel1", "sentinel2", "landsat", "srtm") DROP_INPUTS = {"mask", "image", "targets", "label"} DEFAULT_INSTRUCT_PROMPT = """ -You are creating a similarity embedding for remote-sensing tasks. -Focus on the *content*, not formatting. Down-weight boilerplate and shared structure. - -Emphasize: -- Task TYPE (classification/detection/segmentation/regression and any special variants) -- Target schema (property_name, classes/labels, numeric target meaning) -- Sensing MODALITIES actually used (sentinel1, sentinel2, landsat) -- Domain/topic keywords (e.g., vessels, cropland, wind turbines, solar farms) -- Geographic or dataset hints (if present) - -De-emphasize: -- Generic YAML keys, ordering, punctuation -- Training/runtime settings (batch size, paths, workers, dtypes, masks) -- Repeated time slices or band indices (e.g., sentinel2_0..11) +You are building a compact similarity embedding for Earth-observation tasks that will +be used to condition a satellite foundation model (Helios) during downstream finetuning. +Focus on semantic content over formatting. + +Prioritize (high weight): +- Task TYPE and variant (classification / detection / segmentation / regression; multi-label vs single-label). +- Target schema (property_name, full class list; or numeric target definition/units). +- SENSOR MODALITIES actually used (sentinel1, sentinel2, landsat, srtm) and whether time series/temporal mosaics are used. +- DOMAIN keywords (vessels, cropland, wind turbines, solar farms, floods, LCZ, debris, etc.). +- GEOGRAPHY and TIMEFRAME if present (AOIs, countries, biome, years). + +Down-weight (low weight): +- Boilerplate YAML structure and keys, execution/runtime flags, file paths, worker counts. +- Repetition of monthly slices/band indices (e.g., sentinel2_0..11); band visualization details (RGB). +- Generic phrasing or punctuation. """ @@ -141,7 +143,7 @@ def _salient(sub_def: Dict[str, Any]) -> Dict[str, Any]: return keep -def build_task_summary(task_name: str, cfg: Dict[str, Any]) -> str: +def build_task_summary(task_name: str, cfg: Dict[str, Any], skip_extract: bool = False) -> str: """ Compact representation: task= @@ -149,7 +151,10 @@ def build_task_summary(task_name: str, cfg: Dict[str, Any]) -> str: For multitask: one block per subtask with short type & classes. For single task: type/classes inline. """ - core = extract_task_core(cfg) + if not skip_extract: + core = extract_task_core(cfg) + else: + core = cfg lines: List[str] = [f"task={task_name}"] fams = core.get("inputs_families") or [] @@ -193,22 +198,30 @@ def extract_decoder_primary_key(cfg: Dict[str, Any]) -> Optional[str]: except Exception: return None + # ---------------- Color helpers ---------------- -def cell_color(v: float, vmin: float, vmax: float) -> str: - # Normalize in [0,1]; handle degenerate range - if vmax <= vmin: - t = 0.0 - else: - t = (v - vmin) / (vmax - vmin) - # Lighter green for lower sim, darker for higher: invert brightness - g = int(round(255 * (1.0 - t))) # background green channel - r = b = 0 - # Choose text color for contrast - # light bg (g >= 128) => black text; dark bg => white text - fg = (0, 0, 0) if g >= 128 else (255, 255, 255) - bg = (r, g, b) - return f"\x1b[38;2;{fg[0]};{fg[1]};{fg[2]}m\x1b[48;2;{bg[0]};{bg[1]};{bg[2]}m" +def cell_color(v: float, vmin: float=-1, vmax: float=1) -> str: + # normalize v to [0,1] + t = 0.0 if vmax <= vmin else (v - vmin) / (vmax - vmin) + t = max(0, min(1, t)) + + # interpolate RGB: 0=red(255,0,0), 0.5=yellow(255,255,0), 1=green(0,255,0) + if t < 0.5: # red → yellow + r, g, b = 255, int(510*t), 0 + else: # yellow → green + r, g, b = int(510*(1-t)), 255, 0 + + # quantize to xterm-256 cube + steps = [0,95,135,175,215,255] + q = lambda x: min(range(6), key=lambda i: abs(steps[i]-x)) + idx = 16 + 36*q(r) + 6*q(g) + q(b) + + # text color for contrast + lum = 0.2126*r + 0.7152*g + 0.0722*b + fg = 30 if lum > 140 else 97 + + return f"\x1b[{fg};48;5;{idx}m" def clip(s: str, w: int) -> str: return s if len(s) <= w else s[: max(1, w - 1)] + "…" @@ -296,7 +309,7 @@ def parse_args() -> argparse.Namespace: default="/weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_texts_{info}.jsonl", help="Optional JSONL for {task_dir, task_key, text}." ) - p.add_argument("--tasks", nargs="*", help="Task dir names (none = auto: subdirs starting with v2_*)") + p.add_argument("--tasks", nargs="*", help="Task dir names (none = auto: subdirs starting with v2_*).") p.add_argument("--model", default="Qwen/Qwen3-Embedding-8B", help="HF embedding model to use.") p.add_argument("--device", default=None, help="Device override, e.g. 'cuda' or 'cpu'.") p.add_argument("--anchor", action="store_true", help="Enable anchor subtraction.") @@ -307,46 +320,64 @@ def parse_args() -> argparse.Namespace: help="Prompt to add to the task description if instruct is enabled." ) p.add_argument("--truncate", type=int, default=None, help="Truncate task embeddings to this dimension.") + p.add_argument("--add_benchmarks", action="store_true", help="Add pretrain evals to tasks.") + p.add_argument("--from_yaml", type=str, default=None, + help="If set, load tasks directly from a single YAML of datasets (bypass rslearn parsing).") + p.add_argument("--combine_descriptions", action="store_true", + help="If set with --from-yaml, append each dataset's description to the summary text.") return p.parse_args() def main() -> None: args = parse_args() - tasks = args.tasks - if not tasks: - tasks = [name for name in os.listdir(args.base_dir) if name.startswith("v2_")] - # special case - treat vessel classification + detection separately - landsat_index = tasks.index("v2_landsat_vessels") - tasks.insert(landsat_index, "v2_landsat_vessels") - else: - landsat_index = tasks.index("v2_landsat_vessels") - - summaries: List[str] = [] keys: List[str] = [] - merged_cfgs: List[Dict[str, Any]] = [] - - for i, task_dir in enumerate(tasks): - merged: Dict[str, Any] = {} - is_landsat_vessels = (task_dir == "v2_landsat_vessels") + summaries: List[str] = [] + anchor_text = None + + if args.from_yaml: + # Load from monolithic datasets YAML (preferred) + data = load_yaml(args.from_yaml) + tasks: List[str] = [] + for ds_name, ds in data.items(): + summary = yaml.dump(ds) + if ds_name == "anchor_dataset": + anchor_text = summary + else: + tasks.append(ds_name) + keys.append(ds_name) + summaries.append(summary) - if is_landsat_vessels: - task = "detector" if i == landsat_index else "classifier" - path = "finetune_{}_cosinelr.yaml".format(task) - gathered = [os.path.join(args.base_dir, task_dir, path)] + else: + # Load from rslearn configs + tasks = args.tasks + if not tasks: + tasks = [name for name in os.listdir(args.base_dir) if name.startswith("v2_")] + # special case - treat vessel classification + detection separately + landsat_index = tasks.index("v2_landsat_vessels") + tasks.insert(landsat_index, "v2_landsat_vessels") else: - gathered = gather_task_files(args.base_dir, task_dir) + landsat_index = tasks.index("v2_landsat_vessels") + + for i, task_dir in enumerate(tasks): + merged: Dict[str, Any] = {} + is_landsat_vessels = (task_dir == "v2_landsat_vessels") - for p in gathered: - merged = deep_merge(merged, load_yaml(p)) - merged_cfgs.append(merged) + if is_landsat_vessels: + task = "detector" if i == landsat_index else "classifier" + path = "finetune_{}_cosinelr.yaml".format(task) + gathered = [os.path.join(args.base_dir, task_dir, path)] + else: + gathered = gather_task_files(args.base_dir, task_dir) - summaries.append(build_task_summary(task_dir, merged)) + for p in gathered: + merged = deep_merge(merged, load_yaml(p)) + summaries.append(build_task_summary(task_dir, merged)) - key = extract_decoder_primary_key(merged) - if not key: - print(f"WARNING: Could not find decoders key for {task_dir}; using directory name.") - key = task_dir - keys.append(key) + key = extract_decoder_primary_key(merged) + if not key: + print(f"WARNING: Could not find decoders key for {task_dir}; using directory name.") + key = task_dir + keys.append(key) # Sort by key alphabetically keys_index = list(range(len(keys))) @@ -355,7 +386,23 @@ def main() -> None: tasks = [tasks[i] for i in keys_index] keys = [keys[i] for i in keys_index] summaries = [summaries[i] for i in keys_index] - merged_cfgs = [merged_cfgs[i] for i in keys_index] + + # Add pretrain eval benchmarks - don't use this with from_yaml + # Add after the other tasks so that we can add new tasks without disrupting order of existing ones + # In general, we should always add new tasks to the end of the list + if args.add_benchmarks: + assert not args.from_yaml, "Benchmarks are not supported when loading from YAML" + benchmarks = load_yaml(os.path.join(args.base_dir, "../data/benchmark_info.yaml")) + benchmarks = { + k: benchmarks[k] for k in + sorted(benchmarks, key=lambda k: list(benchmarks[k]["tasks"].keys())[0]) + } + for task_name, task_info in benchmarks.items(): + assert len(task_info["tasks"]) == 1, "Benchmark info should have only one task" + summaries.append(build_task_summary(task_name, task_info, skip_extract=True)) + keys.append(list(task_info["tasks"].keys())[0]) + tasks.append(task_name) + assert len(keys) == len(set(keys)), "Keys must be unique" # Get info string info = f"__{args.model.split('/')[-1]}__{args.truncate}d" @@ -363,14 +410,22 @@ def main() -> None: info += "__anchor" if args.instruct: info += "__instruct" + if args.from_yaml: + info += f"__from_yaml" print("=== Configuration ===") print(f"Info: {info}") print(f"Model: {args.model}") - print(f"Base dir: {args.base_dir}") - print("Sorted task dir -> key:") - for task_dir, key in zip(tasks, keys): - print(f" - {task_dir:<30} -> {key}") + if args.from_yaml: + print(f"Datasets YAML: {args.from_yaml}") + print("Sorted subtask key list:") + for key in keys: + print(f" - {key}") + else: + print(f"Base dir: {args.base_dir}") + print("Sorted task dir -> key:") + for task_dir, key in zip(tasks, keys): + print(f" - {task_dir:<30} -> {key}") print() # Load model once @@ -378,17 +433,19 @@ def main() -> None: if args.instruct: print(f"\n[Instruct] Using prompt: {args.prompt}") - # Build anchor embedding from placeholder summary (same summarizer path) - anchor_emb = None + # Build anchor embedding from placeholder summary if args.anchor: - anchor_text = build_anchor_summary() + if not args.from_yaml: + anchor_text = build_anchor_summary() + fmt_anchor_text = anchor_text if args.instruct: - fmt_anchor_text = get_detailed_instruct(anchor_text, args.prompt) + fmt_anchor_text = get_detailed_instruct(fmt_anchor_text, args.prompt) + + print("\n[Anchor] Using placeholder summary for anchor subtraction:\n" + anchor_text + "\n") anchor_emb = embed_texts_with( tokenizer, model, device, [fmt_anchor_text], args.truncate )[0] # [D] - print("\n[Anchor] Using placeholder summary for anchor subtraction:\n" + anchor_text + "\n") # Embed summaries if args.instruct: @@ -412,15 +469,15 @@ def main() -> None: if args.dump_texts: with open(args.dump_texts.format(info=info), "w") as f: for task_dir, key, text in zip(tasks, keys, summaries): + print(key, task_dir) + print(text) + print() + print() f.write(json.dumps({"task_dir": task_dir, "task_key": key, "text": text}) + "\n") - f.write(json.dumps({"code_hash": result["code_hash"]}) + "\n") - if args.anchor: - f.write(json.dumps({"anchor_text": anchor_text}) + "\n") if args.instruct: f.write(json.dumps({"prompt": args.prompt}) + "\n") # Cosine similarity matrix - result.pop("code_hash") warnings.filterwarnings("ignore", category=DeprecationWarning) print(f"=== Cosine similarity matrix ===") @@ -434,26 +491,47 @@ def main() -> None: # Label and column widths clip = lambda s, w: s if len(s) <= w else s[: w - 1] + "…" idx_digits = max(2, len(str(max(0, N - 1)))) - num_w = max(prec + 2, idx_digits) # width for numbers & headers (e.g., "0.123") - label_w = max(16, min(36, max(len(k) for k in keys) + 1 + 2 + idx_digits)) # "name (idx)" + num_w = max(prec + 2, idx_digits) + label_w = max(16, min(36, max(len(k) for k in keys) + 1 + 2 + idx_digits)) vmin, vmax = float(np.nanmin(A)), float(np.nanmax(A)) + row_means = A.mean(axis=1) + col_means = A.mean(axis=0) + overall_mean = A.mean() + # Header: indices only header = " ".join(f"{i:>{num_w}d}" for i in range(N)) + header += f" {'mean':>{num_w}}" print(f"{'':>{label_w}} {header}") - # Rows: "name (index)" at left; colored cells + # Rows for i, name in enumerate(keys): row_label = f"{name} ({i})" row_label = clip(row_label, label_w) cells = [] for j in range(N): v = float(A[i, j]) - fmt = f"{v:>{num_w}.{prec}f}" + prec_l = prec if v > 0 else prec - 1 + fmt = f"{v:>{num_w}.{prec_l}f}" cells.append(cell_color(v, vmin, vmax) + fmt + RESET) + # row mean + v = float(row_means[i]) + fmt = f"{v:>{num_w}.{prec}f}" + cells.append(cell_color(v, vmin, vmax) + fmt + RESET) print(f"{row_label:>{label_w}} " + " ".join(cells)) + # final row: column means + overall mean + row_label = clip("mean", label_w) + cells = [] + for j in range(N): + v = float(col_means[j]) + fmt = f"{v:>{num_w}.{prec}f}" + cells.append(cell_color(v, vmin, vmax) + fmt + RESET) + fmt = f"{overall_mean:>{num_w}.{prec}f}" + cells.append(cell_color(overall_mean, vmin, vmax) + fmt + RESET) + print(f"{row_label:>{label_w}} " + " ".join(cells)) + # Summary print(f"\nRange: [{vmin:.{prec}f}, {vmax:.{prec}f}] Mean similarity: {A.mean():.{prec}f}") diff --git a/one_off_projects/2025_07_joint_finetune/scripts/run.py b/one_off_projects/2025_07_joint_finetune/scripts/run.py index 2bf309c4..6512a7f7 100644 --- a/one_off_projects/2025_07_joint_finetune/scripts/run.py +++ b/one_off_projects/2025_07_joint_finetune/scripts/run.py @@ -9,9 +9,6 @@ "--patch_size", "8", "--encoder_embedding_size", "768", "--image_name", "$IMAGE", - "--cluster+=ai2/titan-cirrascale", - "--cluster+=ai2/saturn-cirrascale", - "--cluster+=ai2/ceres-cirrascale", "--rslp_project", "$PROJECT_NAME", "--experiment_id", "$EXP_ID", ] @@ -23,12 +20,16 @@ parser.add_argument("--project_name", type=str, default="helios-debug") parser.add_argument("--gpu", type=int, default=0) parser.add_argument("--image", type=str, default="dev") +parser.add_argument("--clusters", type=str, nargs="*", default=["saturn", "ceres", "titan"]) args = parser.parse_args() args.image = f"henryh/rslp_multidataset_{args.image}" if args.project_name == "s": args.project_name = "helios_finetune_cosine_lr" +for cluster in args.clusters: + cmd.append(f"--cluster+=ai2/{cluster}-cirrascale") + if args.gpu == 0: RLSP_PREFIX = "/weka/dfive-default/ryanp/rslearn_projects/project_data" cmd.extend(["--local", "true"]) diff --git a/one_off_projects/2025_07_joint_finetune/scripts/run_all.py b/one_off_projects/2025_07_joint_finetune/scripts/run_all.py new file mode 100644 index 00000000..59bd5924 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/scripts/run_all.py @@ -0,0 +1,46 @@ +import os +import argparse + +def find_dir(base_dir, postfix_dir): + for d in os.listdir(base_dir): + if d.endswith(postfix_dir): + return d + raise ValueError(f"Directory {postfix_dir} not found in {base_dir}") + + +parser = argparse.ArgumentParser() +parser.add_argument("--dirs", type=str, required=True, nargs="+") +parser.add_argument("--tasks", type=str, nargs="*", default=["classify", "segment", "detect"]) +parser.add_argument("--base_dir", type=str, default="/weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs") +parser.add_argument("--project", type=str, default="2025_08_12_task_embeds") +parser.add_argument("--clusters", type=str, nargs="*", default=["saturn", "ceres", "titan"]) +parser.add_argument("--dry", action="store_true") +args = parser.parse_args() + +template = "python3 run.py --cfg {cfg} --exp_id {exp} --gpu 4 --image dev --project {project} --clusters {clusters}" + +for postfix_dir in args.dirs: + d = find_dir(args.base_dir, postfix_dir) + with open(os.path.join(args.base_dir, d, "exp_id.txt"), "r") as f: + base_exp_id = f.read().strip() + for f in os.listdir(os.path.join(args.base_dir, d)): + go = False + for task in args.tasks: + if task in f: + go = True + break + if go and f.startswith("OUT") and f.endswith(".yaml"): + cfg = os.path.join(args.base_dir, d, f) + exp_id = base_exp_id.format(task=os.path.splitext(f)[0]) + exp_id = exp_id.replace("OUT_", "") + cmd = template.format( + cfg=cfg, + exp=exp_id, + project=args.project, + clusters=" ".join(args.clusters), + ) + print(cmd) + if not args.dry: + os.system(cmd) + print("-" * 100) + print() diff --git a/rslp/utils/beaker.py b/rslp/utils/beaker.py index fe5ce52b..f6878c75 100644 --- a/rslp/utils/beaker.py +++ b/rslp/utils/beaker.py @@ -38,7 +38,7 @@ def get_base_env_vars(use_weka_prefix: bool = False) -> list[BeakerEnvVar]: env_vars = [ BeakerEnvVar( name="WANDB_API_KEY", # nosec - secret="RSLEARN_WANDB_API_KEY", # nosec + secret="ryanp_WANDB_API_KEY", # nosec ), BeakerEnvVar( name="GOOGLE_APPLICATION_CREDENTIALS", # nosec From b2ca787594bc22fcba81af47e29f221022c1bd58 Mon Sep 17 00:00:00 2001 From: ryanp Date: Mon, 25 Aug 2025 23:05:23 +0000 Subject: [PATCH 06/16] Update scripts --- .../configs/2025_08_12_task_lora/OUT_all.yaml | 6 +- .../2025_08_12_task_lora/OUT_classify.yaml | 6 +- .../2025_08_12_task_lora/OUT_detect.yaml | 6 +- .../2025_08_12_task_lora/OUT_segment.yaml | 4 +- .../configs/2025_08_12_task_lora/base.yaml | 6 +- .../configs/2025_08_12_task_lora/exp_id.txt | 2 +- .../configs/2025_08_15_task_moe/OUT_all.yaml | 4047 ++++++++++++++++ .../2025_08_15_task_moe/OUT_classify.yaml | 10 +- .../2025_08_15_task_moe/OUT_detect.yaml | 10 +- .../2025_08_15_task_moe/OUT_segment.yaml | 10 +- .../configs/2025_08_15_task_moe/all.yaml | 39 + .../configs/2025_08_15_task_moe/base.yaml | 8 +- .../configs/2025_08_15_task_moe/exp_id.txt | 2 +- .../configs/2025_08_18_task_all/OUT_all.yaml | 777 +++- .../2025_08_18_task_all/OUT_classify.yaml | 17 +- .../2025_08_18_task_all/OUT_detect.yaml | 17 +- .../2025_08_18_task_all/OUT_segment.yaml | 15 +- .../configs/2025_08_18_task_all/all.yaml | 4 +- .../configs/2025_08_18_task_all/base.yaml | 14 +- .../configs/2025_08_18_task_all/exp_id.txt | 2 +- .../configs/2025_08_21_new_lora/OUT_all.yaml | 4050 ++++++++++++++++ .../2025_08_21_new_lora/OUT_classify.yaml | 1131 +++++ .../2025_08_21_new_lora/OUT_detect.yaml | 1778 ++++++++ .../2025_08_21_new_lora/OUT_segment.yaml | 1315 ++++++ .../configs/2025_08_21_new_lora/all.yaml | 39 + .../configs/2025_08_21_new_lora/base.yaml | 65 + .../configs/2025_08_21_new_lora/classify.yaml | 23 + .../configs/2025_08_21_new_lora/detect.yaml | 30 + .../configs/2025_08_21_new_lora/exp_id.txt | 1 + .../configs/2025_08_21_new_lora/segment.yaml | 26 + .../configs/2025_08_21_new_moe/OUT_all.yaml | 4047 ++++++++++++++++ .../2025_08_21_new_moe/OUT_classify.yaml | 1128 +++++ .../2025_08_21_new_moe/OUT_detect.yaml | 1775 +++++++ .../2025_08_21_new_moe/OUT_segment.yaml | 1312 ++++++ .../configs/2025_08_21_new_moe/all.yaml | 39 + .../configs/2025_08_21_new_moe/base.yaml | 70 + .../configs/2025_08_21_new_moe/classify.yaml | 23 + .../configs/2025_08_21_new_moe/detect.yaml | 30 + .../configs/2025_08_21_new_moe/exp_id.txt | 1 + .../configs/2025_08_21_new_moe/segment.yaml | 24 + .../configs/2025_08_21_new_task/OUT_all.yaml | 4063 +++++++++++++++++ .../2025_08_21_new_task/OUT_classify.yaml | 1144 +++++ .../2025_08_21_new_task/OUT_detect.yaml | 1791 ++++++++ .../2025_08_21_new_task/OUT_segment.yaml | 1328 ++++++ .../configs/2025_08_21_new_task/all.yaml | 39 + .../configs/2025_08_21_new_task/base.yaml | 74 + .../configs/2025_08_21_new_task/classify.yaml | 23 + .../configs/2025_08_21_new_task/detect.yaml | 30 + .../configs/2025_08_21_new_task/exp_id.txt | 1 + .../configs/2025_08_21_new_task/segment.yaml | 26 + .../scripts/ckpt_to_distributed.py | 1 + .../scripts/do_eval_sft.py | 9 +- .../scripts/make_task_embeds.py | 12 +- .../2025_07_joint_finetune/scripts/run_all.py | 15 +- .../scripts/submit_base_finetune.py | 31 +- rslp/helios/model.py | 2 +- 56 files changed, 30374 insertions(+), 124 deletions(-) create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/OUT_all.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/all.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_lora/OUT_all.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_lora/OUT_classify.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_lora/OUT_detect.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_lora/OUT_segment.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_lora/all.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_lora/base.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_lora/classify.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_lora/detect.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_lora/exp_id.txt create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_lora/segment.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_moe/OUT_all.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_moe/OUT_classify.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_moe/OUT_detect.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_moe/OUT_segment.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_moe/all.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_moe/base.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_moe/classify.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_moe/detect.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_moe/exp_id.txt create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_moe/segment.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/OUT_all.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/OUT_classify.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/OUT_detect.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/OUT_segment.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/all.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/base.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/classify.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/detect.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/exp_id.txt create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/segment.yaml diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/OUT_all.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/OUT_all.yaml index f94a8836..f61985b1 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/OUT_all.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/OUT_all.yaml @@ -2879,7 +2879,7 @@ data: model: class_path: rslearn.train.lightning_module.RslearnLightningModule init_args: - lr: 0.0001 + lr: 0.0002 model: class_path: rslearn.models.multitask.MultiTaskMergedModel init_args: @@ -2935,7 +2935,7 @@ model: model_overrides: encoder_config: task_lora_kwargs: - gen_hidden: 64 + gen_hidden: 128 task_lora_indices: - 0 - 1 @@ -2953,7 +2953,7 @@ model: selector: - encoder task_embed_opts: - path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct.pt + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt type: precomputed lazy_decode: true task_label_offsets: diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/OUT_classify.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/OUT_classify.yaml index 8367d7a9..2ce7af60 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/OUT_classify.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/OUT_classify.yaml @@ -987,7 +987,7 @@ data: model: class_path: rslearn.train.lightning_module.RslearnLightningModule init_args: - lr: 0.0001 + lr: 0.0002 model: class_path: rslearn.models.multitask.MultiTaskMergedModel init_args: @@ -1012,7 +1012,7 @@ model: model_overrides: encoder_config: task_lora_kwargs: - gen_hidden: 64 + gen_hidden: 128 task_lora_indices: - 0 - 1 @@ -1030,7 +1030,7 @@ model: selector: - encoder task_embed_opts: - path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct.pt + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt type: precomputed lazy_decode: true task_label_offsets: diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/OUT_detect.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/OUT_detect.yaml index cb4367dc..57fdd7f9 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/OUT_detect.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/OUT_detect.yaml @@ -1474,7 +1474,7 @@ data: model: class_path: rslearn.train.lightning_module.RslearnLightningModule init_args: - lr: 0.0001 + lr: 0.0002 model: class_path: rslearn.models.multitask.MultiTaskMergedModel init_args: @@ -1504,7 +1504,7 @@ model: model_overrides: encoder_config: task_lora_kwargs: - gen_hidden: 64 + gen_hidden: 128 task_lora_indices: - 0 - 1 @@ -1522,7 +1522,7 @@ model: selector: - encoder task_embed_opts: - path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct.pt + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt type: precomputed lazy_decode: true task_label_offsets: diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/OUT_segment.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/OUT_segment.yaml index 6d457bad..d119ed1e 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/OUT_segment.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/OUT_segment.yaml @@ -1204,7 +1204,7 @@ model: model_overrides: encoder_config: task_lora_kwargs: - gen_hidden: 64 + gen_hidden: 128 task_lora_indices: - 0 - 1 @@ -1222,7 +1222,7 @@ model: selector: - encoder task_embed_opts: - path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct.pt + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt type: precomputed lazy_decode: true task_label_offsets: diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/base.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/base.yaml index 17ed45c8..5e345c9c 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/base.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/base.yaml @@ -16,13 +16,13 @@ model: task_lora_kwargs: use_task_lora: true task_lora_indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] - gen_hidden: 64 + gen_hidden: 128 task_embed_opts: type: "precomputed" - path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct.pt + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt decoders: # Filled in by make_multidataset_config.py lazy_decode: true - lr: 0.0001 + lr: 0.0002 scheduler: class_path: rslearn.train.scheduler.CosineAnnealingScheduler init_args: diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/exp_id.txt b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/exp_id.txt index 42e6ff8e..7a4378bb 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/exp_id.txt +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/exp_id.txt @@ -1 +1 @@ -{task}_lora_v4_cyclic \ No newline at end of file +{task}_lora_large_cyclic_fixed \ No newline at end of file diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/OUT_all.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/OUT_all.yaml new file mode 100644 index 00000000..57c94602 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/OUT_all.yaml @@ -0,0 +1,4047 @@ +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + batch_sizes: + crop_type_classification: 32 + cropland_classification: 16 + detect_satlas_marine_infra: 8 + detect_satlas_wind_turbine: 8 + detect_sentinel1_vessels: 8 + detect_sentinel2_vessels: 8 + segment: 2 + segment_satlas_solar_farm: 8 + vessel_classification: 16 + vessel_detection: 8 + data_modules: + crop_type_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 32 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: [] + sentinel2_1: [] + sentinel2_10: [] + sentinel2_11: [] + sentinel2_2: [] + sentinel2_3: [] + sentinel2_4: [] + sentinel2_5: [] + sentinel2_6: [] + sentinel2_7: [] + sentinel2_8: [] + sentinel2_9: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + sentinel1_0: [] + sentinel1_1: [] + sentinel1_10: [] + sentinel1_11: [] + sentinel1_2: [] + sentinel1_3: [] + sentinel1_4: [] + sentinel1_5: [] + sentinel1_6: [] + sentinel1_7: [] + sentinel1_8: [] + sentinel1_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.pad.Pad + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + mode: center + size: 8 + inputs: + label: + data_type: vector + is_target: true + layers: + - label + sentinel1_0: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + sentinel1_1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + sentinel1_10: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.10 + passthrough: true + sentinel1_11: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.11 + passthrough: true + sentinel1_2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + sentinel1_3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + sentinel1_4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.4 + passthrough: true + sentinel1_5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.5 + passthrough: true + sentinel1_6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.6 + passthrough: true + sentinel1_7: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.7 + passthrough: true + sentinel1_8: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.8 + passthrough: true + sentinel1_9: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.9 + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/crop/kenya_nandi/20250625 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + crop_type_classification: + label: targets + tasks: + crop_type_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Coffee + - Trees + - Grassland + - Maize + - Sugarcane + - Tea + - Water + - Built-up + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + test_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: val + train_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: train + val_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: val + cropland_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 16 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: [] + sentinel2_1: [] + sentinel2_10: [] + sentinel2_11: [] + sentinel2_2: [] + sentinel2_3: [] + sentinel2_4: [] + sentinel2_5: [] + sentinel2_6: [] + sentinel2_7: [] + sentinel2_8: [] + sentinel2_9: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + sentinel1_0: [] + sentinel1_1: [] + sentinel1_10: [] + sentinel1_11: [] + sentinel1_2: [] + sentinel1_3: [] + sentinel1_4: [] + sentinel1_5: [] + sentinel1_6: [] + sentinel1_7: [] + sentinel1_8: [] + sentinel1_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.pad.Pad + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + mode: center + size: 8 + inputs: + label: + data_type: vector + is_target: true + layers: + - label + sentinel1_0: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1 + passthrough: true + sentinel1_1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.1 + passthrough: true + sentinel1_10: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.10 + passthrough: true + sentinel1_11: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.11 + passthrough: true + sentinel1_2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.2 + passthrough: true + sentinel1_3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.3 + passthrough: true + sentinel1_4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.4 + passthrough: true + sentinel1_5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.5 + passthrough: true + sentinel1_6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.6 + passthrough: true + sentinel1_7: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.7 + passthrough: true + sentinel1_8: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.8 + passthrough: true + sentinel1_9: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.9 + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/crop/worldcereal_cropland/20250626 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + cropland_classification: + label: targets + tasks: + cropland_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Cropland + - Non-Cropland + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + test_config: + groups: + - h3_sample100_66K + tags: + split: val + train_config: + groups: + - h3_sample100_66K + tags: + split: train + val_config: + groups: + - h3_sample100_66K + tags: + split: val + detect_satlas_marine_infra: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/marine_infra/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_marine_infra: + targets: targets + tasks: + detect_satlas_marine_infra: + class_path: rslp.satlas.train.MarineInfraTask + init_args: + box_size: 15 + classes: + - unknown + - platform + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + - - 0.1 + - - 0.2 + - - 0.3 + - - 0.4 + - - 0.5 + - - 0.6 + - - 0.7 + - - 0.8 + - - 0.9 + image_bands: + - 2 + - 1 + - 0 + property_name: category + remap_values: + - - 0 + - 0.25 + - - 0 + - 255 + skip_unknown_categories: true + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 65536 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_satlas_marine_infra + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + val_config: + patch_size: 128 + tags: + split: val + detect_satlas_wind_turbine: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + s25: [] + s26: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + landsat5: [] + landsat6: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + s1a5: [] + s1a6: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + landsat5: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.4 + passthrough: true + landsat6: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.5 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1a5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.4 + passthrough: true + s1a6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.5 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s1d5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.4 + passthrough: true + s1d6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.5 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + s25: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + s26: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/wind_turbine/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_wind_turbine: + targets: targets + tasks: + detect_satlas_wind_turbine: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 65536 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + s25: [] + s26: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + landsat5: [] + landsat6: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + s1a5: [] + s1a6: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_satlas_wind_turbine + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + val_config: + patch_size: 128 + tags: + split: val + detect_sentinel1_vessels: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/sentinel1_vessels/dataset_v1/20250602/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_sentinel1_vessels: + targets: targets + tasks: + detect_sentinel1_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + image_bands: + - 1 + - 1 + - 1 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.5 + test_config: + groups: + - val_ascending + - val_descending + patch_size: 128 + train_config: + groups: + - train_ascending + - train_descending + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 32768 + replacement: true + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_sentinel1_vessels + image_selectors: + - image + - sentinel1 + val_config: + groups: + - val_ascending + - val_descending + patch_size: 128 + detect_sentinel2_vessels: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/sentinel2_vessels/dataset_v1/20250213/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_sentinel2_vessels: + targets: targets + tasks: + detect_sentinel2_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + groups: + - sargassum_val + - split1 + - split7 + patch_size: 128 + train_config: + groups: + - sargassum_train + - split2 + - split3 + - split4 + - split5 + - split6 + - train + - train-bg + - train2 + - train3 + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 131072 + replacement: true + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_sentinel2_vessels + image_selectors: + - image + - sentinel2_l2a + val_config: + groups: + - sargassum_val + - split1 + - split7 + patch_size: 128 + segment: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 2 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_1: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_10: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_11: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_2: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_3: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_4: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_5: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_6: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_7: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_8: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_9: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1d_0: [] + s1d_1: [] + s1d_10: [] + s1d_11: [] + s1d_2: [] + s1d_3: [] + s1d_4: [] + s1d_5: [] + s1d_6: [] + s1d_7: [] + s1d_8: [] + s1d_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + s1d_0: + bands: + - vv + - vh + data_type: raster + layers: + - s1d + passthrough: true + s1d_1: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.1 + passthrough: true + s1d_10: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.10 + passthrough: true + s1d_11: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.11 + passthrough: true + s1d_2: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.2 + passthrough: true + s1d_3: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.3 + passthrough: true + s1d_4: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.4 + passthrough: true + s1d_5: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.5 + passthrough: true + s1d_6: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.6 + passthrough: true + s1d_7: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.7 + passthrough: true + s1d_8: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.8 + passthrough: true + s1d_9: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.9 + passthrough: true + targets: + bands: + - class + data_type: raster + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/pastis/rslearn_dataset/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + segment: + targets: targets + tasks: + segment: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_miou_metric: true + metric_kwargs: + average: micro + num_classes: 20 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + zero_is_invalid: true + test_config: + groups: + - fold5 + train_config: + groups: + - fold1 + - fold2 + - fold3 + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_1: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_10: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_11: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_2: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_3: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_4: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_5: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_6: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_7: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_8: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_9: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1d_0: [] + s1d_1: [] + s1d_10: [] + s1d_11: [] + s1d_2: [] + s1d_3: [] + s1d_4: [] + s1d_5: [] + s1d_6: [] + s1d_7: [] + s1d_8: [] + s1d_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + - target/segment/classes + - target/segment/valid + val_config: + groups: + - fold4 + segment_satlas_solar_farm: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + targets: + bands: + - label + data_type: raster + dtype: INT32 + is_target: true + layers: + - label_raster + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/solar_farm/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + segment_satlas_solar_farm: + targets: targets + tasks: + segment_satlas_solar_farm: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_f1_metric: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + metric_kwargs: + average: micro + num_classes: 2 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 16384 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - target/segment_satlas_solar_farm/classes + - target/segment_satlas_solar_farm/valid + val_config: + patch_size: 128 + tags: + split: val + vessel_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 16 + default_config: + transforms: + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + label: + data_type: vector + is_target: true + layers: + - label + landsat: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/landsat_vessel_detection/classifier/dataset_20250624 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + vessel_classification: + label: targets + tasks: + vessel_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + allow_invalid: true + classes: + - correct + - incorrect + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: label + skip_unknown_categories: true + test_config: + groups: + - phase2a_completed + tags: + split: val + train_config: + groups: + - selected_copy + - phase2a_completed + - phase3a_selected + tags: + split: train + val_config: + groups: + - phase2a_completed + tags: + split: val + vessel_detection: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/landsat_vessel_detection/detector/dataset_20250624 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + vessel_detection: + targets: targets + tasks: + vessel_detection: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.7 + test_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: val + train_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: train + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + val_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: val + num_workers: 16 + refill_batches: true + sample_mode: random_cycle +model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.0002 + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + decoder_to_target: + ClassificationHead: + - vessel_classification + - crop_type_classification + - cropland_classification + FasterRCNN: + - vessel_detection + - detect_satlas_marine_infra + - detect_satlas_wind_turbine + - detect_sentinel1_vessels + - detect_sentinel2_vessels + SegmentationHead: + - segment + - segment_satlas_solar_farm + decoders: + ClassificationHead: + - class_path: rslearn.models.pooling_decoder.PoolingDecoder + init_args: + in_channels: 768 + out_channels: 12 + - class_path: rslearn.train.tasks.classification.ClassificationHead + FasterRCNN: + - class_path: rslearn.models.faster_rcnn.FasterRCNN + init_args: + anchor_sizes: + - - 32 + downsample_factors: + - 8 + num_channels: 768 + num_classes: 8 + SegmentationHead: + - class_path: rslearn.models.unet.UNetDecoder + init_args: + conv_layers_per_resolution: 2 + in_channels: + - - 8 + - 768 + num_channels: + 1: 128 + 2: 256 + 4: 512 + 8: 512 + out_channels: 22 + - class_path: rslearn.train.tasks.segmentation.SegmentationHead + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_moe_kwargs: + add_noise: true + compute_slots_from_task: true + expert_mult: 4 + noise_mult: 0.2 + num_experts: 4 + num_slots: 4 + task_moe_indices: + - 9 + - 10 + - 11 + use_task_moe: true + selector: + - encoder + task_embed_opts: + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct.pt + type: precomputed + lazy_decode: true + task_label_offsets: + crop_type_classification: + num_outputs: 8 + offset: 2 + outputs_key: class + cropland_classification: + num_outputs: 2 + offset: 10 + outputs_key: class + detect_satlas_marine_infra: + num_outputs: 3 + offset: 2 + outputs_key: labels + detect_satlas_wind_turbine: + num_outputs: 3 + offset: 5 + outputs_key: labels + detect_sentinel1_vessels: + num_outputs: 2 + offset: 0 + outputs_key: labels + detect_sentinel2_vessels: + num_outputs: 2 + offset: 0 + outputs_key: labels + segment: + num_outputs: 20 + offset: 0 + outputs_key: classes + segment_satlas_solar_farm: + num_outputs: 2 + offset: 20 + outputs_key: classes + vessel_classification: + num_outputs: 2 + offset: 0 + outputs_key: class + vessel_detection: + num_outputs: 2 + offset: 0 + outputs_key: labels + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 50 + eta_min: 0 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + crop_type_classification: + label: targets + cropland_classification: + label: targets + detect_satlas_marine_infra: + targets: targets + detect_satlas_wind_turbine: + targets: targets + detect_sentinel1_vessels: + targets: targets + detect_sentinel2_vessels: + targets: targets + segment: + targets: targets + segment_satlas_solar_farm: + targets: targets + vessel_classification: + label: targets + vessel_detection: + targets: targets + tasks: + crop_type_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Coffee + - Trees + - Grassland + - Maize + - Sugarcane + - Tea + - Water + - Built-up + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + cropland_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Cropland + - Non-Cropland + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + detect_satlas_marine_infra: + class_path: rslp.satlas.train.MarineInfraTask + init_args: + box_size: 15 + classes: + - unknown + - platform + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + - - 0.1 + - - 0.2 + - - 0.3 + - - 0.4 + - - 0.5 + - - 0.6 + - - 0.7 + - - 0.8 + - - 0.9 + image_bands: + - 2 + - 1 + - 0 + property_name: category + remap_values: + - - 0 + - 0.25 + - - 0 + - 255 + skip_unknown_categories: true + detect_satlas_wind_turbine: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + detect_sentinel1_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + image_bands: + - 1 + - 1 + - 1 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.5 + detect_sentinel2_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + segment: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_miou_metric: true + metric_kwargs: + average: micro + num_classes: 20 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + zero_is_invalid: true + segment_satlas_solar_farm: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_f1_metric: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + metric_kwargs: + average: micro + num_classes: 2 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + vessel_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + allow_invalid: true + classes: + - correct + - incorrect + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: label + skip_unknown_categories: true + vessel_detection: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.7 +rslp_experiment: placeholder +rslp_project: placeholder +trainer: + accumulate_grad_batches: 9 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: epoch + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + mode: min + monitor: val_loss + save_last: true + save_top_k: 1 + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - at_epoch: 0 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - moe + - at_epoch: 20 + freeze_selectors: [] + unfreeze_selectors: + - head + - moe + - encoder + max_epochs: 500 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/OUT_classify.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/OUT_classify.yaml index 86dc3b91..44a3dede 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/OUT_classify.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/OUT_classify.yaml @@ -1013,7 +1013,8 @@ model: encoder_config: task_moe_kwargs: add_noise: true - expert_mult: 1 + compute_slots_from_task: true + expert_mult: 4 noise_mult: 0.2 num_experts: 4 num_slots: 4 @@ -1117,13 +1118,8 @@ trainer: - encoder unfreeze_selectors: - head - - at_epoch: 20 - freeze_selectors: - - encoder - unfreeze_selectors: - - head - moe - - at_epoch: 40 + - at_epoch: 20 freeze_selectors: [] unfreeze_selectors: - head diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/OUT_detect.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/OUT_detect.yaml index 96564209..15ef9471 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/OUT_detect.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/OUT_detect.yaml @@ -1505,7 +1505,8 @@ model: encoder_config: task_moe_kwargs: add_noise: true - expert_mult: 1 + compute_slots_from_task: true + expert_mult: 4 noise_mult: 0.2 num_experts: 4 num_slots: 4 @@ -1764,13 +1765,8 @@ trainer: - encoder unfreeze_selectors: - head - - at_epoch: 20 - freeze_selectors: - - encoder - unfreeze_selectors: - - head - moe - - at_epoch: 40 + - at_epoch: 20 freeze_selectors: [] unfreeze_selectors: - head diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/OUT_segment.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/OUT_segment.yaml index 72112e54..73cf9dbe 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/OUT_segment.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/OUT_segment.yaml @@ -1205,7 +1205,8 @@ model: encoder_config: task_moe_kwargs: add_noise: true - expert_mult: 1 + compute_slots_from_task: true + expert_mult: 4 noise_mult: 0.2 num_experts: 4 num_slots: 4 @@ -1301,13 +1302,8 @@ trainer: - encoder unfreeze_selectors: - head - - at_epoch: 20 - freeze_selectors: - - encoder - unfreeze_selectors: - - head - moe - - at_epoch: 40 + - at_epoch: 20 freeze_selectors: [] unfreeze_selectors: - head diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/all.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/all.yaml new file mode 100644 index 00000000..fcbaa04d --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/all.yaml @@ -0,0 +1,39 @@ +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/OUT_all.yaml + +dataset_cfgs: + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_classifier_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_nandi_crop_type/finetune_s1_s2_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_worldcereal_cropland/finetune_s1_s2_cosinelr.yaml + + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_pastis/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_pastis/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_solar_farm_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_solar_farm_128/basecfg_helios_mm.yaml + + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_detector_cosinelr.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_marine_infra_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_marine_infra_128/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_wind_turbine_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_wind_turbine_128/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_helios.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel2_vessels_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel2_vessels_128/basecfg_helios.yaml + +substitutions: + patch_size: 8 + encoder_embedding_size: 768 + helios_checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + +global_overrides: + model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + trainer: + accumulate_grad_batches: 9 + +merge_options: + merge_heads: true + merge_task_labels: true + same_label_groups: + - [detect_sentinel1_vessels, detect_sentinel2_vessels, vessel_detection] \ No newline at end of file diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/base.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/base.yaml index 68c84047..36c81239 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/base.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/base.yaml @@ -20,7 +20,8 @@ model: noise_mult: 0.2 num_experts: 4 num_slots: 4 - expert_mult: 1 + expert_mult: 4 + compute_slots_from_task: true task_embed_opts: type: "precomputed" path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct.pt @@ -57,12 +58,9 @@ trainer: init_args: stages: - at_epoch: 0 - freeze_selectors: ["encoder"] - unfreeze_selectors: ["head"] - - at_epoch: 20 freeze_selectors: ["encoder"] unfreeze_selectors: ["head", "moe"] - - at_epoch: 40 + - at_epoch: 20 freeze_selectors: [] unfreeze_selectors: ["head", "moe", "encoder"] diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/exp_id.txt b/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/exp_id.txt index fa20d963..e4aa02e3 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/exp_id.txt +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/exp_id.txt @@ -1 +1 @@ -{task}_task_moe_v3freeze_cyclic \ No newline at end of file +{task}_task_moe_slot_cyclic_fixed \ No newline at end of file diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/OUT_all.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/OUT_all.yaml index 235694cb..d361911d 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/OUT_all.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/OUT_all.yaml @@ -8,6 +8,7 @@ data: detect_satlas_wind_turbine: 8 detect_sentinel1_vessels: 8 detect_sentinel2_vessels: 8 + segment: 2 segment_satlas_solar_farm: 8 vessel_classification: 16 vessel_detection: 8 @@ -2219,6 +2220,741 @@ data: - split1 - split7 patch_size: 128 + segment: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 2 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_1: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_10: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_11: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_2: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_3: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_4: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_5: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_6: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_7: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_8: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_9: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1d_0: [] + s1d_1: [] + s1d_10: [] + s1d_11: [] + s1d_2: [] + s1d_3: [] + s1d_4: [] + s1d_5: [] + s1d_6: [] + s1d_7: [] + s1d_8: [] + s1d_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + s1d_0: + bands: + - vv + - vh + data_type: raster + layers: + - s1d + passthrough: true + s1d_1: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.1 + passthrough: true + s1d_10: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.10 + passthrough: true + s1d_11: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.11 + passthrough: true + s1d_2: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.2 + passthrough: true + s1d_3: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.3 + passthrough: true + s1d_4: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.4 + passthrough: true + s1d_5: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.5 + passthrough: true + s1d_6: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.6 + passthrough: true + s1d_7: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.7 + passthrough: true + s1d_8: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.8 + passthrough: true + s1d_9: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.9 + passthrough: true + targets: + bands: + - class + data_type: raster + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/pastis/rslearn_dataset/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + segment: + targets: targets + tasks: + segment: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_miou_metric: true + metric_kwargs: + average: micro + num_classes: 20 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + zero_is_invalid: true + test_config: + groups: + - fold5 + train_config: + groups: + - fold1 + - fold2 + - fold3 + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_1: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_10: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_11: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_2: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_3: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_4: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_5: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_6: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_7: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_8: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_9: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1d_0: [] + s1d_1: [] + s1d_10: [] + s1d_11: [] + s1d_2: [] + s1d_3: [] + s1d_4: [] + s1d_5: [] + s1d_6: [] + s1d_7: [] + s1d_8: [] + s1d_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + - target/segment/classes + - target/segment/valid + val_config: + groups: + - fold4 segment_satlas_solar_farm: class_path: rslearn.train.data_module.RslearnDataModule init_args: @@ -2879,7 +3615,7 @@ data: model: class_path: rslearn.train.lightning_module.RslearnLightningModule init_args: - lr: 0.0001 + lr: 0.0002 model: class_path: rslearn.models.multitask.MultiTaskMergedModel init_args: @@ -2895,6 +3631,7 @@ model: - detect_sentinel1_vessels - detect_sentinel2_vessels SegmentationHead: + - segment - segment_satlas_solar_farm decoders: ClassificationHead: @@ -2924,7 +3661,7 @@ model: 2: 256 4: 512 8: 512 - out_channels: 2 + out_channels: 22 - class_path: rslearn.train.tasks.segmentation.SegmentationHead encoder: - class_path: rslp.helios.model.TaskConditionedHelios @@ -2935,7 +3672,7 @@ model: model_overrides: encoder_config: task_lora_kwargs: - gen_hidden: 64 + gen_hidden: 128 task_lora_indices: - 0 - 1 @@ -2952,17 +3689,20 @@ model: use_task_lora: true task_moe_kwargs: add_noise: true + compute_slots_from_task: true expert_mult: 4 noise_mult: 0.2 num_experts: 4 num_slots: 4 task_moe_indices: + - 9 + - 10 - 11 use_task_moe: true selector: - encoder task_embed_opts: - path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct.pt + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt type: precomputed lazy_decode: true task_label_offsets: @@ -2990,9 +3730,13 @@ model: num_outputs: 2 offset: 0 outputs_key: labels + segment: + num_outputs: 20 + offset: 0 + outputs_key: classes segment_satlas_solar_farm: num_outputs: 2 - offset: 0 + offset: 20 outputs_key: classes vessel_classification: num_outputs: 2 @@ -3023,6 +3767,8 @@ model: targets: targets detect_sentinel2_vessels: targets: targets + segment: + targets: targets segment_satlas_solar_farm: targets: targets vessel_classification: @@ -3204,6 +3950,19 @@ model: - 1 - - 0 - 255 + segment: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_miou_metric: true + metric_kwargs: + average: micro + num_classes: 20 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + zero_is_invalid: true segment_satlas_solar_farm: class_path: rslearn.train.tasks.segmentation.SegmentationTask init_args: @@ -3300,13 +4059,5 @@ trainer: - encoder unfreeze_selectors: - head - - moe - - lora - - at_epoch: 40 - freeze_selectors: [] - unfreeze_selectors: - - head - - moe - lora - - encoder max_epochs: 200 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/OUT_classify.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/OUT_classify.yaml index 16e0cf6a..b24998d4 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/OUT_classify.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/OUT_classify.yaml @@ -987,7 +987,7 @@ data: model: class_path: rslearn.train.lightning_module.RslearnLightningModule init_args: - lr: 0.0001 + lr: 0.0002 model: class_path: rslearn.models.multitask.MultiTaskMergedModel init_args: @@ -1012,7 +1012,7 @@ model: model_overrides: encoder_config: task_lora_kwargs: - gen_hidden: 64 + gen_hidden: 128 task_lora_indices: - 0 - 1 @@ -1029,17 +1029,20 @@ model: use_task_lora: true task_moe_kwargs: add_noise: true + compute_slots_from_task: true expert_mult: 4 noise_mult: 0.2 num_experts: 4 num_slots: 4 task_moe_indices: + - 9 + - 10 - 11 use_task_moe: true selector: - encoder task_embed_opts: - path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct.pt + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt type: precomputed lazy_decode: true task_label_offsets: @@ -1137,13 +1140,5 @@ trainer: - encoder unfreeze_selectors: - head - - moe - - lora - - at_epoch: 40 - freeze_selectors: [] - unfreeze_selectors: - - head - - moe - lora - - encoder max_epochs: 200 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/OUT_detect.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/OUT_detect.yaml index 82964d14..6e80482f 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/OUT_detect.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/OUT_detect.yaml @@ -1474,7 +1474,7 @@ data: model: class_path: rslearn.train.lightning_module.RslearnLightningModule init_args: - lr: 0.0001 + lr: 0.0002 model: class_path: rslearn.models.multitask.MultiTaskMergedModel init_args: @@ -1504,7 +1504,7 @@ model: model_overrides: encoder_config: task_lora_kwargs: - gen_hidden: 64 + gen_hidden: 128 task_lora_indices: - 0 - 1 @@ -1521,17 +1521,20 @@ model: use_task_lora: true task_moe_kwargs: add_noise: true + compute_slots_from_task: true expert_mult: 4 noise_mult: 0.2 num_experts: 4 num_slots: 4 task_moe_indices: + - 9 + - 10 - 11 use_task_moe: true selector: - encoder task_embed_opts: - path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct.pt + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt type: precomputed lazy_decode: true task_label_offsets: @@ -1784,13 +1787,5 @@ trainer: - encoder unfreeze_selectors: - head - - moe - - lora - - at_epoch: 40 - freeze_selectors: [] - unfreeze_selectors: - - head - - moe - lora - - encoder max_epochs: 200 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/OUT_segment.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/OUT_segment.yaml index 8aea6077..8499280e 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/OUT_segment.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/OUT_segment.yaml @@ -1204,7 +1204,7 @@ model: model_overrides: encoder_config: task_lora_kwargs: - gen_hidden: 64 + gen_hidden: 128 task_lora_indices: - 0 - 1 @@ -1221,17 +1221,20 @@ model: use_task_lora: true task_moe_kwargs: add_noise: true + compute_slots_from_task: true expert_mult: 4 noise_mult: 0.2 num_experts: 4 num_slots: 4 task_moe_indices: + - 9 + - 10 - 11 use_task_moe: true selector: - encoder task_embed_opts: - path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct.pt + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt type: precomputed lazy_decode: true task_label_offsets: @@ -1321,13 +1324,5 @@ trainer: - encoder unfreeze_selectors: - head - - moe - - lora - - at_epoch: 40 - freeze_selectors: [] - unfreeze_selectors: - - head - - moe - lora - - encoder max_epochs: 200 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/all.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/all.yaml index de42b3d7..381ef05e 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/all.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/all.yaml @@ -6,8 +6,8 @@ dataset_cfgs: - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_nandi_crop_type/finetune_s1_s2_cosinelr.yaml - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_worldcereal_cropland/finetune_s1_s2_cosinelr.yaml - # - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_pastis/basecfg_cosinelr.yaml - # - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_pastis/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_pastis/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_pastis/basecfg_helios_mm.yaml - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_solar_farm_128/basecfg_cosinelr.yaml - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_solar_farm_128/basecfg_helios_mm.yaml diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/base.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/base.yaml index 12343d3d..c2d20976 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/base.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/base.yaml @@ -16,21 +16,22 @@ model: task_lora_kwargs: use_task_lora: true task_lora_indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] - gen_hidden: 64 + gen_hidden: 128 task_moe_kwargs: use_task_moe: true - task_moe_indices: [11] + task_moe_indices: [9, 10, 11] add_noise: true noise_mult: 0.2 num_experts: 4 num_slots: 4 expert_mult: 4 + compute_slots_from_task: true task_embed_opts: type: "precomputed" - path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct.pt + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt decoders: # Filled in by make_multidataset_config.py lazy_decode: true - lr: 0.0001 + lr: 0.0002 scheduler: class_path: rslearn.train.scheduler.CosineAnnealingScheduler init_args: @@ -65,10 +66,7 @@ trainer: unfreeze_selectors: ["head", "moe"] - at_epoch: 20 freeze_selectors: ["encoder"] - unfreeze_selectors: ["head", "moe", "lora"] - - at_epoch: 40 - freeze_selectors: [] - unfreeze_selectors: ["head", "moe", "lora", "encoder"] + unfreeze_selectors: ["head", "lora"] rslp_project: placeholder rslp_experiment: placeholder diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/exp_id.txt b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/exp_id.txt index 65cbea4f..0da1ab72 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/exp_id.txt +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/exp_id.txt @@ -1 +1 @@ -{task}_lora_task_moe_v5_cyclic \ No newline at end of file +{task}_alltricks_cyclic_fixed \ No newline at end of file diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_lora/OUT_all.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_lora/OUT_all.yaml new file mode 100644 index 00000000..9716e3d9 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_lora/OUT_all.yaml @@ -0,0 +1,4050 @@ +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + batch_sizes: + crop_type_classification: 32 + cropland_classification: 16 + detect_satlas_marine_infra: 8 + detect_satlas_wind_turbine: 8 + detect_sentinel1_vessels: 8 + detect_sentinel2_vessels: 8 + segment: 2 + segment_satlas_solar_farm: 8 + vessel_classification: 16 + vessel_detection: 8 + data_modules: + crop_type_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 32 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: [] + sentinel2_1: [] + sentinel2_10: [] + sentinel2_11: [] + sentinel2_2: [] + sentinel2_3: [] + sentinel2_4: [] + sentinel2_5: [] + sentinel2_6: [] + sentinel2_7: [] + sentinel2_8: [] + sentinel2_9: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + sentinel1_0: [] + sentinel1_1: [] + sentinel1_10: [] + sentinel1_11: [] + sentinel1_2: [] + sentinel1_3: [] + sentinel1_4: [] + sentinel1_5: [] + sentinel1_6: [] + sentinel1_7: [] + sentinel1_8: [] + sentinel1_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.pad.Pad + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + mode: center + size: 8 + inputs: + label: + data_type: vector + is_target: true + layers: + - label + sentinel1_0: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + sentinel1_1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + sentinel1_10: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.10 + passthrough: true + sentinel1_11: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.11 + passthrough: true + sentinel1_2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + sentinel1_3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + sentinel1_4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.4 + passthrough: true + sentinel1_5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.5 + passthrough: true + sentinel1_6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.6 + passthrough: true + sentinel1_7: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.7 + passthrough: true + sentinel1_8: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.8 + passthrough: true + sentinel1_9: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.9 + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/crop/kenya_nandi/20250625 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + crop_type_classification: + label: targets + tasks: + crop_type_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Coffee + - Trees + - Grassland + - Maize + - Sugarcane + - Tea + - Water + - Built-up + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + test_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: val + train_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: train + val_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: val + cropland_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 16 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: [] + sentinel2_1: [] + sentinel2_10: [] + sentinel2_11: [] + sentinel2_2: [] + sentinel2_3: [] + sentinel2_4: [] + sentinel2_5: [] + sentinel2_6: [] + sentinel2_7: [] + sentinel2_8: [] + sentinel2_9: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + sentinel1_0: [] + sentinel1_1: [] + sentinel1_10: [] + sentinel1_11: [] + sentinel1_2: [] + sentinel1_3: [] + sentinel1_4: [] + sentinel1_5: [] + sentinel1_6: [] + sentinel1_7: [] + sentinel1_8: [] + sentinel1_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.pad.Pad + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + mode: center + size: 8 + inputs: + label: + data_type: vector + is_target: true + layers: + - label + sentinel1_0: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1 + passthrough: true + sentinel1_1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.1 + passthrough: true + sentinel1_10: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.10 + passthrough: true + sentinel1_11: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.11 + passthrough: true + sentinel1_2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.2 + passthrough: true + sentinel1_3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.3 + passthrough: true + sentinel1_4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.4 + passthrough: true + sentinel1_5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.5 + passthrough: true + sentinel1_6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.6 + passthrough: true + sentinel1_7: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.7 + passthrough: true + sentinel1_8: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.8 + passthrough: true + sentinel1_9: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.9 + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/crop/worldcereal_cropland/20250626 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + cropland_classification: + label: targets + tasks: + cropland_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Cropland + - Non-Cropland + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + test_config: + groups: + - h3_sample100_66K + tags: + split: val + train_config: + groups: + - h3_sample100_66K + tags: + split: train + val_config: + groups: + - h3_sample100_66K + tags: + split: val + detect_satlas_marine_infra: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/marine_infra/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_marine_infra: + targets: targets + tasks: + detect_satlas_marine_infra: + class_path: rslp.satlas.train.MarineInfraTask + init_args: + box_size: 15 + classes: + - unknown + - platform + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + - - 0.1 + - - 0.2 + - - 0.3 + - - 0.4 + - - 0.5 + - - 0.6 + - - 0.7 + - - 0.8 + - - 0.9 + image_bands: + - 2 + - 1 + - 0 + property_name: category + remap_values: + - - 0 + - 0.25 + - - 0 + - 255 + skip_unknown_categories: true + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 65536 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_satlas_marine_infra + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + val_config: + patch_size: 128 + tags: + split: val + detect_satlas_wind_turbine: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + s25: [] + s26: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + landsat5: [] + landsat6: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + s1a5: [] + s1a6: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + landsat5: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.4 + passthrough: true + landsat6: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.5 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1a5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.4 + passthrough: true + s1a6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.5 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s1d5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.4 + passthrough: true + s1d6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.5 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + s25: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + s26: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/wind_turbine/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_wind_turbine: + targets: targets + tasks: + detect_satlas_wind_turbine: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 65536 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + s25: [] + s26: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + landsat5: [] + landsat6: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + s1a5: [] + s1a6: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_satlas_wind_turbine + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + val_config: + patch_size: 128 + tags: + split: val + detect_sentinel1_vessels: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/sentinel1_vessels/dataset_v1/20250602/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_sentinel1_vessels: + targets: targets + tasks: + detect_sentinel1_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + image_bands: + - 1 + - 1 + - 1 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.5 + test_config: + groups: + - val_ascending + - val_descending + patch_size: 128 + train_config: + groups: + - train_ascending + - train_descending + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 32768 + replacement: true + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_sentinel1_vessels + image_selectors: + - image + - sentinel1 + val_config: + groups: + - val_ascending + - val_descending + patch_size: 128 + detect_sentinel2_vessels: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/sentinel2_vessels/dataset_v1/20250213/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_sentinel2_vessels: + targets: targets + tasks: + detect_sentinel2_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + groups: + - sargassum_val + - split1 + - split7 + patch_size: 128 + train_config: + groups: + - sargassum_train + - split2 + - split3 + - split4 + - split5 + - split6 + - train + - train-bg + - train2 + - train3 + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 131072 + replacement: true + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_sentinel2_vessels + image_selectors: + - image + - sentinel2_l2a + val_config: + groups: + - sargassum_val + - split1 + - split7 + patch_size: 128 + segment: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 2 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_1: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_10: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_11: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_2: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_3: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_4: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_5: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_6: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_7: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_8: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_9: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1d_0: [] + s1d_1: [] + s1d_10: [] + s1d_11: [] + s1d_2: [] + s1d_3: [] + s1d_4: [] + s1d_5: [] + s1d_6: [] + s1d_7: [] + s1d_8: [] + s1d_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + s1d_0: + bands: + - vv + - vh + data_type: raster + layers: + - s1d + passthrough: true + s1d_1: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.1 + passthrough: true + s1d_10: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.10 + passthrough: true + s1d_11: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.11 + passthrough: true + s1d_2: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.2 + passthrough: true + s1d_3: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.3 + passthrough: true + s1d_4: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.4 + passthrough: true + s1d_5: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.5 + passthrough: true + s1d_6: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.6 + passthrough: true + s1d_7: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.7 + passthrough: true + s1d_8: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.8 + passthrough: true + s1d_9: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.9 + passthrough: true + targets: + bands: + - class + data_type: raster + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/pastis/rslearn_dataset/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + segment: + targets: targets + tasks: + segment: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_miou_metric: true + metric_kwargs: + average: micro + num_classes: 20 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + zero_is_invalid: true + test_config: + groups: + - fold5 + train_config: + groups: + - fold1 + - fold2 + - fold3 + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_1: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_10: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_11: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_2: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_3: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_4: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_5: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_6: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_7: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_8: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_9: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1d_0: [] + s1d_1: [] + s1d_10: [] + s1d_11: [] + s1d_2: [] + s1d_3: [] + s1d_4: [] + s1d_5: [] + s1d_6: [] + s1d_7: [] + s1d_8: [] + s1d_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + - target/segment/classes + - target/segment/valid + val_config: + groups: + - fold4 + segment_satlas_solar_farm: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + targets: + bands: + - label + data_type: raster + dtype: INT32 + is_target: true + layers: + - label_raster + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/solar_farm/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + segment_satlas_solar_farm: + targets: targets + tasks: + segment_satlas_solar_farm: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_f1_metric: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + metric_kwargs: + average: micro + num_classes: 2 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 16384 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - target/segment_satlas_solar_farm/classes + - target/segment_satlas_solar_farm/valid + val_config: + patch_size: 128 + tags: + split: val + vessel_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 16 + default_config: + transforms: + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + label: + data_type: vector + is_target: true + layers: + - label + landsat: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/landsat_vessel_detection/classifier/dataset_20250624 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + vessel_classification: + label: targets + tasks: + vessel_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + allow_invalid: true + classes: + - correct + - incorrect + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: label + skip_unknown_categories: true + test_config: + groups: + - phase2a_completed + tags: + split: val + train_config: + groups: + - selected_copy + - phase2a_completed + - phase3a_selected + tags: + split: train + val_config: + groups: + - phase2a_completed + tags: + split: val + vessel_detection: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/landsat_vessel_detection/detector/dataset_20250624 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + vessel_detection: + targets: targets + tasks: + vessel_detection: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.7 + test_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: val + train_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: train + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + val_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: val + num_workers: 16 + refill_batches: true + sample_mode: random_cycle +model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.0002 + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + decoder_to_target: + ClassificationHead: + - vessel_classification + - crop_type_classification + - cropland_classification + FasterRCNN: + - vessel_detection + - detect_satlas_marine_infra + - detect_satlas_wind_turbine + - detect_sentinel1_vessels + - detect_sentinel2_vessels + SegmentationHead: + - segment + - segment_satlas_solar_farm + decoders: + ClassificationHead: + - class_path: rslearn.models.pooling_decoder.PoolingDecoder + init_args: + in_channels: 768 + out_channels: 12 + - class_path: rslearn.train.tasks.classification.ClassificationHead + FasterRCNN: + - class_path: rslearn.models.faster_rcnn.FasterRCNN + init_args: + anchor_sizes: + - - 32 + downsample_factors: + - 8 + num_channels: 768 + num_classes: 8 + SegmentationHead: + - class_path: rslearn.models.unet.UNetDecoder + init_args: + conv_layers_per_resolution: 2 + in_channels: + - - 8 + - 768 + num_channels: + 1: 128 + 2: 256 + 4: 512 + 8: 512 + out_channels: 22 + - class_path: rslearn.train.tasks.segmentation.SegmentationHead + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: /weka/dfive-default/helios/checkpoints/yawenzzzz/latent_mim_cross_random_per_modality_patchdisc_add_contrastive_0.1_1/step400000 + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_lora_kwargs: + gen_hidden: 128 + task_lora_indices: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 10 + - 11 + use_task_lora: true + selector: + - encoder + task_embed_opts: + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt + type: precomputed + lazy_decode: true + task_label_offsets: + crop_type_classification: + num_outputs: 8 + offset: 2 + outputs_key: class + cropland_classification: + num_outputs: 2 + offset: 10 + outputs_key: class + detect_satlas_marine_infra: + num_outputs: 3 + offset: 2 + outputs_key: labels + detect_satlas_wind_turbine: + num_outputs: 3 + offset: 5 + outputs_key: labels + detect_sentinel1_vessels: + num_outputs: 2 + offset: 0 + outputs_key: labels + detect_sentinel2_vessels: + num_outputs: 2 + offset: 0 + outputs_key: labels + segment: + num_outputs: 20 + offset: 0 + outputs_key: classes + segment_satlas_solar_farm: + num_outputs: 2 + offset: 20 + outputs_key: classes + vessel_classification: + num_outputs: 2 + offset: 0 + outputs_key: class + vessel_detection: + num_outputs: 2 + offset: 0 + outputs_key: labels + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 50 + eta_min: 0 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + crop_type_classification: + label: targets + cropland_classification: + label: targets + detect_satlas_marine_infra: + targets: targets + detect_satlas_wind_turbine: + targets: targets + detect_sentinel1_vessels: + targets: targets + detect_sentinel2_vessels: + targets: targets + segment: + targets: targets + segment_satlas_solar_farm: + targets: targets + vessel_classification: + label: targets + vessel_detection: + targets: targets + tasks: + crop_type_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Coffee + - Trees + - Grassland + - Maize + - Sugarcane + - Tea + - Water + - Built-up + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + cropland_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Cropland + - Non-Cropland + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + detect_satlas_marine_infra: + class_path: rslp.satlas.train.MarineInfraTask + init_args: + box_size: 15 + classes: + - unknown + - platform + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + - - 0.1 + - - 0.2 + - - 0.3 + - - 0.4 + - - 0.5 + - - 0.6 + - - 0.7 + - - 0.8 + - - 0.9 + image_bands: + - 2 + - 1 + - 0 + property_name: category + remap_values: + - - 0 + - 0.25 + - - 0 + - 255 + skip_unknown_categories: true + detect_satlas_wind_turbine: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + detect_sentinel1_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + image_bands: + - 1 + - 1 + - 1 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.5 + detect_sentinel2_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + segment: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_miou_metric: true + metric_kwargs: + average: micro + num_classes: 20 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + zero_is_invalid: true + segment_satlas_solar_farm: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_f1_metric: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + metric_kwargs: + average: micro + num_classes: 2 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + vessel_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + allow_invalid: true + classes: + - correct + - incorrect + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: label + skip_unknown_categories: true + vessel_detection: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.7 +rslp_experiment: placeholder +rslp_project: placeholder +trainer: + accumulate_grad_batches: 9 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: epoch + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + mode: min + monitor: val_loss + save_last: true + save_top_k: 1 + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - at_epoch: 0 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - at_epoch: 20 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - lora + max_epochs: 500 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_lora/OUT_classify.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_lora/OUT_classify.yaml new file mode 100644 index 00000000..494dc158 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_lora/OUT_classify.yaml @@ -0,0 +1,1131 @@ +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + batch_sizes: + crop_type_classification: 32 + cropland_classification: 16 + vessel_classification: 16 + data_modules: + crop_type_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 32 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: [] + sentinel2_1: [] + sentinel2_10: [] + sentinel2_11: [] + sentinel2_2: [] + sentinel2_3: [] + sentinel2_4: [] + sentinel2_5: [] + sentinel2_6: [] + sentinel2_7: [] + sentinel2_8: [] + sentinel2_9: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + sentinel1_0: [] + sentinel1_1: [] + sentinel1_10: [] + sentinel1_11: [] + sentinel1_2: [] + sentinel1_3: [] + sentinel1_4: [] + sentinel1_5: [] + sentinel1_6: [] + sentinel1_7: [] + sentinel1_8: [] + sentinel1_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.pad.Pad + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + mode: center + size: 8 + inputs: + label: + data_type: vector + is_target: true + layers: + - label + sentinel1_0: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + sentinel1_1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + sentinel1_10: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.10 + passthrough: true + sentinel1_11: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.11 + passthrough: true + sentinel1_2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + sentinel1_3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + sentinel1_4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.4 + passthrough: true + sentinel1_5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.5 + passthrough: true + sentinel1_6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.6 + passthrough: true + sentinel1_7: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.7 + passthrough: true + sentinel1_8: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.8 + passthrough: true + sentinel1_9: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.9 + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/crop/kenya_nandi/20250625 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + crop_type_classification: + label: targets + tasks: + crop_type_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Coffee + - Trees + - Grassland + - Maize + - Sugarcane + - Tea + - Water + - Built-up + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + test_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: val + train_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: train + val_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: val + cropland_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 16 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: [] + sentinel2_1: [] + sentinel2_10: [] + sentinel2_11: [] + sentinel2_2: [] + sentinel2_3: [] + sentinel2_4: [] + sentinel2_5: [] + sentinel2_6: [] + sentinel2_7: [] + sentinel2_8: [] + sentinel2_9: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + sentinel1_0: [] + sentinel1_1: [] + sentinel1_10: [] + sentinel1_11: [] + sentinel1_2: [] + sentinel1_3: [] + sentinel1_4: [] + sentinel1_5: [] + sentinel1_6: [] + sentinel1_7: [] + sentinel1_8: [] + sentinel1_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.pad.Pad + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + mode: center + size: 8 + inputs: + label: + data_type: vector + is_target: true + layers: + - label + sentinel1_0: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1 + passthrough: true + sentinel1_1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.1 + passthrough: true + sentinel1_10: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.10 + passthrough: true + sentinel1_11: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.11 + passthrough: true + sentinel1_2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.2 + passthrough: true + sentinel1_3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.3 + passthrough: true + sentinel1_4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.4 + passthrough: true + sentinel1_5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.5 + passthrough: true + sentinel1_6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.6 + passthrough: true + sentinel1_7: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.7 + passthrough: true + sentinel1_8: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.8 + passthrough: true + sentinel1_9: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.9 + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/crop/worldcereal_cropland/20250626 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + cropland_classification: + label: targets + tasks: + cropland_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Cropland + - Non-Cropland + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + test_config: + groups: + - h3_sample100_66K + tags: + split: val + train_config: + groups: + - h3_sample100_66K + tags: + split: train + val_config: + groups: + - h3_sample100_66K + tags: + split: val + vessel_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 16 + default_config: + transforms: + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + label: + data_type: vector + is_target: true + layers: + - label + landsat: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/landsat_vessel_detection/classifier/dataset_20250624 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + vessel_classification: + label: targets + tasks: + vessel_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + allow_invalid: true + classes: + - correct + - incorrect + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: label + skip_unknown_categories: true + test_config: + groups: + - phase2a_completed + tags: + split: val + train_config: + groups: + - selected_copy + - phase2a_completed + - phase3a_selected + tags: + split: train + val_config: + groups: + - phase2a_completed + tags: + split: val + num_workers: 16 + refill_batches: true + sample_mode: random_cycle +model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.0002 + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + decoder_to_target: + ClassificationHead: + - vessel_classification + - crop_type_classification + - cropland_classification + decoders: + ClassificationHead: + - class_path: rslearn.models.pooling_decoder.PoolingDecoder + init_args: + in_channels: 768 + out_channels: 12 + - class_path: rslearn.train.tasks.classification.ClassificationHead + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: /weka/dfive-default/helios/checkpoints/yawenzzzz/latent_mim_cross_random_per_modality_patchdisc_add_contrastive_0.1_1/step400000 + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_lora_kwargs: + gen_hidden: 128 + task_lora_indices: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 10 + - 11 + use_task_lora: true + selector: + - encoder + task_embed_opts: + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt + type: precomputed + lazy_decode: true + task_label_offsets: + crop_type_classification: + num_outputs: 8 + offset: 2 + outputs_key: class + cropland_classification: + num_outputs: 2 + offset: 10 + outputs_key: class + vessel_classification: + num_outputs: 2 + offset: 0 + outputs_key: class + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 50 + eta_min: 0 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + crop_type_classification: + label: targets + cropland_classification: + label: targets + vessel_classification: + label: targets + tasks: + crop_type_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Coffee + - Trees + - Grassland + - Maize + - Sugarcane + - Tea + - Water + - Built-up + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + cropland_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Cropland + - Non-Cropland + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + vessel_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + allow_invalid: true + classes: + - correct + - incorrect + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: label + skip_unknown_categories: true +rslp_experiment: placeholder +rslp_project: placeholder +trainer: + accumulate_grad_batches: 3 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: epoch + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + mode: min + monitor: val_loss + save_last: true + save_top_k: 1 + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - at_epoch: 0 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - at_epoch: 20 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - lora + max_epochs: 500 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_lora/OUT_detect.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_lora/OUT_detect.yaml new file mode 100644 index 00000000..c8e9bb2e --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_lora/OUT_detect.yaml @@ -0,0 +1,1778 @@ +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + batch_sizes: + detect_satlas_marine_infra: 8 + detect_satlas_wind_turbine: 8 + detect_sentinel1_vessels: 8 + detect_sentinel2_vessels: 8 + vessel_detection: 8 + data_modules: + detect_satlas_marine_infra: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/marine_infra/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_marine_infra: + targets: targets + tasks: + detect_satlas_marine_infra: + class_path: rslp.satlas.train.MarineInfraTask + init_args: + box_size: 15 + classes: + - unknown + - platform + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + - - 0.1 + - - 0.2 + - - 0.3 + - - 0.4 + - - 0.5 + - - 0.6 + - - 0.7 + - - 0.8 + - - 0.9 + image_bands: + - 2 + - 1 + - 0 + property_name: category + remap_values: + - - 0 + - 0.25 + - - 0 + - 255 + skip_unknown_categories: true + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 65536 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_satlas_marine_infra + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + val_config: + patch_size: 128 + tags: + split: val + detect_satlas_wind_turbine: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + s25: [] + s26: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + landsat5: [] + landsat6: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + s1a5: [] + s1a6: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + landsat5: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.4 + passthrough: true + landsat6: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.5 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1a5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.4 + passthrough: true + s1a6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.5 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s1d5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.4 + passthrough: true + s1d6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.5 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + s25: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + s26: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/wind_turbine/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_wind_turbine: + targets: targets + tasks: + detect_satlas_wind_turbine: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 65536 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + s25: [] + s26: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + landsat5: [] + landsat6: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + s1a5: [] + s1a6: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_satlas_wind_turbine + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + val_config: + patch_size: 128 + tags: + split: val + detect_sentinel1_vessels: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/sentinel1_vessels/dataset_v1/20250602/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_sentinel1_vessels: + targets: targets + tasks: + detect_sentinel1_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + image_bands: + - 1 + - 1 + - 1 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.5 + test_config: + groups: + - val_ascending + - val_descending + patch_size: 128 + train_config: + groups: + - train_ascending + - train_descending + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 32768 + replacement: true + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_sentinel1_vessels + image_selectors: + - image + - sentinel1 + val_config: + groups: + - val_ascending + - val_descending + patch_size: 128 + detect_sentinel2_vessels: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/sentinel2_vessels/dataset_v1/20250213/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_sentinel2_vessels: + targets: targets + tasks: + detect_sentinel2_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + groups: + - sargassum_val + - split1 + - split7 + patch_size: 128 + train_config: + groups: + - sargassum_train + - split2 + - split3 + - split4 + - split5 + - split6 + - train + - train-bg + - train2 + - train3 + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 131072 + replacement: true + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_sentinel2_vessels + image_selectors: + - image + - sentinel2_l2a + val_config: + groups: + - sargassum_val + - split1 + - split7 + patch_size: 128 + vessel_detection: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/landsat_vessel_detection/detector/dataset_20250624 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + vessel_detection: + targets: targets + tasks: + vessel_detection: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.7 + test_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: val + train_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: train + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + val_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: val + num_workers: 16 + refill_batches: true + sample_mode: random_cycle +model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.0002 + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + decoder_to_target: + FasterRCNN: + - vessel_detection + - detect_satlas_marine_infra + - detect_satlas_wind_turbine + - detect_sentinel1_vessels + - detect_sentinel2_vessels + decoders: + FasterRCNN: + - class_path: rslearn.models.faster_rcnn.FasterRCNN + init_args: + anchor_sizes: + - - 32 + downsample_factors: + - 8 + num_channels: 768 + num_classes: 8 + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: /weka/dfive-default/helios/checkpoints/yawenzzzz/latent_mim_cross_random_per_modality_patchdisc_add_contrastive_0.1_1/step400000 + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_lora_kwargs: + gen_hidden: 128 + task_lora_indices: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 10 + - 11 + use_task_lora: true + selector: + - encoder + task_embed_opts: + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt + type: precomputed + lazy_decode: true + task_label_offsets: + detect_satlas_marine_infra: + num_outputs: 3 + offset: 2 + outputs_key: labels + detect_satlas_wind_turbine: + num_outputs: 3 + offset: 5 + outputs_key: labels + detect_sentinel1_vessels: + num_outputs: 2 + offset: 0 + outputs_key: labels + detect_sentinel2_vessels: + num_outputs: 2 + offset: 0 + outputs_key: labels + vessel_detection: + num_outputs: 2 + offset: 0 + outputs_key: labels + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 50 + eta_min: 0 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_marine_infra: + targets: targets + detect_satlas_wind_turbine: + targets: targets + detect_sentinel1_vessels: + targets: targets + detect_sentinel2_vessels: + targets: targets + vessel_detection: + targets: targets + tasks: + detect_satlas_marine_infra: + class_path: rslp.satlas.train.MarineInfraTask + init_args: + box_size: 15 + classes: + - unknown + - platform + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + - - 0.1 + - - 0.2 + - - 0.3 + - - 0.4 + - - 0.5 + - - 0.6 + - - 0.7 + - - 0.8 + - - 0.9 + image_bands: + - 2 + - 1 + - 0 + property_name: category + remap_values: + - - 0 + - 0.25 + - - 0 + - 255 + skip_unknown_categories: true + detect_satlas_wind_turbine: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + detect_sentinel1_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + image_bands: + - 1 + - 1 + - 1 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.5 + detect_sentinel2_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + vessel_detection: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.7 +rslp_experiment: placeholder +rslp_project: placeholder +trainer: + accumulate_grad_batches: 5 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: epoch + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + mode: min + monitor: val_loss + save_last: true + save_top_k: 1 + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - at_epoch: 0 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - at_epoch: 20 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - lora + max_epochs: 500 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_lora/OUT_segment.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_lora/OUT_segment.yaml new file mode 100644 index 00000000..d119ed1e --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_lora/OUT_segment.yaml @@ -0,0 +1,1315 @@ +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + batch_sizes: + segment: 2 + segment_satlas_solar_farm: 8 + data_modules: + segment: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 2 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_1: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_10: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_11: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_2: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_3: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_4: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_5: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_6: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_7: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_8: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_9: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1d_0: [] + s1d_1: [] + s1d_10: [] + s1d_11: [] + s1d_2: [] + s1d_3: [] + s1d_4: [] + s1d_5: [] + s1d_6: [] + s1d_7: [] + s1d_8: [] + s1d_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + s1d_0: + bands: + - vv + - vh + data_type: raster + layers: + - s1d + passthrough: true + s1d_1: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.1 + passthrough: true + s1d_10: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.10 + passthrough: true + s1d_11: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.11 + passthrough: true + s1d_2: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.2 + passthrough: true + s1d_3: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.3 + passthrough: true + s1d_4: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.4 + passthrough: true + s1d_5: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.5 + passthrough: true + s1d_6: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.6 + passthrough: true + s1d_7: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.7 + passthrough: true + s1d_8: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.8 + passthrough: true + s1d_9: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.9 + passthrough: true + targets: + bands: + - class + data_type: raster + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/pastis/rslearn_dataset/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + segment: + targets: targets + tasks: + segment: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_miou_metric: true + metric_kwargs: + average: micro + num_classes: 20 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + zero_is_invalid: true + test_config: + groups: + - fold5 + train_config: + groups: + - fold1 + - fold2 + - fold3 + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_1: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_10: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_11: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_2: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_3: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_4: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_5: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_6: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_7: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_8: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_9: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1d_0: [] + s1d_1: [] + s1d_10: [] + s1d_11: [] + s1d_2: [] + s1d_3: [] + s1d_4: [] + s1d_5: [] + s1d_6: [] + s1d_7: [] + s1d_8: [] + s1d_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + - target/segment/classes + - target/segment/valid + val_config: + groups: + - fold4 + segment_satlas_solar_farm: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + targets: + bands: + - label + data_type: raster + dtype: INT32 + is_target: true + layers: + - label_raster + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/solar_farm/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + segment_satlas_solar_farm: + targets: targets + tasks: + segment_satlas_solar_farm: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_f1_metric: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + metric_kwargs: + average: micro + num_classes: 2 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 16384 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - target/segment_satlas_solar_farm/classes + - target/segment_satlas_solar_farm/valid + val_config: + patch_size: 128 + tags: + split: val + num_workers: 16 + refill_batches: true + sample_mode: random_cycle +model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.0002 + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + decoder_to_target: + SegmentationHead: + - segment + - segment_satlas_solar_farm + decoders: + SegmentationHead: + - class_path: rslearn.models.unet.UNetDecoder + init_args: + conv_layers_per_resolution: 2 + in_channels: + - - 8 + - 768 + num_channels: + 1: 128 + 2: 256 + 4: 512 + 8: 512 + out_channels: 22 + - class_path: rslearn.train.tasks.segmentation.SegmentationHead + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_lora_kwargs: + gen_hidden: 128 + task_lora_indices: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 10 + - 11 + use_task_lora: true + selector: + - encoder + task_embed_opts: + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt + type: precomputed + lazy_decode: true + task_label_offsets: + segment: + num_outputs: 20 + offset: 0 + outputs_key: classes + segment_satlas_solar_farm: + num_outputs: 2 + offset: 20 + outputs_key: classes + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 50 + eta_min: 0 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + segment: + targets: targets + segment_satlas_solar_farm: + targets: targets + tasks: + segment: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_miou_metric: true + metric_kwargs: + average: micro + num_classes: 20 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + zero_is_invalid: true + segment_satlas_solar_farm: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_f1_metric: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + metric_kwargs: + average: micro + num_classes: 2 + remap_values: + - - 0 + - 1 + - - 0 + - 255 +rslp_experiment: placeholder +rslp_project: placeholder +trainer: + accumulate_grad_batches: 2 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: epoch + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + mode: min + monitor: val_loss + save_last: true + save_top_k: 1 + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - at_epoch: 0 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - at_epoch: 20 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - lora + max_epochs: 500 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_lora/all.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_lora/all.yaml new file mode 100644 index 00000000..1dc5fea6 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_lora/all.yaml @@ -0,0 +1,39 @@ +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_lora/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_lora/OUT_all.yaml + +dataset_cfgs: + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_classifier_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_nandi_crop_type/finetune_s1_s2_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_worldcereal_cropland/finetune_s1_s2_cosinelr.yaml + + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_pastis/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_pastis/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_solar_farm_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_solar_farm_128/basecfg_helios_mm.yaml + + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_detector_cosinelr.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_marine_infra_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_marine_infra_128/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_wind_turbine_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_wind_turbine_128/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_helios.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel2_vessels_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel2_vessels_128/basecfg_helios.yaml + +substitutions: + patch_size: 8 + encoder_embedding_size: 768 + helios_checkpoint_path: /weka/dfive-default/helios/checkpoints/yawenzzzz/latent_mim_cross_random_per_modality_patchdisc_add_contrastive_0.1_1/step400000 + +global_overrides: + model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + trainer: + accumulate_grad_batches: 9 + +merge_options: + merge_heads: true + merge_task_labels: true + same_label_groups: + - [detect_sentinel1_vessels, detect_sentinel2_vessels, vessel_detection] \ No newline at end of file diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_lora/base.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_lora/base.yaml new file mode 100644 index 00000000..5e345c9c --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_lora/base.yaml @@ -0,0 +1,65 @@ +model: + class_path: rslp.helios.lightning_module.MoELightningModule + init_args: + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: "{CHECKPOINT_PATH}" + selector: ["encoder"] + forward_kwargs: + patch_size: {PATCH_SIZE} + model_overrides: + encoder_config: + task_lora_kwargs: + use_task_lora: true + task_lora_indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] + gen_hidden: 128 + task_embed_opts: + type: "precomputed" + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt + decoders: # Filled in by make_multidataset_config.py + lazy_decode: true + lr: 0.0002 + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 50 + eta_min: 0 + +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + sample_mode: random_cycle + refill_batches: true + num_workers: 16 + data_modules: # Filled in by make_multidataset_config.py + +trainer: + max_epochs: 500 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: "epoch" + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + save_top_k: 1 + save_last: true + monitor: val_loss + mode: min + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - at_epoch: 0 + freeze_selectors: ["encoder"] + unfreeze_selectors: ["head"] + - at_epoch: 20 + freeze_selectors: ["encoder"] + unfreeze_selectors: ["head", "lora"] + +rslp_project: placeholder +rslp_experiment: placeholder + +all_dataset_info_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v3_multitask/all_dataset_info.yaml diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_lora/classify.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_lora/classify.yaml new file mode 100644 index 00000000..f9646053 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_lora/classify.yaml @@ -0,0 +1,23 @@ +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_lora/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_lora/OUT_classify.yaml + +dataset_cfgs: + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_classifier_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_nandi_crop_type/finetune_s1_s2_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_worldcereal_cropland/finetune_s1_s2_cosinelr.yaml + +substitutions: + patch_size: 8 + encoder_embedding_size: 768 + helios_checkpoint_path: /weka/dfive-default/helios/checkpoints/yawenzzzz/latent_mim_cross_random_per_modality_patchdisc_add_contrastive_0.1_1/step400000 + +global_overrides: + model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + trainer: + accumulate_grad_batches: 3 + +merge_options: + merge_heads: true + merge_task_labels: true + same_label_groups: diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_lora/detect.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_lora/detect.yaml new file mode 100644 index 00000000..6e47a1a2 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_lora/detect.yaml @@ -0,0 +1,30 @@ +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_lora/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_lora/OUT_detect.yaml + +dataset_cfgs: + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_detector_cosinelr.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_marine_infra_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_marine_infra_128/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_wind_turbine_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_wind_turbine_128/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_helios.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel2_vessels_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel2_vessels_128/basecfg_helios.yaml + +substitutions: + patch_size: 8 + encoder_embedding_size: 768 + helios_checkpoint_path: /weka/dfive-default/helios/checkpoints/yawenzzzz/latent_mim_cross_random_per_modality_patchdisc_add_contrastive_0.1_1/step400000 + +global_overrides: + model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + trainer: + accumulate_grad_batches: 5 + +merge_options: + merge_heads: true + merge_task_labels: true + same_label_groups: + - [detect_sentinel1_vessels, detect_sentinel2_vessels, vessel_detection] diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_lora/exp_id.txt b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_lora/exp_id.txt new file mode 100644 index 00000000..3f3ea41e --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_lora/exp_id.txt @@ -0,0 +1 @@ +{task}_lora_large_cyclic \ No newline at end of file diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_lora/segment.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_lora/segment.yaml new file mode 100644 index 00000000..92288ede --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_lora/segment.yaml @@ -0,0 +1,26 @@ +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/OUT_segment.yaml + +dataset_cfgs: + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_pastis/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_pastis/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_solar_farm_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_solar_farm_128/basecfg_helios_mm.yaml + +global_overrides: + model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.0002 + trainer: + accumulate_grad_batches: 2 + +merge_options: + merge_heads: true + merge_task_labels: true + same_label_groups: + +substitutions: + patch_size: 8 + encoder_embedding_size: 768 + helios_checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_moe/OUT_all.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_moe/OUT_all.yaml new file mode 100644 index 00000000..06e55676 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_moe/OUT_all.yaml @@ -0,0 +1,4047 @@ +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + batch_sizes: + crop_type_classification: 32 + cropland_classification: 16 + detect_satlas_marine_infra: 8 + detect_satlas_wind_turbine: 8 + detect_sentinel1_vessels: 8 + detect_sentinel2_vessels: 8 + segment: 2 + segment_satlas_solar_farm: 8 + vessel_classification: 16 + vessel_detection: 8 + data_modules: + crop_type_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 32 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: [] + sentinel2_1: [] + sentinel2_10: [] + sentinel2_11: [] + sentinel2_2: [] + sentinel2_3: [] + sentinel2_4: [] + sentinel2_5: [] + sentinel2_6: [] + sentinel2_7: [] + sentinel2_8: [] + sentinel2_9: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + sentinel1_0: [] + sentinel1_1: [] + sentinel1_10: [] + sentinel1_11: [] + sentinel1_2: [] + sentinel1_3: [] + sentinel1_4: [] + sentinel1_5: [] + sentinel1_6: [] + sentinel1_7: [] + sentinel1_8: [] + sentinel1_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.pad.Pad + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + mode: center + size: 8 + inputs: + label: + data_type: vector + is_target: true + layers: + - label + sentinel1_0: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + sentinel1_1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + sentinel1_10: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.10 + passthrough: true + sentinel1_11: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.11 + passthrough: true + sentinel1_2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + sentinel1_3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + sentinel1_4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.4 + passthrough: true + sentinel1_5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.5 + passthrough: true + sentinel1_6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.6 + passthrough: true + sentinel1_7: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.7 + passthrough: true + sentinel1_8: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.8 + passthrough: true + sentinel1_9: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.9 + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/crop/kenya_nandi/20250625 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + crop_type_classification: + label: targets + tasks: + crop_type_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Coffee + - Trees + - Grassland + - Maize + - Sugarcane + - Tea + - Water + - Built-up + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + test_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: val + train_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: train + val_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: val + cropland_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 16 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: [] + sentinel2_1: [] + sentinel2_10: [] + sentinel2_11: [] + sentinel2_2: [] + sentinel2_3: [] + sentinel2_4: [] + sentinel2_5: [] + sentinel2_6: [] + sentinel2_7: [] + sentinel2_8: [] + sentinel2_9: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + sentinel1_0: [] + sentinel1_1: [] + sentinel1_10: [] + sentinel1_11: [] + sentinel1_2: [] + sentinel1_3: [] + sentinel1_4: [] + sentinel1_5: [] + sentinel1_6: [] + sentinel1_7: [] + sentinel1_8: [] + sentinel1_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.pad.Pad + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + mode: center + size: 8 + inputs: + label: + data_type: vector + is_target: true + layers: + - label + sentinel1_0: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1 + passthrough: true + sentinel1_1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.1 + passthrough: true + sentinel1_10: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.10 + passthrough: true + sentinel1_11: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.11 + passthrough: true + sentinel1_2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.2 + passthrough: true + sentinel1_3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.3 + passthrough: true + sentinel1_4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.4 + passthrough: true + sentinel1_5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.5 + passthrough: true + sentinel1_6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.6 + passthrough: true + sentinel1_7: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.7 + passthrough: true + sentinel1_8: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.8 + passthrough: true + sentinel1_9: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.9 + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/crop/worldcereal_cropland/20250626 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + cropland_classification: + label: targets + tasks: + cropland_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Cropland + - Non-Cropland + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + test_config: + groups: + - h3_sample100_66K + tags: + split: val + train_config: + groups: + - h3_sample100_66K + tags: + split: train + val_config: + groups: + - h3_sample100_66K + tags: + split: val + detect_satlas_marine_infra: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/marine_infra/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_marine_infra: + targets: targets + tasks: + detect_satlas_marine_infra: + class_path: rslp.satlas.train.MarineInfraTask + init_args: + box_size: 15 + classes: + - unknown + - platform + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + - - 0.1 + - - 0.2 + - - 0.3 + - - 0.4 + - - 0.5 + - - 0.6 + - - 0.7 + - - 0.8 + - - 0.9 + image_bands: + - 2 + - 1 + - 0 + property_name: category + remap_values: + - - 0 + - 0.25 + - - 0 + - 255 + skip_unknown_categories: true + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 65536 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_satlas_marine_infra + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + val_config: + patch_size: 128 + tags: + split: val + detect_satlas_wind_turbine: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + s25: [] + s26: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + landsat5: [] + landsat6: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + s1a5: [] + s1a6: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + landsat5: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.4 + passthrough: true + landsat6: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.5 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1a5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.4 + passthrough: true + s1a6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.5 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s1d5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.4 + passthrough: true + s1d6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.5 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + s25: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + s26: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/wind_turbine/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_wind_turbine: + targets: targets + tasks: + detect_satlas_wind_turbine: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 65536 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + s25: [] + s26: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + landsat5: [] + landsat6: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + s1a5: [] + s1a6: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_satlas_wind_turbine + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + val_config: + patch_size: 128 + tags: + split: val + detect_sentinel1_vessels: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/sentinel1_vessels/dataset_v1/20250602/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_sentinel1_vessels: + targets: targets + tasks: + detect_sentinel1_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + image_bands: + - 1 + - 1 + - 1 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.5 + test_config: + groups: + - val_ascending + - val_descending + patch_size: 128 + train_config: + groups: + - train_ascending + - train_descending + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 32768 + replacement: true + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_sentinel1_vessels + image_selectors: + - image + - sentinel1 + val_config: + groups: + - val_ascending + - val_descending + patch_size: 128 + detect_sentinel2_vessels: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/sentinel2_vessels/dataset_v1/20250213/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_sentinel2_vessels: + targets: targets + tasks: + detect_sentinel2_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + groups: + - sargassum_val + - split1 + - split7 + patch_size: 128 + train_config: + groups: + - sargassum_train + - split2 + - split3 + - split4 + - split5 + - split6 + - train + - train-bg + - train2 + - train3 + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 131072 + replacement: true + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_sentinel2_vessels + image_selectors: + - image + - sentinel2_l2a + val_config: + groups: + - sargassum_val + - split1 + - split7 + patch_size: 128 + segment: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 2 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_1: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_10: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_11: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_2: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_3: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_4: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_5: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_6: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_7: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_8: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_9: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1d_0: [] + s1d_1: [] + s1d_10: [] + s1d_11: [] + s1d_2: [] + s1d_3: [] + s1d_4: [] + s1d_5: [] + s1d_6: [] + s1d_7: [] + s1d_8: [] + s1d_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + s1d_0: + bands: + - vv + - vh + data_type: raster + layers: + - s1d + passthrough: true + s1d_1: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.1 + passthrough: true + s1d_10: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.10 + passthrough: true + s1d_11: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.11 + passthrough: true + s1d_2: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.2 + passthrough: true + s1d_3: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.3 + passthrough: true + s1d_4: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.4 + passthrough: true + s1d_5: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.5 + passthrough: true + s1d_6: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.6 + passthrough: true + s1d_7: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.7 + passthrough: true + s1d_8: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.8 + passthrough: true + s1d_9: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.9 + passthrough: true + targets: + bands: + - class + data_type: raster + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/pastis/rslearn_dataset/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + segment: + targets: targets + tasks: + segment: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_miou_metric: true + metric_kwargs: + average: micro + num_classes: 20 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + zero_is_invalid: true + test_config: + groups: + - fold5 + train_config: + groups: + - fold1 + - fold2 + - fold3 + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_1: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_10: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_11: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_2: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_3: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_4: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_5: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_6: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_7: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_8: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_9: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1d_0: [] + s1d_1: [] + s1d_10: [] + s1d_11: [] + s1d_2: [] + s1d_3: [] + s1d_4: [] + s1d_5: [] + s1d_6: [] + s1d_7: [] + s1d_8: [] + s1d_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + - target/segment/classes + - target/segment/valid + val_config: + groups: + - fold4 + segment_satlas_solar_farm: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + targets: + bands: + - label + data_type: raster + dtype: INT32 + is_target: true + layers: + - label_raster + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/solar_farm/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + segment_satlas_solar_farm: + targets: targets + tasks: + segment_satlas_solar_farm: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_f1_metric: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + metric_kwargs: + average: micro + num_classes: 2 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 16384 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - target/segment_satlas_solar_farm/classes + - target/segment_satlas_solar_farm/valid + val_config: + patch_size: 128 + tags: + split: val + vessel_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 16 + default_config: + transforms: + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + label: + data_type: vector + is_target: true + layers: + - label + landsat: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/landsat_vessel_detection/classifier/dataset_20250624 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + vessel_classification: + label: targets + tasks: + vessel_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + allow_invalid: true + classes: + - correct + - incorrect + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: label + skip_unknown_categories: true + test_config: + groups: + - phase2a_completed + tags: + split: val + train_config: + groups: + - selected_copy + - phase2a_completed + - phase3a_selected + tags: + split: train + val_config: + groups: + - phase2a_completed + tags: + split: val + vessel_detection: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/landsat_vessel_detection/detector/dataset_20250624 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + vessel_detection: + targets: targets + tasks: + vessel_detection: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.7 + test_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: val + train_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: train + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + val_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: val + num_workers: 16 + refill_batches: true + sample_mode: random_cycle +model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.0002 + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + decoder_to_target: + ClassificationHead: + - vessel_classification + - crop_type_classification + - cropland_classification + FasterRCNN: + - vessel_detection + - detect_satlas_marine_infra + - detect_satlas_wind_turbine + - detect_sentinel1_vessels + - detect_sentinel2_vessels + SegmentationHead: + - segment + - segment_satlas_solar_farm + decoders: + ClassificationHead: + - class_path: rslearn.models.pooling_decoder.PoolingDecoder + init_args: + in_channels: 768 + out_channels: 12 + - class_path: rslearn.train.tasks.classification.ClassificationHead + FasterRCNN: + - class_path: rslearn.models.faster_rcnn.FasterRCNN + init_args: + anchor_sizes: + - - 32 + downsample_factors: + - 8 + num_channels: 768 + num_classes: 8 + SegmentationHead: + - class_path: rslearn.models.unet.UNetDecoder + init_args: + conv_layers_per_resolution: 2 + in_channels: + - - 8 + - 768 + num_channels: + 1: 128 + 2: 256 + 4: 512 + 8: 512 + out_channels: 22 + - class_path: rslearn.train.tasks.segmentation.SegmentationHead + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: /weka/dfive-default/helios/checkpoints/yawenzzzz/latent_mim_cross_random_per_modality_patchdisc_add_contrastive_0.1_1/step400000 + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_moe_kwargs: + add_noise: true + compute_slots_from_task: true + expert_mult: 4 + noise_mult: 0.2 + num_experts: 4 + num_slots: 4 + task_moe_indices: + - 9 + - 10 + - 11 + use_task_moe: true + selector: + - encoder + task_embed_opts: + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt + type: precomputed + lazy_decode: true + task_label_offsets: + crop_type_classification: + num_outputs: 8 + offset: 2 + outputs_key: class + cropland_classification: + num_outputs: 2 + offset: 10 + outputs_key: class + detect_satlas_marine_infra: + num_outputs: 3 + offset: 2 + outputs_key: labels + detect_satlas_wind_turbine: + num_outputs: 3 + offset: 5 + outputs_key: labels + detect_sentinel1_vessels: + num_outputs: 2 + offset: 0 + outputs_key: labels + detect_sentinel2_vessels: + num_outputs: 2 + offset: 0 + outputs_key: labels + segment: + num_outputs: 20 + offset: 0 + outputs_key: classes + segment_satlas_solar_farm: + num_outputs: 2 + offset: 20 + outputs_key: classes + vessel_classification: + num_outputs: 2 + offset: 0 + outputs_key: class + vessel_detection: + num_outputs: 2 + offset: 0 + outputs_key: labels + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 50 + eta_min: 0 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + crop_type_classification: + label: targets + cropland_classification: + label: targets + detect_satlas_marine_infra: + targets: targets + detect_satlas_wind_turbine: + targets: targets + detect_sentinel1_vessels: + targets: targets + detect_sentinel2_vessels: + targets: targets + segment: + targets: targets + segment_satlas_solar_farm: + targets: targets + vessel_classification: + label: targets + vessel_detection: + targets: targets + tasks: + crop_type_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Coffee + - Trees + - Grassland + - Maize + - Sugarcane + - Tea + - Water + - Built-up + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + cropland_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Cropland + - Non-Cropland + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + detect_satlas_marine_infra: + class_path: rslp.satlas.train.MarineInfraTask + init_args: + box_size: 15 + classes: + - unknown + - platform + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + - - 0.1 + - - 0.2 + - - 0.3 + - - 0.4 + - - 0.5 + - - 0.6 + - - 0.7 + - - 0.8 + - - 0.9 + image_bands: + - 2 + - 1 + - 0 + property_name: category + remap_values: + - - 0 + - 0.25 + - - 0 + - 255 + skip_unknown_categories: true + detect_satlas_wind_turbine: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + detect_sentinel1_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + image_bands: + - 1 + - 1 + - 1 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.5 + detect_sentinel2_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + segment: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_miou_metric: true + metric_kwargs: + average: micro + num_classes: 20 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + zero_is_invalid: true + segment_satlas_solar_farm: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_f1_metric: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + metric_kwargs: + average: micro + num_classes: 2 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + vessel_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + allow_invalid: true + classes: + - correct + - incorrect + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: label + skip_unknown_categories: true + vessel_detection: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.7 +rslp_experiment: placeholder +rslp_project: placeholder +trainer: + accumulate_grad_batches: 9 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: epoch + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + mode: min + monitor: val_loss + save_last: true + save_top_k: 1 + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - at_epoch: 0 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - moe + - at_epoch: 20 + freeze_selectors: [] + unfreeze_selectors: + - head + - moe + - encoder + max_epochs: 500 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_moe/OUT_classify.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_moe/OUT_classify.yaml new file mode 100644 index 00000000..b1bb0fa5 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_moe/OUT_classify.yaml @@ -0,0 +1,1128 @@ +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + batch_sizes: + crop_type_classification: 32 + cropland_classification: 16 + vessel_classification: 16 + data_modules: + crop_type_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 32 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: [] + sentinel2_1: [] + sentinel2_10: [] + sentinel2_11: [] + sentinel2_2: [] + sentinel2_3: [] + sentinel2_4: [] + sentinel2_5: [] + sentinel2_6: [] + sentinel2_7: [] + sentinel2_8: [] + sentinel2_9: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + sentinel1_0: [] + sentinel1_1: [] + sentinel1_10: [] + sentinel1_11: [] + sentinel1_2: [] + sentinel1_3: [] + sentinel1_4: [] + sentinel1_5: [] + sentinel1_6: [] + sentinel1_7: [] + sentinel1_8: [] + sentinel1_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.pad.Pad + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + mode: center + size: 8 + inputs: + label: + data_type: vector + is_target: true + layers: + - label + sentinel1_0: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + sentinel1_1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + sentinel1_10: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.10 + passthrough: true + sentinel1_11: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.11 + passthrough: true + sentinel1_2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + sentinel1_3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + sentinel1_4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.4 + passthrough: true + sentinel1_5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.5 + passthrough: true + sentinel1_6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.6 + passthrough: true + sentinel1_7: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.7 + passthrough: true + sentinel1_8: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.8 + passthrough: true + sentinel1_9: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.9 + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/crop/kenya_nandi/20250625 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + crop_type_classification: + label: targets + tasks: + crop_type_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Coffee + - Trees + - Grassland + - Maize + - Sugarcane + - Tea + - Water + - Built-up + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + test_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: val + train_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: train + val_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: val + cropland_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 16 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: [] + sentinel2_1: [] + sentinel2_10: [] + sentinel2_11: [] + sentinel2_2: [] + sentinel2_3: [] + sentinel2_4: [] + sentinel2_5: [] + sentinel2_6: [] + sentinel2_7: [] + sentinel2_8: [] + sentinel2_9: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + sentinel1_0: [] + sentinel1_1: [] + sentinel1_10: [] + sentinel1_11: [] + sentinel1_2: [] + sentinel1_3: [] + sentinel1_4: [] + sentinel1_5: [] + sentinel1_6: [] + sentinel1_7: [] + sentinel1_8: [] + sentinel1_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.pad.Pad + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + mode: center + size: 8 + inputs: + label: + data_type: vector + is_target: true + layers: + - label + sentinel1_0: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1 + passthrough: true + sentinel1_1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.1 + passthrough: true + sentinel1_10: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.10 + passthrough: true + sentinel1_11: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.11 + passthrough: true + sentinel1_2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.2 + passthrough: true + sentinel1_3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.3 + passthrough: true + sentinel1_4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.4 + passthrough: true + sentinel1_5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.5 + passthrough: true + sentinel1_6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.6 + passthrough: true + sentinel1_7: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.7 + passthrough: true + sentinel1_8: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.8 + passthrough: true + sentinel1_9: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.9 + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/crop/worldcereal_cropland/20250626 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + cropland_classification: + label: targets + tasks: + cropland_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Cropland + - Non-Cropland + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + test_config: + groups: + - h3_sample100_66K + tags: + split: val + train_config: + groups: + - h3_sample100_66K + tags: + split: train + val_config: + groups: + - h3_sample100_66K + tags: + split: val + vessel_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 16 + default_config: + transforms: + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + label: + data_type: vector + is_target: true + layers: + - label + landsat: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/landsat_vessel_detection/classifier/dataset_20250624 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + vessel_classification: + label: targets + tasks: + vessel_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + allow_invalid: true + classes: + - correct + - incorrect + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: label + skip_unknown_categories: true + test_config: + groups: + - phase2a_completed + tags: + split: val + train_config: + groups: + - selected_copy + - phase2a_completed + - phase3a_selected + tags: + split: train + val_config: + groups: + - phase2a_completed + tags: + split: val + num_workers: 16 + refill_batches: true + sample_mode: random_cycle +model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.0002 + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + decoder_to_target: + ClassificationHead: + - vessel_classification + - crop_type_classification + - cropland_classification + decoders: + ClassificationHead: + - class_path: rslearn.models.pooling_decoder.PoolingDecoder + init_args: + in_channels: 768 + out_channels: 12 + - class_path: rslearn.train.tasks.classification.ClassificationHead + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: /weka/dfive-default/helios/checkpoints/yawenzzzz/latent_mim_cross_random_per_modality_patchdisc_add_contrastive_0.1_1/step400000 + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_moe_kwargs: + add_noise: true + compute_slots_from_task: true + expert_mult: 4 + noise_mult: 0.2 + num_experts: 4 + num_slots: 4 + task_moe_indices: + - 9 + - 10 + - 11 + use_task_moe: true + selector: + - encoder + task_embed_opts: + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt + type: precomputed + lazy_decode: true + task_label_offsets: + crop_type_classification: + num_outputs: 8 + offset: 2 + outputs_key: class + cropland_classification: + num_outputs: 2 + offset: 10 + outputs_key: class + vessel_classification: + num_outputs: 2 + offset: 0 + outputs_key: class + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 50 + eta_min: 0 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + crop_type_classification: + label: targets + cropland_classification: + label: targets + vessel_classification: + label: targets + tasks: + crop_type_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Coffee + - Trees + - Grassland + - Maize + - Sugarcane + - Tea + - Water + - Built-up + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + cropland_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Cropland + - Non-Cropland + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + vessel_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + allow_invalid: true + classes: + - correct + - incorrect + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: label + skip_unknown_categories: true +rslp_experiment: placeholder +rslp_project: placeholder +trainer: + accumulate_grad_batches: 3 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: epoch + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + mode: min + monitor: val_loss + save_last: true + save_top_k: 1 + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - at_epoch: 0 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - moe + - at_epoch: 20 + freeze_selectors: [] + unfreeze_selectors: + - head + - moe + - encoder + max_epochs: 500 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_moe/OUT_detect.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_moe/OUT_detect.yaml new file mode 100644 index 00000000..22f8609d --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_moe/OUT_detect.yaml @@ -0,0 +1,1775 @@ +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + batch_sizes: + detect_satlas_marine_infra: 8 + detect_satlas_wind_turbine: 8 + detect_sentinel1_vessels: 8 + detect_sentinel2_vessels: 8 + vessel_detection: 8 + data_modules: + detect_satlas_marine_infra: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/marine_infra/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_marine_infra: + targets: targets + tasks: + detect_satlas_marine_infra: + class_path: rslp.satlas.train.MarineInfraTask + init_args: + box_size: 15 + classes: + - unknown + - platform + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + - - 0.1 + - - 0.2 + - - 0.3 + - - 0.4 + - - 0.5 + - - 0.6 + - - 0.7 + - - 0.8 + - - 0.9 + image_bands: + - 2 + - 1 + - 0 + property_name: category + remap_values: + - - 0 + - 0.25 + - - 0 + - 255 + skip_unknown_categories: true + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 65536 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_satlas_marine_infra + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + val_config: + patch_size: 128 + tags: + split: val + detect_satlas_wind_turbine: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + s25: [] + s26: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + landsat5: [] + landsat6: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + s1a5: [] + s1a6: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + landsat5: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.4 + passthrough: true + landsat6: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.5 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1a5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.4 + passthrough: true + s1a6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.5 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s1d5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.4 + passthrough: true + s1d6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.5 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + s25: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + s26: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/wind_turbine/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_wind_turbine: + targets: targets + tasks: + detect_satlas_wind_turbine: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 65536 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + s25: [] + s26: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + landsat5: [] + landsat6: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + s1a5: [] + s1a6: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_satlas_wind_turbine + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + val_config: + patch_size: 128 + tags: + split: val + detect_sentinel1_vessels: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/sentinel1_vessels/dataset_v1/20250602/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_sentinel1_vessels: + targets: targets + tasks: + detect_sentinel1_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + image_bands: + - 1 + - 1 + - 1 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.5 + test_config: + groups: + - val_ascending + - val_descending + patch_size: 128 + train_config: + groups: + - train_ascending + - train_descending + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 32768 + replacement: true + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_sentinel1_vessels + image_selectors: + - image + - sentinel1 + val_config: + groups: + - val_ascending + - val_descending + patch_size: 128 + detect_sentinel2_vessels: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/sentinel2_vessels/dataset_v1/20250213/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_sentinel2_vessels: + targets: targets + tasks: + detect_sentinel2_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + groups: + - sargassum_val + - split1 + - split7 + patch_size: 128 + train_config: + groups: + - sargassum_train + - split2 + - split3 + - split4 + - split5 + - split6 + - train + - train-bg + - train2 + - train3 + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 131072 + replacement: true + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_sentinel2_vessels + image_selectors: + - image + - sentinel2_l2a + val_config: + groups: + - sargassum_val + - split1 + - split7 + patch_size: 128 + vessel_detection: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/landsat_vessel_detection/detector/dataset_20250624 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + vessel_detection: + targets: targets + tasks: + vessel_detection: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.7 + test_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: val + train_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: train + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + val_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: val + num_workers: 16 + refill_batches: true + sample_mode: random_cycle +model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.0002 + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + decoder_to_target: + FasterRCNN: + - vessel_detection + - detect_satlas_marine_infra + - detect_satlas_wind_turbine + - detect_sentinel1_vessels + - detect_sentinel2_vessels + decoders: + FasterRCNN: + - class_path: rslearn.models.faster_rcnn.FasterRCNN + init_args: + anchor_sizes: + - - 32 + downsample_factors: + - 8 + num_channels: 768 + num_classes: 8 + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: /weka/dfive-default/helios/checkpoints/yawenzzzz/latent_mim_cross_random_per_modality_patchdisc_add_contrastive_0.1_1/step400000 + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_moe_kwargs: + add_noise: true + compute_slots_from_task: true + expert_mult: 4 + noise_mult: 0.2 + num_experts: 4 + num_slots: 4 + task_moe_indices: + - 9 + - 10 + - 11 + use_task_moe: true + selector: + - encoder + task_embed_opts: + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt + type: precomputed + lazy_decode: true + task_label_offsets: + detect_satlas_marine_infra: + num_outputs: 3 + offset: 2 + outputs_key: labels + detect_satlas_wind_turbine: + num_outputs: 3 + offset: 5 + outputs_key: labels + detect_sentinel1_vessels: + num_outputs: 2 + offset: 0 + outputs_key: labels + detect_sentinel2_vessels: + num_outputs: 2 + offset: 0 + outputs_key: labels + vessel_detection: + num_outputs: 2 + offset: 0 + outputs_key: labels + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 50 + eta_min: 0 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_marine_infra: + targets: targets + detect_satlas_wind_turbine: + targets: targets + detect_sentinel1_vessels: + targets: targets + detect_sentinel2_vessels: + targets: targets + vessel_detection: + targets: targets + tasks: + detect_satlas_marine_infra: + class_path: rslp.satlas.train.MarineInfraTask + init_args: + box_size: 15 + classes: + - unknown + - platform + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + - - 0.1 + - - 0.2 + - - 0.3 + - - 0.4 + - - 0.5 + - - 0.6 + - - 0.7 + - - 0.8 + - - 0.9 + image_bands: + - 2 + - 1 + - 0 + property_name: category + remap_values: + - - 0 + - 0.25 + - - 0 + - 255 + skip_unknown_categories: true + detect_satlas_wind_turbine: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + detect_sentinel1_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + image_bands: + - 1 + - 1 + - 1 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.5 + detect_sentinel2_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + vessel_detection: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.7 +rslp_experiment: placeholder +rslp_project: placeholder +trainer: + accumulate_grad_batches: 5 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: epoch + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + mode: min + monitor: val_loss + save_last: true + save_top_k: 1 + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - at_epoch: 0 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - moe + - at_epoch: 20 + freeze_selectors: [] + unfreeze_selectors: + - head + - moe + - encoder + max_epochs: 500 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_moe/OUT_segment.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_moe/OUT_segment.yaml new file mode 100644 index 00000000..f4fd5d20 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_moe/OUT_segment.yaml @@ -0,0 +1,1312 @@ +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + batch_sizes: + segment: 2 + segment_satlas_solar_farm: 8 + data_modules: + segment: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 2 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_1: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_10: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_11: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_2: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_3: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_4: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_5: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_6: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_7: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_8: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_9: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1d_0: [] + s1d_1: [] + s1d_10: [] + s1d_11: [] + s1d_2: [] + s1d_3: [] + s1d_4: [] + s1d_5: [] + s1d_6: [] + s1d_7: [] + s1d_8: [] + s1d_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + s1d_0: + bands: + - vv + - vh + data_type: raster + layers: + - s1d + passthrough: true + s1d_1: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.1 + passthrough: true + s1d_10: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.10 + passthrough: true + s1d_11: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.11 + passthrough: true + s1d_2: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.2 + passthrough: true + s1d_3: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.3 + passthrough: true + s1d_4: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.4 + passthrough: true + s1d_5: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.5 + passthrough: true + s1d_6: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.6 + passthrough: true + s1d_7: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.7 + passthrough: true + s1d_8: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.8 + passthrough: true + s1d_9: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.9 + passthrough: true + targets: + bands: + - class + data_type: raster + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/pastis/rslearn_dataset/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + segment: + targets: targets + tasks: + segment: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_miou_metric: true + metric_kwargs: + average: micro + num_classes: 20 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + zero_is_invalid: true + test_config: + groups: + - fold5 + train_config: + groups: + - fold1 + - fold2 + - fold3 + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_1: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_10: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_11: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_2: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_3: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_4: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_5: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_6: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_7: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_8: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_9: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1d_0: [] + s1d_1: [] + s1d_10: [] + s1d_11: [] + s1d_2: [] + s1d_3: [] + s1d_4: [] + s1d_5: [] + s1d_6: [] + s1d_7: [] + s1d_8: [] + s1d_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + - target/segment/classes + - target/segment/valid + val_config: + groups: + - fold4 + segment_satlas_solar_farm: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + targets: + bands: + - label + data_type: raster + dtype: INT32 + is_target: true + layers: + - label_raster + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/solar_farm/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + segment_satlas_solar_farm: + targets: targets + tasks: + segment_satlas_solar_farm: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_f1_metric: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + metric_kwargs: + average: micro + num_classes: 2 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 16384 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - target/segment_satlas_solar_farm/classes + - target/segment_satlas_solar_farm/valid + val_config: + patch_size: 128 + tags: + split: val + num_workers: 16 + refill_batches: true + sample_mode: random_cycle +model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.0002 + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + decoder_to_target: + SegmentationHead: + - segment + - segment_satlas_solar_farm + decoders: + SegmentationHead: + - class_path: rslearn.models.unet.UNetDecoder + init_args: + conv_layers_per_resolution: 2 + in_channels: + - - 8 + - 768 + num_channels: + 1: 128 + 2: 256 + 4: 512 + 8: 512 + out_channels: 22 + - class_path: rslearn.train.tasks.segmentation.SegmentationHead + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_moe_kwargs: + add_noise: true + compute_slots_from_task: true + expert_mult: 4 + noise_mult: 0.2 + num_experts: 4 + num_slots: 4 + task_moe_indices: + - 9 + - 10 + - 11 + use_task_moe: true + selector: + - encoder + task_embed_opts: + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt + type: precomputed + lazy_decode: true + task_label_offsets: + segment: + num_outputs: 20 + offset: 0 + outputs_key: classes + segment_satlas_solar_farm: + num_outputs: 2 + offset: 20 + outputs_key: classes + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 50 + eta_min: 0 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + segment: + targets: targets + segment_satlas_solar_farm: + targets: targets + tasks: + segment: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_miou_metric: true + metric_kwargs: + average: micro + num_classes: 20 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + zero_is_invalid: true + segment_satlas_solar_farm: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_f1_metric: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + metric_kwargs: + average: micro + num_classes: 2 + remap_values: + - - 0 + - 1 + - - 0 + - 255 +rslp_experiment: placeholder +rslp_project: placeholder +trainer: + accumulate_grad_batches: 2 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: epoch + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + mode: min + monitor: val_loss + save_last: true + save_top_k: 1 + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - at_epoch: 0 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - moe + - at_epoch: 20 + freeze_selectors: [] + unfreeze_selectors: + - head + - moe + - encoder + max_epochs: 500 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_moe/all.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_moe/all.yaml new file mode 100644 index 00000000..8ba2c868 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_moe/all.yaml @@ -0,0 +1,39 @@ +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_moe/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_moe/OUT_all.yaml + +dataset_cfgs: + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_classifier_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_nandi_crop_type/finetune_s1_s2_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_worldcereal_cropland/finetune_s1_s2_cosinelr.yaml + + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_pastis/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_pastis/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_solar_farm_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_solar_farm_128/basecfg_helios_mm.yaml + + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_detector_cosinelr.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_marine_infra_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_marine_infra_128/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_wind_turbine_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_wind_turbine_128/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_helios.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel2_vessels_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel2_vessels_128/basecfg_helios.yaml + +substitutions: + patch_size: 8 + encoder_embedding_size: 768 + helios_checkpoint_path: /weka/dfive-default/helios/checkpoints/yawenzzzz/latent_mim_cross_random_per_modality_patchdisc_add_contrastive_0.1_1/step400000 + +global_overrides: + model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + trainer: + accumulate_grad_batches: 9 + +merge_options: + merge_heads: true + merge_task_labels: true + same_label_groups: + - [detect_sentinel1_vessels, detect_sentinel2_vessels, vessel_detection] \ No newline at end of file diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_moe/base.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_moe/base.yaml new file mode 100644 index 00000000..1afb30e7 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_moe/base.yaml @@ -0,0 +1,70 @@ +model: + class_path: rslp.helios.lightning_module.MoELightningModule + init_args: + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: "{CHECKPOINT_PATH}" + selector: ["encoder"] + forward_kwargs: + patch_size: {PATCH_SIZE} + model_overrides: + encoder_config: + task_moe_kwargs: + use_task_moe: true + task_moe_indices: [9, 10, 11] + add_noise: true + noise_mult: 0.2 + num_experts: 4 + num_slots: 4 + expert_mult: 4 + compute_slots_from_task: true + task_embed_opts: + type: "precomputed" + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt + decoders: # Filled in by make_multidataset_config.py + lazy_decode: true + lr: 0.0002 + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 50 + eta_min: 0 + +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + sample_mode: random_cycle + refill_batches: true + num_workers: 16 + data_modules: # Filled in by make_multidataset_config.py + +trainer: + max_epochs: 500 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: "epoch" + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + save_top_k: 1 + save_last: true + monitor: val_loss + mode: min + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - at_epoch: 0 + freeze_selectors: ["encoder"] + unfreeze_selectors: ["head", "moe"] + - at_epoch: 20 + freeze_selectors: [] + unfreeze_selectors: ["head", "moe", "encoder"] + +rslp_project: placeholder +rslp_experiment: placeholder + +all_dataset_info_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v3_multitask/all_dataset_info.yaml \ No newline at end of file diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_moe/classify.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_moe/classify.yaml new file mode 100644 index 00000000..8502e342 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_moe/classify.yaml @@ -0,0 +1,23 @@ +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_moe/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_moe/OUT_classify.yaml + +dataset_cfgs: + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_classifier_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_nandi_crop_type/finetune_s1_s2_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_worldcereal_cropland/finetune_s1_s2_cosinelr.yaml + +substitutions: + patch_size: 8 + encoder_embedding_size: 768 + helios_checkpoint_path: /weka/dfive-default/helios/checkpoints/yawenzzzz/latent_mim_cross_random_per_modality_patchdisc_add_contrastive_0.1_1/step400000 + +global_overrides: + model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + trainer: + accumulate_grad_batches: 3 + +merge_options: + merge_heads: true + merge_task_labels: true + same_label_groups: diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_moe/detect.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_moe/detect.yaml new file mode 100644 index 00000000..861105c2 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_moe/detect.yaml @@ -0,0 +1,30 @@ +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_moe/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_moe/OUT_detect.yaml + +dataset_cfgs: + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_detector_cosinelr.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_marine_infra_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_marine_infra_128/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_wind_turbine_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_wind_turbine_128/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_helios.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel2_vessels_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel2_vessels_128/basecfg_helios.yaml + +substitutions: + patch_size: 8 + encoder_embedding_size: 768 + helios_checkpoint_path: /weka/dfive-default/helios/checkpoints/yawenzzzz/latent_mim_cross_random_per_modality_patchdisc_add_contrastive_0.1_1/step400000 + +global_overrides: + model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + trainer: + accumulate_grad_batches: 5 + +merge_options: + merge_heads: true + merge_task_labels: true + same_label_groups: + - [detect_sentinel1_vessels, detect_sentinel2_vessels, vessel_detection] diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_moe/exp_id.txt b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_moe/exp_id.txt new file mode 100644 index 00000000..cf9b4701 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_moe/exp_id.txt @@ -0,0 +1 @@ +{task}_task_moe_slot_cyclic \ No newline at end of file diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_moe/segment.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_moe/segment.yaml new file mode 100644 index 00000000..3999f768 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_moe/segment.yaml @@ -0,0 +1,24 @@ +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/OUT_segment.yaml + +dataset_cfgs: + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_pastis/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_pastis/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_solar_farm_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_solar_farm_128/basecfg_helios_mm.yaml + +global_overrides: + model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + trainer: + accumulate_grad_batches: 2 + +merge_options: + merge_heads: true + merge_task_labels: true + same_label_groups: + +substitutions: + patch_size: 8 + encoder_embedding_size: 768 + helios_checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/OUT_all.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/OUT_all.yaml new file mode 100644 index 00000000..0949e06e --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/OUT_all.yaml @@ -0,0 +1,4063 @@ +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + batch_sizes: + crop_type_classification: 32 + cropland_classification: 16 + detect_satlas_marine_infra: 8 + detect_satlas_wind_turbine: 8 + detect_sentinel1_vessels: 8 + detect_sentinel2_vessels: 8 + segment: 2 + segment_satlas_solar_farm: 8 + vessel_classification: 16 + vessel_detection: 8 + data_modules: + crop_type_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 32 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: [] + sentinel2_1: [] + sentinel2_10: [] + sentinel2_11: [] + sentinel2_2: [] + sentinel2_3: [] + sentinel2_4: [] + sentinel2_5: [] + sentinel2_6: [] + sentinel2_7: [] + sentinel2_8: [] + sentinel2_9: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + sentinel1_0: [] + sentinel1_1: [] + sentinel1_10: [] + sentinel1_11: [] + sentinel1_2: [] + sentinel1_3: [] + sentinel1_4: [] + sentinel1_5: [] + sentinel1_6: [] + sentinel1_7: [] + sentinel1_8: [] + sentinel1_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.pad.Pad + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + mode: center + size: 8 + inputs: + label: + data_type: vector + is_target: true + layers: + - label + sentinel1_0: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + sentinel1_1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + sentinel1_10: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.10 + passthrough: true + sentinel1_11: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.11 + passthrough: true + sentinel1_2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + sentinel1_3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + sentinel1_4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.4 + passthrough: true + sentinel1_5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.5 + passthrough: true + sentinel1_6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.6 + passthrough: true + sentinel1_7: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.7 + passthrough: true + sentinel1_8: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.8 + passthrough: true + sentinel1_9: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.9 + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/crop/kenya_nandi/20250625 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + crop_type_classification: + label: targets + tasks: + crop_type_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Coffee + - Trees + - Grassland + - Maize + - Sugarcane + - Tea + - Water + - Built-up + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + test_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: val + train_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: train + val_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: val + cropland_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 16 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: [] + sentinel2_1: [] + sentinel2_10: [] + sentinel2_11: [] + sentinel2_2: [] + sentinel2_3: [] + sentinel2_4: [] + sentinel2_5: [] + sentinel2_6: [] + sentinel2_7: [] + sentinel2_8: [] + sentinel2_9: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + sentinel1_0: [] + sentinel1_1: [] + sentinel1_10: [] + sentinel1_11: [] + sentinel1_2: [] + sentinel1_3: [] + sentinel1_4: [] + sentinel1_5: [] + sentinel1_6: [] + sentinel1_7: [] + sentinel1_8: [] + sentinel1_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.pad.Pad + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + mode: center + size: 8 + inputs: + label: + data_type: vector + is_target: true + layers: + - label + sentinel1_0: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1 + passthrough: true + sentinel1_1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.1 + passthrough: true + sentinel1_10: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.10 + passthrough: true + sentinel1_11: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.11 + passthrough: true + sentinel1_2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.2 + passthrough: true + sentinel1_3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.3 + passthrough: true + sentinel1_4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.4 + passthrough: true + sentinel1_5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.5 + passthrough: true + sentinel1_6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.6 + passthrough: true + sentinel1_7: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.7 + passthrough: true + sentinel1_8: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.8 + passthrough: true + sentinel1_9: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.9 + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/crop/worldcereal_cropland/20250626 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + cropland_classification: + label: targets + tasks: + cropland_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Cropland + - Non-Cropland + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + test_config: + groups: + - h3_sample100_66K + tags: + split: val + train_config: + groups: + - h3_sample100_66K + tags: + split: train + val_config: + groups: + - h3_sample100_66K + tags: + split: val + detect_satlas_marine_infra: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/marine_infra/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_marine_infra: + targets: targets + tasks: + detect_satlas_marine_infra: + class_path: rslp.satlas.train.MarineInfraTask + init_args: + box_size: 15 + classes: + - unknown + - platform + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + - - 0.1 + - - 0.2 + - - 0.3 + - - 0.4 + - - 0.5 + - - 0.6 + - - 0.7 + - - 0.8 + - - 0.9 + image_bands: + - 2 + - 1 + - 0 + property_name: category + remap_values: + - - 0 + - 0.25 + - - 0 + - 255 + skip_unknown_categories: true + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 65536 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_satlas_marine_infra + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + val_config: + patch_size: 128 + tags: + split: val + detect_satlas_wind_turbine: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + s25: [] + s26: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + landsat5: [] + landsat6: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + s1a5: [] + s1a6: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + landsat5: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.4 + passthrough: true + landsat6: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.5 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1a5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.4 + passthrough: true + s1a6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.5 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s1d5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.4 + passthrough: true + s1d6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.5 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + s25: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + s26: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/wind_turbine/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_wind_turbine: + targets: targets + tasks: + detect_satlas_wind_turbine: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 65536 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + s25: [] + s26: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + landsat5: [] + landsat6: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + s1a5: [] + s1a6: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_satlas_wind_turbine + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + val_config: + patch_size: 128 + tags: + split: val + detect_sentinel1_vessels: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/sentinel1_vessels/dataset_v1/20250602/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_sentinel1_vessels: + targets: targets + tasks: + detect_sentinel1_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + image_bands: + - 1 + - 1 + - 1 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.5 + test_config: + groups: + - val_ascending + - val_descending + patch_size: 128 + train_config: + groups: + - train_ascending + - train_descending + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 32768 + replacement: true + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_sentinel1_vessels + image_selectors: + - image + - sentinel1 + val_config: + groups: + - val_ascending + - val_descending + patch_size: 128 + detect_sentinel2_vessels: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/sentinel2_vessels/dataset_v1/20250213/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_sentinel2_vessels: + targets: targets + tasks: + detect_sentinel2_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + groups: + - sargassum_val + - split1 + - split7 + patch_size: 128 + train_config: + groups: + - sargassum_train + - split2 + - split3 + - split4 + - split5 + - split6 + - train + - train-bg + - train2 + - train3 + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 131072 + replacement: true + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_sentinel2_vessels + image_selectors: + - image + - sentinel2_l2a + val_config: + groups: + - sargassum_val + - split1 + - split7 + patch_size: 128 + segment: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 2 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_1: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_10: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_11: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_2: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_3: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_4: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_5: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_6: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_7: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_8: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_9: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1d_0: [] + s1d_1: [] + s1d_10: [] + s1d_11: [] + s1d_2: [] + s1d_3: [] + s1d_4: [] + s1d_5: [] + s1d_6: [] + s1d_7: [] + s1d_8: [] + s1d_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + s1d_0: + bands: + - vv + - vh + data_type: raster + layers: + - s1d + passthrough: true + s1d_1: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.1 + passthrough: true + s1d_10: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.10 + passthrough: true + s1d_11: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.11 + passthrough: true + s1d_2: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.2 + passthrough: true + s1d_3: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.3 + passthrough: true + s1d_4: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.4 + passthrough: true + s1d_5: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.5 + passthrough: true + s1d_6: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.6 + passthrough: true + s1d_7: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.7 + passthrough: true + s1d_8: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.8 + passthrough: true + s1d_9: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.9 + passthrough: true + targets: + bands: + - class + data_type: raster + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/pastis/rslearn_dataset/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + segment: + targets: targets + tasks: + segment: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_miou_metric: true + metric_kwargs: + average: micro + num_classes: 20 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + zero_is_invalid: true + test_config: + groups: + - fold5 + train_config: + groups: + - fold1 + - fold2 + - fold3 + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_1: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_10: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_11: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_2: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_3: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_4: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_5: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_6: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_7: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_8: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_9: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1d_0: [] + s1d_1: [] + s1d_10: [] + s1d_11: [] + s1d_2: [] + s1d_3: [] + s1d_4: [] + s1d_5: [] + s1d_6: [] + s1d_7: [] + s1d_8: [] + s1d_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + - target/segment/classes + - target/segment/valid + val_config: + groups: + - fold4 + segment_satlas_solar_farm: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + targets: + bands: + - label + data_type: raster + dtype: INT32 + is_target: true + layers: + - label_raster + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/solar_farm/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + segment_satlas_solar_farm: + targets: targets + tasks: + segment_satlas_solar_farm: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_f1_metric: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + metric_kwargs: + average: micro + num_classes: 2 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 16384 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - target/segment_satlas_solar_farm/classes + - target/segment_satlas_solar_farm/valid + val_config: + patch_size: 128 + tags: + split: val + vessel_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 16 + default_config: + transforms: + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + label: + data_type: vector + is_target: true + layers: + - label + landsat: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/landsat_vessel_detection/classifier/dataset_20250624 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + vessel_classification: + label: targets + tasks: + vessel_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + allow_invalid: true + classes: + - correct + - incorrect + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: label + skip_unknown_categories: true + test_config: + groups: + - phase2a_completed + tags: + split: val + train_config: + groups: + - selected_copy + - phase2a_completed + - phase3a_selected + tags: + split: train + val_config: + groups: + - phase2a_completed + tags: + split: val + vessel_detection: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/landsat_vessel_detection/detector/dataset_20250624 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + vessel_detection: + targets: targets + tasks: + vessel_detection: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.7 + test_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: val + train_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: train + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + val_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: val + num_workers: 16 + refill_batches: true + sample_mode: random_cycle +model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.0002 + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + decoder_to_target: + ClassificationHead: + - vessel_classification + - crop_type_classification + - cropland_classification + FasterRCNN: + - vessel_detection + - detect_satlas_marine_infra + - detect_satlas_wind_turbine + - detect_sentinel1_vessels + - detect_sentinel2_vessels + SegmentationHead: + - segment + - segment_satlas_solar_farm + decoders: + ClassificationHead: + - class_path: rslearn.models.pooling_decoder.PoolingDecoder + init_args: + in_channels: 768 + out_channels: 12 + - class_path: rslearn.train.tasks.classification.ClassificationHead + FasterRCNN: + - class_path: rslearn.models.faster_rcnn.FasterRCNN + init_args: + anchor_sizes: + - - 32 + downsample_factors: + - 8 + num_channels: 768 + num_classes: 8 + SegmentationHead: + - class_path: rslearn.models.unet.UNetDecoder + init_args: + conv_layers_per_resolution: 2 + in_channels: + - - 8 + - 768 + num_channels: + 1: 128 + 2: 256 + 4: 512 + 8: 512 + out_channels: 22 + - class_path: rslearn.train.tasks.segmentation.SegmentationHead + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: /weka/dfive-default/helios/checkpoints/yawenzzzz/latent_mim_cross_random_per_modality_patchdisc_add_contrastive_0.1_1/step400000 + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_lora_kwargs: + gen_hidden: 128 + task_lora_indices: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 10 + - 11 + use_task_lora: true + task_moe_kwargs: + add_noise: true + compute_slots_from_task: true + expert_mult: 4 + noise_mult: 0.2 + num_experts: 4 + num_slots: 4 + task_moe_indices: + - 9 + - 10 + - 11 + use_task_moe: true + selector: + - encoder + task_embed_opts: + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt + type: precomputed + lazy_decode: true + task_label_offsets: + crop_type_classification: + num_outputs: 8 + offset: 2 + outputs_key: class + cropland_classification: + num_outputs: 2 + offset: 10 + outputs_key: class + detect_satlas_marine_infra: + num_outputs: 3 + offset: 2 + outputs_key: labels + detect_satlas_wind_turbine: + num_outputs: 3 + offset: 5 + outputs_key: labels + detect_sentinel1_vessels: + num_outputs: 2 + offset: 0 + outputs_key: labels + detect_sentinel2_vessels: + num_outputs: 2 + offset: 0 + outputs_key: labels + segment: + num_outputs: 20 + offset: 0 + outputs_key: classes + segment_satlas_solar_farm: + num_outputs: 2 + offset: 20 + outputs_key: classes + vessel_classification: + num_outputs: 2 + offset: 0 + outputs_key: class + vessel_detection: + num_outputs: 2 + offset: 0 + outputs_key: labels + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 50 + eta_min: 0 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + crop_type_classification: + label: targets + cropland_classification: + label: targets + detect_satlas_marine_infra: + targets: targets + detect_satlas_wind_turbine: + targets: targets + detect_sentinel1_vessels: + targets: targets + detect_sentinel2_vessels: + targets: targets + segment: + targets: targets + segment_satlas_solar_farm: + targets: targets + vessel_classification: + label: targets + vessel_detection: + targets: targets + tasks: + crop_type_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Coffee + - Trees + - Grassland + - Maize + - Sugarcane + - Tea + - Water + - Built-up + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + cropland_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Cropland + - Non-Cropland + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + detect_satlas_marine_infra: + class_path: rslp.satlas.train.MarineInfraTask + init_args: + box_size: 15 + classes: + - unknown + - platform + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + - - 0.1 + - - 0.2 + - - 0.3 + - - 0.4 + - - 0.5 + - - 0.6 + - - 0.7 + - - 0.8 + - - 0.9 + image_bands: + - 2 + - 1 + - 0 + property_name: category + remap_values: + - - 0 + - 0.25 + - - 0 + - 255 + skip_unknown_categories: true + detect_satlas_wind_turbine: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + detect_sentinel1_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + image_bands: + - 1 + - 1 + - 1 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.5 + detect_sentinel2_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + segment: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_miou_metric: true + metric_kwargs: + average: micro + num_classes: 20 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + zero_is_invalid: true + segment_satlas_solar_farm: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_f1_metric: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + metric_kwargs: + average: micro + num_classes: 2 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + vessel_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + allow_invalid: true + classes: + - correct + - incorrect + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: label + skip_unknown_categories: true + vessel_detection: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.7 +rslp_experiment: placeholder +rslp_project: placeholder +trainer: + accumulate_grad_batches: 9 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: epoch + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + mode: min + monitor: val_loss + save_last: true + save_top_k: 1 + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - at_epoch: 0 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - moe + - at_epoch: 20 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - lora + max_epochs: 200 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/OUT_classify.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/OUT_classify.yaml new file mode 100644 index 00000000..bdb086c0 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/OUT_classify.yaml @@ -0,0 +1,1144 @@ +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + batch_sizes: + crop_type_classification: 32 + cropland_classification: 16 + vessel_classification: 16 + data_modules: + crop_type_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 32 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: [] + sentinel2_1: [] + sentinel2_10: [] + sentinel2_11: [] + sentinel2_2: [] + sentinel2_3: [] + sentinel2_4: [] + sentinel2_5: [] + sentinel2_6: [] + sentinel2_7: [] + sentinel2_8: [] + sentinel2_9: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + sentinel1_0: [] + sentinel1_1: [] + sentinel1_10: [] + sentinel1_11: [] + sentinel1_2: [] + sentinel1_3: [] + sentinel1_4: [] + sentinel1_5: [] + sentinel1_6: [] + sentinel1_7: [] + sentinel1_8: [] + sentinel1_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.pad.Pad + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + mode: center + size: 8 + inputs: + label: + data_type: vector + is_target: true + layers: + - label + sentinel1_0: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + sentinel1_1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + sentinel1_10: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.10 + passthrough: true + sentinel1_11: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.11 + passthrough: true + sentinel1_2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + sentinel1_3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + sentinel1_4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.4 + passthrough: true + sentinel1_5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.5 + passthrough: true + sentinel1_6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.6 + passthrough: true + sentinel1_7: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.7 + passthrough: true + sentinel1_8: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.8 + passthrough: true + sentinel1_9: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.9 + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/crop/kenya_nandi/20250625 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + crop_type_classification: + label: targets + tasks: + crop_type_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Coffee + - Trees + - Grassland + - Maize + - Sugarcane + - Tea + - Water + - Built-up + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + test_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: val + train_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: train + val_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: val + cropland_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 16 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: [] + sentinel2_1: [] + sentinel2_10: [] + sentinel2_11: [] + sentinel2_2: [] + sentinel2_3: [] + sentinel2_4: [] + sentinel2_5: [] + sentinel2_6: [] + sentinel2_7: [] + sentinel2_8: [] + sentinel2_9: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + sentinel1_0: [] + sentinel1_1: [] + sentinel1_10: [] + sentinel1_11: [] + sentinel1_2: [] + sentinel1_3: [] + sentinel1_4: [] + sentinel1_5: [] + sentinel1_6: [] + sentinel1_7: [] + sentinel1_8: [] + sentinel1_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.pad.Pad + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + mode: center + size: 8 + inputs: + label: + data_type: vector + is_target: true + layers: + - label + sentinel1_0: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1 + passthrough: true + sentinel1_1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.1 + passthrough: true + sentinel1_10: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.10 + passthrough: true + sentinel1_11: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.11 + passthrough: true + sentinel1_2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.2 + passthrough: true + sentinel1_3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.3 + passthrough: true + sentinel1_4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.4 + passthrough: true + sentinel1_5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.5 + passthrough: true + sentinel1_6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.6 + passthrough: true + sentinel1_7: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.7 + passthrough: true + sentinel1_8: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.8 + passthrough: true + sentinel1_9: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.9 + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/crop/worldcereal_cropland/20250626 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + cropland_classification: + label: targets + tasks: + cropland_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Cropland + - Non-Cropland + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + test_config: + groups: + - h3_sample100_66K + tags: + split: val + train_config: + groups: + - h3_sample100_66K + tags: + split: train + val_config: + groups: + - h3_sample100_66K + tags: + split: val + vessel_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 16 + default_config: + transforms: + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + label: + data_type: vector + is_target: true + layers: + - label + landsat: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/landsat_vessel_detection/classifier/dataset_20250624 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + vessel_classification: + label: targets + tasks: + vessel_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + allow_invalid: true + classes: + - correct + - incorrect + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: label + skip_unknown_categories: true + test_config: + groups: + - phase2a_completed + tags: + split: val + train_config: + groups: + - selected_copy + - phase2a_completed + - phase3a_selected + tags: + split: train + val_config: + groups: + - phase2a_completed + tags: + split: val + num_workers: 16 + refill_batches: true + sample_mode: random_cycle +model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.0002 + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + decoder_to_target: + ClassificationHead: + - vessel_classification + - crop_type_classification + - cropland_classification + decoders: + ClassificationHead: + - class_path: rslearn.models.pooling_decoder.PoolingDecoder + init_args: + in_channels: 768 + out_channels: 12 + - class_path: rslearn.train.tasks.classification.ClassificationHead + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: /weka/dfive-default/helios/checkpoints/yawenzzzz/latent_mim_cross_random_per_modality_patchdisc_add_contrastive_0.1_1/step400000 + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_lora_kwargs: + gen_hidden: 128 + task_lora_indices: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 10 + - 11 + use_task_lora: true + task_moe_kwargs: + add_noise: true + compute_slots_from_task: true + expert_mult: 4 + noise_mult: 0.2 + num_experts: 4 + num_slots: 4 + task_moe_indices: + - 9 + - 10 + - 11 + use_task_moe: true + selector: + - encoder + task_embed_opts: + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt + type: precomputed + lazy_decode: true + task_label_offsets: + crop_type_classification: + num_outputs: 8 + offset: 2 + outputs_key: class + cropland_classification: + num_outputs: 2 + offset: 10 + outputs_key: class + vessel_classification: + num_outputs: 2 + offset: 0 + outputs_key: class + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 50 + eta_min: 0 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + crop_type_classification: + label: targets + cropland_classification: + label: targets + vessel_classification: + label: targets + tasks: + crop_type_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Coffee + - Trees + - Grassland + - Maize + - Sugarcane + - Tea + - Water + - Built-up + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + cropland_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Cropland + - Non-Cropland + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + vessel_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + allow_invalid: true + classes: + - correct + - incorrect + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: label + skip_unknown_categories: true +rslp_experiment: placeholder +rslp_project: placeholder +trainer: + accumulate_grad_batches: 3 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: epoch + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + mode: min + monitor: val_loss + save_last: true + save_top_k: 1 + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - at_epoch: 0 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - moe + - at_epoch: 20 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - lora + max_epochs: 200 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/OUT_detect.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/OUT_detect.yaml new file mode 100644 index 00000000..025a8d15 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/OUT_detect.yaml @@ -0,0 +1,1791 @@ +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + batch_sizes: + detect_satlas_marine_infra: 8 + detect_satlas_wind_turbine: 8 + detect_sentinel1_vessels: 8 + detect_sentinel2_vessels: 8 + vessel_detection: 8 + data_modules: + detect_satlas_marine_infra: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/marine_infra/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_marine_infra: + targets: targets + tasks: + detect_satlas_marine_infra: + class_path: rslp.satlas.train.MarineInfraTask + init_args: + box_size: 15 + classes: + - unknown + - platform + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + - - 0.1 + - - 0.2 + - - 0.3 + - - 0.4 + - - 0.5 + - - 0.6 + - - 0.7 + - - 0.8 + - - 0.9 + image_bands: + - 2 + - 1 + - 0 + property_name: category + remap_values: + - - 0 + - 0.25 + - - 0 + - 255 + skip_unknown_categories: true + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 65536 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_satlas_marine_infra + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + val_config: + patch_size: 128 + tags: + split: val + detect_satlas_wind_turbine: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + s25: [] + s26: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + landsat5: [] + landsat6: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + s1a5: [] + s1a6: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + landsat5: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.4 + passthrough: true + landsat6: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.5 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1a5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.4 + passthrough: true + s1a6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.5 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s1d5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.4 + passthrough: true + s1d6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.5 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + s25: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + s26: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/wind_turbine/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_wind_turbine: + targets: targets + tasks: + detect_satlas_wind_turbine: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 65536 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + s25: [] + s26: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + landsat5: [] + landsat6: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + s1a5: [] + s1a6: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_satlas_wind_turbine + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + val_config: + patch_size: 128 + tags: + split: val + detect_sentinel1_vessels: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/sentinel1_vessels/dataset_v1/20250602/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_sentinel1_vessels: + targets: targets + tasks: + detect_sentinel1_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + image_bands: + - 1 + - 1 + - 1 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.5 + test_config: + groups: + - val_ascending + - val_descending + patch_size: 128 + train_config: + groups: + - train_ascending + - train_descending + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 32768 + replacement: true + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_sentinel1_vessels + image_selectors: + - image + - sentinel1 + val_config: + groups: + - val_ascending + - val_descending + patch_size: 128 + detect_sentinel2_vessels: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/sentinel2_vessels/dataset_v1/20250213/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_sentinel2_vessels: + targets: targets + tasks: + detect_sentinel2_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + groups: + - sargassum_val + - split1 + - split7 + patch_size: 128 + train_config: + groups: + - sargassum_train + - split2 + - split3 + - split4 + - split5 + - split6 + - train + - train-bg + - train2 + - train3 + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 131072 + replacement: true + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_sentinel2_vessels + image_selectors: + - image + - sentinel2_l2a + val_config: + groups: + - sargassum_val + - split1 + - split7 + patch_size: 128 + vessel_detection: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/landsat_vessel_detection/detector/dataset_20250624 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + vessel_detection: + targets: targets + tasks: + vessel_detection: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.7 + test_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: val + train_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: train + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + val_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: val + num_workers: 16 + refill_batches: true + sample_mode: random_cycle +model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.0002 + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + decoder_to_target: + FasterRCNN: + - vessel_detection + - detect_satlas_marine_infra + - detect_satlas_wind_turbine + - detect_sentinel1_vessels + - detect_sentinel2_vessels + decoders: + FasterRCNN: + - class_path: rslearn.models.faster_rcnn.FasterRCNN + init_args: + anchor_sizes: + - - 32 + downsample_factors: + - 8 + num_channels: 768 + num_classes: 8 + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: /weka/dfive-default/helios/checkpoints/yawenzzzz/latent_mim_cross_random_per_modality_patchdisc_add_contrastive_0.1_1/step400000 + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_lora_kwargs: + gen_hidden: 128 + task_lora_indices: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 10 + - 11 + use_task_lora: true + task_moe_kwargs: + add_noise: true + compute_slots_from_task: true + expert_mult: 4 + noise_mult: 0.2 + num_experts: 4 + num_slots: 4 + task_moe_indices: + - 9 + - 10 + - 11 + use_task_moe: true + selector: + - encoder + task_embed_opts: + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt + type: precomputed + lazy_decode: true + task_label_offsets: + detect_satlas_marine_infra: + num_outputs: 3 + offset: 2 + outputs_key: labels + detect_satlas_wind_turbine: + num_outputs: 3 + offset: 5 + outputs_key: labels + detect_sentinel1_vessels: + num_outputs: 2 + offset: 0 + outputs_key: labels + detect_sentinel2_vessels: + num_outputs: 2 + offset: 0 + outputs_key: labels + vessel_detection: + num_outputs: 2 + offset: 0 + outputs_key: labels + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 50 + eta_min: 0 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_marine_infra: + targets: targets + detect_satlas_wind_turbine: + targets: targets + detect_sentinel1_vessels: + targets: targets + detect_sentinel2_vessels: + targets: targets + vessel_detection: + targets: targets + tasks: + detect_satlas_marine_infra: + class_path: rslp.satlas.train.MarineInfraTask + init_args: + box_size: 15 + classes: + - unknown + - platform + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + - - 0.1 + - - 0.2 + - - 0.3 + - - 0.4 + - - 0.5 + - - 0.6 + - - 0.7 + - - 0.8 + - - 0.9 + image_bands: + - 2 + - 1 + - 0 + property_name: category + remap_values: + - - 0 + - 0.25 + - - 0 + - 255 + skip_unknown_categories: true + detect_satlas_wind_turbine: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + detect_sentinel1_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + image_bands: + - 1 + - 1 + - 1 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.5 + detect_sentinel2_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + vessel_detection: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.7 +rslp_experiment: placeholder +rslp_project: placeholder +trainer: + accumulate_grad_batches: 5 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: epoch + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + mode: min + monitor: val_loss + save_last: true + save_top_k: 1 + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - at_epoch: 0 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - moe + - at_epoch: 20 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - lora + max_epochs: 200 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/OUT_segment.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/OUT_segment.yaml new file mode 100644 index 00000000..6796e2d1 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/OUT_segment.yaml @@ -0,0 +1,1328 @@ +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + batch_sizes: + segment: 2 + segment_satlas_solar_farm: 8 + data_modules: + segment: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 2 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_1: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_10: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_11: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_2: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_3: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_4: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_5: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_6: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_7: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_8: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_9: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1d_0: [] + s1d_1: [] + s1d_10: [] + s1d_11: [] + s1d_2: [] + s1d_3: [] + s1d_4: [] + s1d_5: [] + s1d_6: [] + s1d_7: [] + s1d_8: [] + s1d_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + s1d_0: + bands: + - vv + - vh + data_type: raster + layers: + - s1d + passthrough: true + s1d_1: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.1 + passthrough: true + s1d_10: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.10 + passthrough: true + s1d_11: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.11 + passthrough: true + s1d_2: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.2 + passthrough: true + s1d_3: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.3 + passthrough: true + s1d_4: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.4 + passthrough: true + s1d_5: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.5 + passthrough: true + s1d_6: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.6 + passthrough: true + s1d_7: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.7 + passthrough: true + s1d_8: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.8 + passthrough: true + s1d_9: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.9 + passthrough: true + targets: + bands: + - class + data_type: raster + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/pastis/rslearn_dataset/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + segment: + targets: targets + tasks: + segment: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_miou_metric: true + metric_kwargs: + average: micro + num_classes: 20 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + zero_is_invalid: true + test_config: + groups: + - fold5 + train_config: + groups: + - fold1 + - fold2 + - fold3 + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_1: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_10: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_11: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_2: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_3: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_4: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_5: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_6: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_7: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_8: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_9: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1d_0: [] + s1d_1: [] + s1d_10: [] + s1d_11: [] + s1d_2: [] + s1d_3: [] + s1d_4: [] + s1d_5: [] + s1d_6: [] + s1d_7: [] + s1d_8: [] + s1d_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + - target/segment/classes + - target/segment/valid + val_config: + groups: + - fold4 + segment_satlas_solar_farm: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + targets: + bands: + - label + data_type: raster + dtype: INT32 + is_target: true + layers: + - label_raster + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/solar_farm/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + segment_satlas_solar_farm: + targets: targets + tasks: + segment_satlas_solar_farm: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_f1_metric: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + metric_kwargs: + average: micro + num_classes: 2 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 16384 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - target/segment_satlas_solar_farm/classes + - target/segment_satlas_solar_farm/valid + val_config: + patch_size: 128 + tags: + split: val + num_workers: 16 + refill_batches: true + sample_mode: random_cycle +model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.0002 + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + decoder_to_target: + SegmentationHead: + - segment + - segment_satlas_solar_farm + decoders: + SegmentationHead: + - class_path: rslearn.models.unet.UNetDecoder + init_args: + conv_layers_per_resolution: 2 + in_channels: + - - 8 + - 768 + num_channels: + 1: 128 + 2: 256 + 4: 512 + 8: 512 + out_channels: 22 + - class_path: rslearn.train.tasks.segmentation.SegmentationHead + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_lora_kwargs: + gen_hidden: 128 + task_lora_indices: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 10 + - 11 + use_task_lora: true + task_moe_kwargs: + add_noise: true + compute_slots_from_task: true + expert_mult: 4 + noise_mult: 0.2 + num_experts: 4 + num_slots: 4 + task_moe_indices: + - 9 + - 10 + - 11 + use_task_moe: true + selector: + - encoder + task_embed_opts: + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct.pt + type: precomputed + lazy_decode: true + task_label_offsets: + segment: + num_outputs: 20 + offset: 0 + outputs_key: classes + segment_satlas_solar_farm: + num_outputs: 2 + offset: 20 + outputs_key: classes + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 50 + eta_min: 0 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + segment: + targets: targets + segment_satlas_solar_farm: + targets: targets + tasks: + segment: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_miou_metric: true + metric_kwargs: + average: micro + num_classes: 20 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + zero_is_invalid: true + segment_satlas_solar_farm: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_f1_metric: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + metric_kwargs: + average: micro + num_classes: 2 + remap_values: + - - 0 + - 1 + - - 0 + - 255 +rslp_experiment: placeholder +rslp_project: placeholder +trainer: + accumulate_grad_batches: 2 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: epoch + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + mode: min + monitor: val_loss + save_last: true + save_top_k: 1 + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - at_epoch: 0 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - moe + - at_epoch: 20 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - lora + max_epochs: 200 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/all.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/all.yaml new file mode 100644 index 00000000..a844a20b --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/all.yaml @@ -0,0 +1,39 @@ +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/OUT_all.yaml + +dataset_cfgs: + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_classifier_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_nandi_crop_type/finetune_s1_s2_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_worldcereal_cropland/finetune_s1_s2_cosinelr.yaml + + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_pastis/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_pastis/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_solar_farm_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_solar_farm_128/basecfg_helios_mm.yaml + + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_detector_cosinelr.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_marine_infra_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_marine_infra_128/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_wind_turbine_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_wind_turbine_128/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_helios.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel2_vessels_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel2_vessels_128/basecfg_helios.yaml + +substitutions: + patch_size: 8 + encoder_embedding_size: 768 + helios_checkpoint_path: /weka/dfive-default/helios/checkpoints/yawenzzzz/latent_mim_cross_random_per_modality_patchdisc_add_contrastive_0.1_1/step400000 + +global_overrides: + model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + trainer: + accumulate_grad_batches: 9 + +merge_options: + merge_heads: true + merge_task_labels: true + same_label_groups: + - [detect_sentinel1_vessels, detect_sentinel2_vessels, vessel_detection] \ No newline at end of file diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/base.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/base.yaml new file mode 100644 index 00000000..c2d20976 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/base.yaml @@ -0,0 +1,74 @@ +model: + class_path: rslp.helios.lightning_module.MoELightningModule + init_args: + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: "{CHECKPOINT_PATH}" + selector: ["encoder"] + forward_kwargs: + patch_size: {PATCH_SIZE} + model_overrides: + encoder_config: + task_lora_kwargs: + use_task_lora: true + task_lora_indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] + gen_hidden: 128 + task_moe_kwargs: + use_task_moe: true + task_moe_indices: [9, 10, 11] + add_noise: true + noise_mult: 0.2 + num_experts: 4 + num_slots: 4 + expert_mult: 4 + compute_slots_from_task: true + task_embed_opts: + type: "precomputed" + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt + decoders: # Filled in by make_multidataset_config.py + lazy_decode: true + lr: 0.0002 + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 50 + eta_min: 0 + +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + sample_mode: random_cycle + refill_batches: true + num_workers: 16 + data_modules: # Filled in by make_multidataset_config.py + +trainer: + max_epochs: 200 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: "epoch" + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + save_top_k: 1 + save_last: true + monitor: val_loss + mode: min + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - at_epoch: 0 + freeze_selectors: ["encoder"] + unfreeze_selectors: ["head", "moe"] + - at_epoch: 20 + freeze_selectors: ["encoder"] + unfreeze_selectors: ["head", "lora"] + +rslp_project: placeholder +rslp_experiment: placeholder + +all_dataset_info_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v3_multitask/all_dataset_info.yaml \ No newline at end of file diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/classify.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/classify.yaml new file mode 100644 index 00000000..26797b00 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/classify.yaml @@ -0,0 +1,23 @@ +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/OUT_classify.yaml + +dataset_cfgs: + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_classifier_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_nandi_crop_type/finetune_s1_s2_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_worldcereal_cropland/finetune_s1_s2_cosinelr.yaml + +substitutions: + patch_size: 8 + encoder_embedding_size: 768 + helios_checkpoint_path: /weka/dfive-default/helios/checkpoints/yawenzzzz/latent_mim_cross_random_per_modality_patchdisc_add_contrastive_0.1_1/step400000 + +global_overrides: + model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + trainer: + accumulate_grad_batches: 3 + +merge_options: + merge_heads: true + merge_task_labels: true + same_label_groups: diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/detect.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/detect.yaml new file mode 100644 index 00000000..fb8727d5 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/detect.yaml @@ -0,0 +1,30 @@ +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/OUT_detect.yaml + +dataset_cfgs: + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_detector_cosinelr.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_marine_infra_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_marine_infra_128/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_wind_turbine_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_wind_turbine_128/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_helios.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel2_vessels_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel2_vessels_128/basecfg_helios.yaml + +substitutions: + patch_size: 8 + encoder_embedding_size: 768 + helios_checkpoint_path: /weka/dfive-default/helios/checkpoints/yawenzzzz/latent_mim_cross_random_per_modality_patchdisc_add_contrastive_0.1_1/step400000 + +global_overrides: + model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + trainer: + accumulate_grad_batches: 5 + +merge_options: + merge_heads: true + merge_task_labels: true + same_label_groups: + - [detect_sentinel1_vessels, detect_sentinel2_vessels, vessel_detection] diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/exp_id.txt b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/exp_id.txt new file mode 100644 index 00000000..964266b5 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/exp_id.txt @@ -0,0 +1 @@ +{task}_alltricks_cyclic \ No newline at end of file diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/segment.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/segment.yaml new file mode 100644 index 00000000..64c6fa1d --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/segment.yaml @@ -0,0 +1,26 @@ +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/OUT_segment.yaml + +dataset_cfgs: + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_pastis/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_pastis/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_solar_farm_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_solar_farm_128/basecfg_helios_mm.yaml + +global_overrides: + model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.0002 + trainer: + accumulate_grad_batches: 2 + +merge_options: + merge_heads: true + merge_task_labels: true + same_label_groups: + +substitutions: + patch_size: 8 + encoder_embedding_size: 768 + helios_checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 diff --git a/one_off_projects/2025_07_joint_finetune/scripts/ckpt_to_distributed.py b/one_off_projects/2025_07_joint_finetune/scripts/ckpt_to_distributed.py index 5d014698..d1799f8e 100644 --- a/one_off_projects/2025_07_joint_finetune/scripts/ckpt_to_distributed.py +++ b/one_off_projects/2025_07_joint_finetune/scripts/ckpt_to_distributed.py @@ -106,6 +106,7 @@ def deep_merge(base, override): print("=====================\n") # save the actual distributed checkpoint + os.makedirs(os.path.join(args.save_dir, args.run), exist_ok=True) extractor = ckpt_to_distributed( base_class=base_class, **model_config, diff --git a/one_off_projects/2025_07_joint_finetune/scripts/do_eval_sft.py b/one_off_projects/2025_07_joint_finetune/scripts/do_eval_sft.py index d6167f07..a30be5a3 100644 --- a/one_off_projects/2025_07_joint_finetune/scripts/do_eval_sft.py +++ b/one_off_projects/2025_07_joint_finetune/scripts/do_eval_sft.py @@ -25,12 +25,19 @@ parser = argparse.ArgumentParser() parser.add_argument("ckpt_path", type=str, help="Path to the checkpoint") parser.add_argument("task", type=str, help="Task to evaluate") +parser.add_argument("old_or_new", type=str, help="old or new helios checkpoint") args = parser.parse_args() ckpt_cfg_paths = all_cfgs[args.task] +if args.old_or_new.lower() == "old": + helios_path = "/weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000" +else: + helios_path = "/weka/dfive-default/helios/checkpoints/yawenzzzz/latent_mim_cross_random_per_modality_patchdisc_add_contrastive_0.1_1/step400000" +print("using helios path", helios_path) +print() cmd = [ "python", "-m", "rslp.main", "helios", "launch_finetune", - "--helios_checkpoint_path", "/weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000", + "--helios_checkpoint_path", helios_path, "--patch_size", "8", "--encoder_embedding_size", "768", "--image_name", "henryh/rslp_multidataset_dev", diff --git a/one_off_projects/2025_07_joint_finetune/scripts/make_task_embeds.py b/one_off_projects/2025_07_joint_finetune/scripts/make_task_embeds.py index d5219a49..b0828c18 100644 --- a/one_off_projects/2025_07_joint_finetune/scripts/make_task_embeds.py +++ b/one_off_projects/2025_07_joint_finetune/scripts/make_task_embeds.py @@ -343,8 +343,9 @@ def main() -> None: if ds_name == "anchor_dataset": anchor_text = summary else: + assert len(ds["tasks"]) == 1, f"Got {len(ds['tasks'])} tasks for {ds_name}" tasks.append(ds_name) - keys.append(ds_name) + keys.append(list(ds["tasks"].keys())[0]) summaries.append(summary) else: @@ -418,14 +419,11 @@ def main() -> None: print(f"Model: {args.model}") if args.from_yaml: print(f"Datasets YAML: {args.from_yaml}") - print("Sorted subtask key list:") - for key in keys: - print(f" - {key}") else: print(f"Base dir: {args.base_dir}") - print("Sorted task dir -> key:") - for task_dir, key in zip(tasks, keys): - print(f" - {task_dir:<30} -> {key}") + print("Sorted task dir -> key:") + for task_dir, key in zip(tasks, keys): + print(f" - {task_dir:<30} -> {key}") print() # Load model once diff --git a/one_off_projects/2025_07_joint_finetune/scripts/run_all.py b/one_off_projects/2025_07_joint_finetune/scripts/run_all.py index 59bd5924..56a86225 100644 --- a/one_off_projects/2025_07_joint_finetune/scripts/run_all.py +++ b/one_off_projects/2025_07_joint_finetune/scripts/run_all.py @@ -1,23 +1,31 @@ import os import argparse +ckpt_paths = { + "v1": "/weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000", + "v2": "/weka/dfive-default/helios/checkpoints/yawenzzzz/latent_mim_cross_random_per_modality_patchdisc_add_contrastive_0.1_1/step400000", +} + + def find_dir(base_dir, postfix_dir): for d in os.listdir(base_dir): if d.endswith(postfix_dir): return d raise ValueError(f"Directory {postfix_dir} not found in {base_dir}") - parser = argparse.ArgumentParser() parser.add_argument("--dirs", type=str, required=True, nargs="+") -parser.add_argument("--tasks", type=str, nargs="*", default=["classify", "segment", "detect"]) +parser.add_argument("--tasks", type=str, nargs="*", default=["classify", "segment", "detect", "all"]) parser.add_argument("--base_dir", type=str, default="/weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs") parser.add_argument("--project", type=str, default="2025_08_12_task_embeds") parser.add_argument("--clusters", type=str, nargs="*", default=["saturn", "ceres", "titan"]) +parser.add_argument("--ckpt_path", type=str, default=ckpt_paths["v1"]) parser.add_argument("--dry", action="store_true") args = parser.parse_args() -template = "python3 run.py --cfg {cfg} --exp_id {exp} --gpu 4 --image dev --project {project} --clusters {clusters}" +template = "python3 run.py --cfg {cfg} --exp_id {exp} --gpu 4 --image dev --project {project} --clusters {clusters} --ckpt_path {ckpt_path}" +if args.ckpt_path in ckpt_paths: + args.ckpt_path = ckpt_paths[args.ckpt_path] for postfix_dir in args.dirs: d = find_dir(args.base_dir, postfix_dir) @@ -38,6 +46,7 @@ def find_dir(base_dir, postfix_dir): exp=exp_id, project=args.project, clusters=" ".join(args.clusters), + ckpt_path=args.ckpt_path, ) print(cmd) if not args.dry: diff --git a/one_off_projects/2025_07_joint_finetune/scripts/submit_base_finetune.py b/one_off_projects/2025_07_joint_finetune/scripts/submit_base_finetune.py index b82beca5..f86460a0 100644 --- a/one_off_projects/2025_07_joint_finetune/scripts/submit_base_finetune.py +++ b/one_off_projects/2025_07_joint_finetune/scripts/submit_base_finetune.py @@ -9,14 +9,17 @@ RUN = True DEBUG = False #PROJECT_NAME = "helios-debug" if DEBUG else "2025_07_29_helios_finetune" #"2025_07_29_helios_joint_finetune_debug" -PROJECT_NAME = "helios_finetune_cosinelr"#"2025_07_30_joint_finetune_sweep" -CKPT_PATH = "/weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000" +# PROJECT_NAME = "helios_finetune_cosinelr"#"2025_07_30_joint_finetune_sweep" +PROJECT_NAME = "2025_08_21_multitask" +# CKPT_PATH = "/weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000" +CKPT_PATH = "/weka/dfive-default/helios/checkpoints/yawenzzzz/latent_mim_cross_random_per_modality_patchdisc_add_contrastive_0.1_1/step400000" IMAGE_NAME = "henryh/rslp_multidataset_dev_0.05w" if "joint_finetune_debug" in PROJECT_NAME else "henryh/rslp_multidataset_dev" def submit_job(task_dir: str, task_name: str, cfgs: list[str]) -> bool: """Submit a single helios finetune job.""" - exp_id = task_name + "_0.05w" if "joint_finetune_debug" in PROJECT_NAME else task_name + "__fewbatcheval" + # exp_id = task_name + "_0.05w" if "joint_finetune_debug" in PROJECT_NAME else task_name + "__fewbatcheval" + exp_id = task_name + "_v2" cmd = [ "python", "-m", "rslp.main", "helios", "launch_finetune", "--helios_checkpoint_path", CKPT_PATH, @@ -57,17 +60,17 @@ def submit_job(task_dir: str, task_name: str, cfgs: list[str]) -> bool: def main(): """Submit jobs.""" TASK_CFG_PAIRS = [ - # ("v2_pastis", "pastis", "basecfg_cosinelr.yaml", "basecfg_helios_mm.yaml"), - # ("v2_nandi_crop_type", "nandi_crop_type", "finetune_s1_s2_cosinelr.yaml"), - # ("v2_worldcereal_cropland", "worldcereal_cropland", "finetune_s1_s2_cosinelr.yaml"), - # "v2_landsat_vessels", "landsat_vessel_classify", "finetune_classifier_cosinelr.yaml"), - ("v2_landsat_vessels", "landsat_vessel_detect", "finetune_detector_cosinelr.yaml", "few_batch_eval.yaml"), - # ("v2_lfmc", "lfmc", "finetune_s1_s2_srtm_cosinelr.yaml"), - ("v2_satlas_marine_infra_128", "marine_infra", "basecfg_cosinelr.yaml", "basecfg_helios_mm.yaml", "few_batch_eval.yaml"), - ("v2_satlas_wind_turbine_128", "wind_turbine", "basecfg_cosinelr.yaml", "basecfg_helios_mm.yaml", "few_batch_eval.yaml"), - ("v2_sentinel1_vessels_128", "vessel_sentinel1", "basecfg_cosinelr.yaml", "basecfg_helios.yaml", "few_batch_eval.yaml"), - ("v2_sentinel2_vessels_128", "vessel_sentinel2", "basecfg_cosinelr.yaml", "basecfg_helios.yaml", "few_batch_eval.yaml"), - # ("v2_satlas_solar_farm_128", "solar_farm", "basecfg_cosinelr.yaml", "basecfg_helios.yaml"), + ("v2_pastis", "pastis", "basecfg_cosinelr.yaml", "basecfg_helios_mm.yaml"), + ("v2_nandi_crop_type", "nandi_crop_type", "finetune_s1_s2_cosinelr.yaml"), + ("v2_worldcereal_cropland", "worldcereal_cropland", "finetune_s1_s2_cosinelr.yaml"), + ("v2_landsat_vessels", "landsat_vessel_classify", "finetune_classifier_cosinelr.yaml"), + ("v2_landsat_vessels", "landsat_vessel_detect", "finetune_detector_cosinelr.yaml"), + ("v2_satlas_marine_infra_128", "marine_infra", "basecfg_cosinelr.yaml", "basecfg_helios_mm.yaml"), + ("v2_satlas_wind_turbine_128", "wind_turbine", "basecfg_cosinelr.yaml", "basecfg_helios_mm.yaml"), + ("v2_sentinel1_vessels_128", "vessel_sentinel1", "basecfg_cosinelr.yaml", "basecfg_helios.yaml"), + ("v2_sentinel2_vessels_128", "vessel_sentinel2", "basecfg_cosinelr.yaml", "basecfg_helios.yaml"), + ("v2_satlas_solar_farm_128", "solar_farm", "basecfg_cosinelr.yaml", "basecfg_helios_mm.yaml"), + ("v2_lfmc", "lfmc", "finetune_s1_s2_srtm_cosinelr.yaml"), ] print(f"Submitting {len(TASK_CFG_PAIRS)} jobs...") diff --git a/rslp/helios/model.py b/rslp/helios/model.py index d7670b4a..cfa6386a 100644 --- a/rslp/helios/model.py +++ b/rslp/helios/model.py @@ -207,7 +207,7 @@ def forward(self, inputs: list[dict[str, Any]]) -> list[torch.Tensor]: # Currently we assume the provided model always returns a TokensAndMasks object. tokens_and_masks: TokensAndMasks = self.model( sample, always_pass_none_mask_to_transformer=True, **self.forward_kwargs - )[0] + )["tokens_and_masks"] # Apply temporal/modality pooling so we just have one feature per patch. features = [] From f08df1324ad134e502a5153e280b1d0fd8312d3a Mon Sep 17 00:00:00 2001 From: ryanp Date: Tue, 26 Aug 2025 17:31:55 +0000 Subject: [PATCH 07/16] Update experiments --- .../configs/2025_08_21_new_task/OUT_all.yaml | 7 +++++++ .../configs/2025_08_21_new_task/OUT_classify.yaml | 7 +++++++ .../configs/2025_08_21_new_task/OUT_detect.yaml | 7 +++++++ .../configs/2025_08_21_new_task/base.yaml | 4 ++++ .../configs/2025_08_21_new_task/exp_id.txt | 2 +- .../2025_07_joint_finetune/scripts/submit_base_finetune.py | 6 +++--- 6 files changed, 29 insertions(+), 4 deletions(-) diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/OUT_all.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/OUT_all.yaml index 0949e06e..d735f89f 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/OUT_all.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/OUT_all.yaml @@ -4045,6 +4045,13 @@ trainer: monitor: val_loss save_last: true save_top_k: 1 + - class_path: rslearn.train.callbacks.gradients.MiniPCGrad + init_args: + only_monitor: false + selectors: + - moe + - lora + - head - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning init_args: stages: diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/OUT_classify.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/OUT_classify.yaml index bdb086c0..7e4a3f6b 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/OUT_classify.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/OUT_classify.yaml @@ -1126,6 +1126,13 @@ trainer: monitor: val_loss save_last: true save_top_k: 1 + - class_path: rslearn.train.callbacks.gradients.MiniPCGrad + init_args: + only_monitor: false + selectors: + - moe + - lora + - head - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning init_args: stages: diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/OUT_detect.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/OUT_detect.yaml index 025a8d15..3ccf4ad7 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/OUT_detect.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/OUT_detect.yaml @@ -1773,6 +1773,13 @@ trainer: monitor: val_loss save_last: true save_top_k: 1 + - class_path: rslearn.train.callbacks.gradients.MiniPCGrad + init_args: + only_monitor: false + selectors: + - moe + - lora + - head - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning init_args: stages: diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/base.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/base.yaml index c2d20976..6bc9e60e 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/base.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/base.yaml @@ -58,6 +58,10 @@ trainer: save_last: true monitor: val_loss mode: min + - class_path: rslearn.train.callbacks.gradients.MiniPCGrad + init_args: + selectors: ["moe", "lora", "head"] + only_monitor: false - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning init_args: stages: diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/exp_id.txt b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/exp_id.txt index 964266b5..c3ad9b62 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/exp_id.txt +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/exp_id.txt @@ -1 +1 @@ -{task}_alltricks_cyclic \ No newline at end of file +{task}_alltricks_cyclic_pcgrad \ No newline at end of file diff --git a/one_off_projects/2025_07_joint_finetune/scripts/submit_base_finetune.py b/one_off_projects/2025_07_joint_finetune/scripts/submit_base_finetune.py index f86460a0..a47f1784 100644 --- a/one_off_projects/2025_07_joint_finetune/scripts/submit_base_finetune.py +++ b/one_off_projects/2025_07_joint_finetune/scripts/submit_base_finetune.py @@ -10,7 +10,7 @@ DEBUG = False #PROJECT_NAME = "helios-debug" if DEBUG else "2025_07_29_helios_finetune" #"2025_07_29_helios_joint_finetune_debug" # PROJECT_NAME = "helios_finetune_cosinelr"#"2025_07_30_joint_finetune_sweep" -PROJECT_NAME = "2025_08_21_multitask" +PROJECT_NAME = "2025_08_25_multitask" # CKPT_PATH = "/weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000" CKPT_PATH = "/weka/dfive-default/helios/checkpoints/yawenzzzz/latent_mim_cross_random_per_modality_patchdisc_add_contrastive_0.1_1/step400000" IMAGE_NAME = "henryh/rslp_multidataset_dev_0.05w" if "joint_finetune_debug" in PROJECT_NAME else "henryh/rslp_multidataset_dev" @@ -19,7 +19,7 @@ def submit_job(task_dir: str, task_name: str, cfgs: list[str]) -> bool: """Submit a single helios finetune job.""" # exp_id = task_name + "_0.05w" if "joint_finetune_debug" in PROJECT_NAME else task_name + "__fewbatcheval" - exp_id = task_name + "_v2" + exp_id = task_name cmd = [ "python", "-m", "rslp.main", "helios", "launch_finetune", "--helios_checkpoint_path", CKPT_PATH, @@ -70,7 +70,7 @@ def main(): ("v2_sentinel1_vessels_128", "vessel_sentinel1", "basecfg_cosinelr.yaml", "basecfg_helios.yaml"), ("v2_sentinel2_vessels_128", "vessel_sentinel2", "basecfg_cosinelr.yaml", "basecfg_helios.yaml"), ("v2_satlas_solar_farm_128", "solar_farm", "basecfg_cosinelr.yaml", "basecfg_helios_mm.yaml"), - ("v2_lfmc", "lfmc", "finetune_s1_s2_srtm_cosinelr.yaml"), + #("v2_lfmc", "lfmc", "finetune_s1_s2_srtm_cosinelr.yaml"), ] print(f"Submitting {len(TASK_CFG_PAIRS)} jobs...") From 2618e95b736754ba2a8c055a0d4f8154fb5d55f4 Mon Sep 17 00:00:00 2001 From: ryanp Date: Wed, 27 Aug 2025 21:14:59 +0000 Subject: [PATCH 08/16] Update scripts --- .../scripts/multiple_eval_sft.py | 39 ++++++++++++++----- rslp/helios/launch_finetune.py | 6 +++ rslp/lightning_cli.py | 4 ++ 3 files changed, 39 insertions(+), 10 deletions(-) diff --git a/one_off_projects/2025_07_joint_finetune/scripts/multiple_eval_sft.py b/one_off_projects/2025_07_joint_finetune/scripts/multiple_eval_sft.py index fb3d9107..ff23d350 100644 --- a/one_off_projects/2025_07_joint_finetune/scripts/multiple_eval_sft.py +++ b/one_off_projects/2025_07_joint_finetune/scripts/multiple_eval_sft.py @@ -1,15 +1,34 @@ import os +import sys -old_ckpt_home_dir = "/weka/dfive-default/rslearn-eai/projects/helios_finetune_cosine_lr/" -new_ckpt_home_dir = "/weka/dfive-default/rslearn-eai/projects/2025_07_29_helios_finetune/" +version = sys.argv[1] +ckpt_dir = "/weka/dfive-default/rslearn-eai/projects/2025_08_27_helios_cmp/" ckpt = "checkpoints/last.ckpt" -jobs = { - "v2_sentinel1_vessels_128": os.path.join(old_ckpt_home_dir, "vessel_sentinel1", ckpt), - "v2_sentinel2_vessels_128": os.path.join(old_ckpt_home_dir, "vessel_sentinel2", ckpt), - "v2_satlas_marine_infra_128": os.path.join(old_ckpt_home_dir, "marine_infra", ckpt), - "v2_satlas_wind_turbine_128" : os.path.join(old_ckpt_home_dir, "wind_turbine", ckpt), - "vessel_detection": os.path.join(new_ckpt_home_dir, "landsat_vessel_detect", ckpt) +task_to_directory = { + "v2_nandi_crop_type": "nandi_crop_type", + "v2_worldcereal_cropland": "worldcereal_cropland", + "v2_satlas_marine_infra_128": "marine_infra", + "v2_satlas_wind_turbine_128": "wind_turbine", + "v2_sentinel1_vessels_128": "vessel_sentinel1", + "v2_sentinel2_vessels_128": "vessel_sentinel2", + "v2_pastis": "pastis", + "v2_satlas_solar_farm_128": "solar_farm", + "vessel_classification": "landsat_vessel_classify", + "vessel_detection": "landsat_vessel_detect" } +tasks = {v: k for k, v in task_to_directory.items()} -for task, ckpt_path in jobs.items(): - os.system(f"python do_eval_sft.py {ckpt_path} {task}") +for d in os.listdir(ckpt_dir): + if d.endswith("_v1") and version == "v1": + old_or_new = "old" + elif d.endswith("_v2") and version == "v2": + old_or_new = "new" + else: + continue + + ckpt_path = os.path.join(ckpt_dir, d, ckpt) + task = tasks[d.replace("_" + version, "")] + cmd = f"python do_eval_sft.py {ckpt_path} {task} {old_or_new}" + print(cmd) + os.system(cmd) + print() diff --git a/rslp/helios/launch_finetune.py b/rslp/helios/launch_finetune.py index 70b6bfdb..ec21ae8c 100644 --- a/rslp/helios/launch_finetune.py +++ b/rslp/helios/launch_finetune.py @@ -33,6 +33,7 @@ def launch_finetune( profiler: str | None = None, local: bool = False, do_eval: bool = False, + save_eval_path: str | None = None, ckpt_path: str | None = None, allow_missing_weights: bool = False, ) -> None: @@ -57,6 +58,7 @@ def launch_finetune( profiler: Profiler to use for training. Can be 'simple' or 'advanced' or None. local: Whether to run the command locally instead of spawning a Beaker job. do_eval: Whether to just run evals. + save_eval_path: Optionally specify path to save evals to if do_eval. ckpt_path: Optionally specify checkpoint path to load from if do_eval. allow_missing_weights: Whether to allow missing weights in checkpoint specified in --ckpt_path. """ @@ -133,6 +135,10 @@ def launch_finetune( if allow_missing_weights: args.append("--allow_missing_weights") + if save_eval_path: + args.append("--save_eval_path") + args.append(save_eval_path) + if profiler: args.append("--profiler") args.append(profiler) diff --git a/rslp/lightning_cli.py b/rslp/lightning_cli.py index b9a12303..1fefc14c 100644 --- a/rslp/lightning_cli.py +++ b/rslp/lightning_cli.py @@ -349,6 +349,10 @@ def before_instantiate_classes(self) -> None: logger.info(f"Using profiler: {c.profiler}") logger.info(f"Setting max_steps to {max_steps}") + if c.save_eval_path: + c.model.init_args.metrics_file = c.save_eval_path + logger.info(f"Saving evals to {c.save_eval_path}") + if subcommand == "fit" and not c.no_log: # Set the checkpoint directory to canonical GCS location. checkpoint_callback = None From c81932b172b7de955cd1682933c5f9f3fc9c8bd9 Mon Sep 17 00:00:00 2001 From: ryanp Date: Thu, 28 Aug 2025 16:42:05 +0000 Subject: [PATCH 09/16] Update scripts, add save_eval_path --- .../scripts/ckpt_to_distributed.py | 2 +- .../2025_07_joint_finetune/scripts/do_eval_merged.py | 11 +++++++++-- .../2025_07_joint_finetune/scripts/do_eval_sft.py | 1 + .../scripts/multiple_eval_sft.py | 1 + rslp/lightning_cli.py | 6 ++++++ 5 files changed, 18 insertions(+), 3 deletions(-) diff --git a/one_off_projects/2025_07_joint_finetune/scripts/ckpt_to_distributed.py b/one_off_projects/2025_07_joint_finetune/scripts/ckpt_to_distributed.py index d1799f8e..ffd3032e 100644 --- a/one_off_projects/2025_07_joint_finetune/scripts/ckpt_to_distributed.py +++ b/one_off_projects/2025_07_joint_finetune/scripts/ckpt_to_distributed.py @@ -120,7 +120,7 @@ def deep_merge(base, override): with open(base_model_path, "r") as f: base_model_config = json.load(f) - overrides = dict(model=model_config["model_overrides"]) + overrides = dict(model=model_config.get("model_overrides", {})) base_model_config = deep_merge(base_model_config, overrides) with open(os.path.join(args.save_dir, args.run, "config.json"), "w") as f: json.dump(base_model_config, f) diff --git a/one_off_projects/2025_07_joint_finetune/scripts/do_eval_merged.py b/one_off_projects/2025_07_joint_finetune/scripts/do_eval_merged.py index c6bd46d4..a2d3f6ab 100644 --- a/one_off_projects/2025_07_joint_finetune/scripts/do_eval_merged.py +++ b/one_off_projects/2025_07_joint_finetune/scripts/do_eval_merged.py @@ -51,11 +51,13 @@ def replace_key(d, key, value): parser.add_argument("--model", required=True, help="model name (dir)") parser.add_argument("--ckpt", default="last.ckpt", help="ckpt file in {model}/checkpoints/") parser.add_argument("--project", default="helios_finetune_cosine_lr", help="project dir for model") + parser.add_argument("--full", action="store_true", help="set load_all_patches to true") args = parser.parse_args() base_model = args.model ckpt_file = args.ckpt project = args.project + full = args.full ckpt_path = f"/weka/dfive-default/rslearn-eai/projects/{project}/{base_model}" ckpt_cfg_path = os.path.join(ckpt_path, "checkpoints", "config.yaml") @@ -102,8 +104,13 @@ def replace_key(d, key, value): old_cfg_style = False break - # Ensure that load_all_patches is false everywhere - replace_key(cfg, "load_all_patches", False) + # If full, set load_all_patches + if full: + cfg["data"]["init_args"]["val_config"]["load_all_patches"] = True + cfg["data"]["init_args"]["test_config"]["load_all_patches"] = True + else: + # Ensure that load_all_patches is false everywhere + replace_key(cfg, "load_all_patches", False) # Change the old configs to match the new style if old_cfg_style: diff --git a/one_off_projects/2025_07_joint_finetune/scripts/do_eval_sft.py b/one_off_projects/2025_07_joint_finetune/scripts/do_eval_sft.py index a30be5a3..380cd2b9 100644 --- a/one_off_projects/2025_07_joint_finetune/scripts/do_eval_sft.py +++ b/one_off_projects/2025_07_joint_finetune/scripts/do_eval_sft.py @@ -36,6 +36,7 @@ print("using helios path", helios_path) print() cmd = [ + "RSLP_PREFIX=/weka/dfive-default/rslearn-eai", "python", "-m", "rslp.main", "helios", "launch_finetune", "--helios_checkpoint_path", helios_path, "--patch_size", "8", diff --git a/one_off_projects/2025_07_joint_finetune/scripts/multiple_eval_sft.py b/one_off_projects/2025_07_joint_finetune/scripts/multiple_eval_sft.py index ff23d350..ef3e662f 100644 --- a/one_off_projects/2025_07_joint_finetune/scripts/multiple_eval_sft.py +++ b/one_off_projects/2025_07_joint_finetune/scripts/multiple_eval_sft.py @@ -32,3 +32,4 @@ print(cmd) os.system(cmd) print() + break diff --git a/rslp/lightning_cli.py b/rslp/lightning_cli.py index 1fefc14c..ef32bf4e 100644 --- a/rslp/lightning_cli.py +++ b/rslp/lightning_cli.py @@ -210,6 +210,12 @@ def add_arguments_to_parser(self, parser: jsonargparse.ArgumentParser) -> None: action="store_true", help="Allow missing weights in checkpoint specified in --ckpt_path", ) + parser.add_argument( + "--save_eval_path", + type=str, + help="Path to save evals to if do_eval", + default=None, + ) def _get_checkpoint_path( self, checkpoint_dir: UPath, load_best: bool = False, autoresume: bool = False From 5ef39ccdbad670f88c43f5969e05c06ca64e311e Mon Sep 17 00:00:00 2001 From: ryanp Date: Fri, 29 Aug 2025 20:33:18 +0000 Subject: [PATCH 10/16] Update scripts --- .../scripts/do_eval_sft.py | 69 ++++++++++++------- .../scripts/multiple_eval_sft.py | 32 ++++++--- 2 files changed, 66 insertions(+), 35 deletions(-) diff --git a/one_off_projects/2025_07_joint_finetune/scripts/do_eval_sft.py b/one_off_projects/2025_07_joint_finetune/scripts/do_eval_sft.py index 420e2101..eda08141 100644 --- a/one_off_projects/2025_07_joint_finetune/scripts/do_eval_sft.py +++ b/one_off_projects/2025_07_joint_finetune/scripts/do_eval_sft.py @@ -7,11 +7,11 @@ base_dir = "/weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs" all_cfgs = {} for task in os.listdir(base_dir): - if task.startswith("v2_"): + if task.startswith("v2_") and task != "v2_landsat_vessels": all_cfgs[task] = [ os.path.join(base_dir, task, cfg) for cfg in os.listdir(os.path.join(base_dir, task)) - if cfg.endswith(".yaml") + if cfg.endswith(".yaml") and "soup" not in cfg ] all_cfgs["vessel_classification"] = [ @@ -29,6 +29,7 @@ parser.add_argument("task", type=str, help="Task to evaluate") parser.add_argument("old_or_new", type=str, help="old or new helios checkpoint") parser.add_argument("--full", action="store_true", help="Run eval on all patches") +parser.add_argument("--save_eval_path", type=str, help="Path to save eval results") args = parser.parse_args() ckpt_cfg_paths = all_cfgs[args.task] @@ -38,7 +39,7 @@ helios_path = "/weka/dfive-default/helios/checkpoints/yawenzzzz/latent_mim_cross_random_per_modality_patchdisc_add_contrastive_0.1_1/step400000" print("using helios path", helios_path) print() -cmd = [ +cmd_template = [ "RSLP_PREFIX=/weka/dfive-default/rslearn-eai", "python", "-m", "rslp.main", "helios", "launch_finetune", "--helios_checkpoint_path", helios_path, @@ -71,28 +72,48 @@ def load_yaml_config(config_path, substitutions=None): config_str = config_str.replace(f"{{{key}}}", str(value)) return yaml.safe_load(config_str) -cmd.append(f"--ckpt_path={args.ckpt_path}") -for ckpt_cfg_path in ckpt_cfg_paths: - with tempfile.NamedTemporaryFile(mode="w") as f: - cmd.append(f"--config_paths+={f.name}") - cfg = load_yaml_config(ckpt_cfg_path, substitutions) +def deep_merge(base, override): + for k, v in override.items(): + v_copy = v.copy() if hasattr(v, "copy") else v + if k.endswith("+"): + k = k[:-1] + if k not in base: + base[k] = [] + base[k].extend(v_copy) + else: + if isinstance(v, dict): + base[k] = deep_merge(base.get(k, {}), v_copy) + else: + base[k] = v_copy + return base - if args.full: - cfg["data"]["init_args"]["use_in_memory_all_patches_dataset"] = True - for split in ["val", "test"]: - cfg["data"]["init_args"][f"{split}_config"]["load_all_patches"] = True - cfg["data"]["init_args"][f"{split}_config"]["patch_size"] = substitutions["PATCH_SIZE"] +cmd_template.append(f"--ckpt_path={args.ckpt_path}") +with tempfile.NamedTemporaryFile(mode="w") as f: + cmd = cmd_template.copy() + cmd.append(f"--config_paths+={f.name}") + if args.save_eval_path: + cmd.extend(["--save_eval_path", args.save_eval_path]) - print("patched config to have in_memory_all_patches_dataset=True") - yaml.dump(cfg, f) - f.flush() + cfg = {} + for ckpt_cfg_path in ckpt_cfg_paths: + cfg = deep_merge(cfg, load_yaml_config(ckpt_cfg_path, substitutions)) - print(f"Evaluating {args.task} with checkpoint {args.ckpt_path}") - print() - print("=" * 80) - print(" ".join(cmd)) - print("=" * 80) - print() + if args.full: + cfg["data"]["init_args"]["use_in_memory_all_patches_dataset"] = True + for split in ["val", "test"]: + cfg["data"]["init_args"][f"{split}_config"]["load_all_patches"] = True + cfg["data"]["init_args"][f"{split}_config"]["patch_size"] = substitutions["PATCH_SIZE"] - os.chdir("/weka/dfive-default/ryanp/rslearn_projects/") - os.system(" ".join(cmd)) + print("patched config to have in_memory_all_patches_dataset=True") + yaml.dump(cfg, f) + f.flush() + + print(f"Evaluating {args.task} with checkpoint {args.ckpt_path}") + print() + print("=" * 80) + print(" ".join(cmd)) + print("=" * 80) + print() + + os.chdir("/weka/dfive-default/ryanp/rslearn_projects/") + os.system(" ".join(cmd)) diff --git a/one_off_projects/2025_07_joint_finetune/scripts/multiple_eval_sft.py b/one_off_projects/2025_07_joint_finetune/scripts/multiple_eval_sft.py index 406315a7..e301d648 100644 --- a/one_off_projects/2025_07_joint_finetune/scripts/multiple_eval_sft.py +++ b/one_off_projects/2025_07_joint_finetune/scripts/multiple_eval_sft.py @@ -1,10 +1,16 @@ import os -import sys +import argparse -version = sys.argv[1] -full = True +parser = argparse.ArgumentParser() +parser.add_argument("--version", type=str, required=True, help="options are [v1, v2, cosine]") +parser.add_argument("--full", action="store_true", help="Run eval on all patches") +parser.add_argument("--save_dir", type=str, help="Directory to save eval results", default="/weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/evals") +args = parser.parse_args() -ckpt_dir = "/weka/dfive-default/rslearn-eai/projects/2025_08_27_helios_cmp/" +if args.version in ["v1", "v2"]: + ckpt_dir = "/weka/dfive-default/rslearn-eai/projects/2025_08_27_helios_cmp/" +else: + ckpt_dir = "/weka/dfive-default/rslearn-eai/projects/helios_finetune_cosine_lr" ckpt = "checkpoints/last.ckpt" task_to_directory = { "v2_nandi_crop_type": "nandi_crop_type", @@ -21,19 +27,23 @@ tasks = {v: k for k, v in task_to_directory.items()} for d in os.listdir(ckpt_dir): - if d.endswith("_v1") and version == "v1": + if d.endswith("_v1") and args.version == "v1": old_or_new = "old" - elif d.endswith("_v2") and version == "v2": + elif d.endswith("_v2") and args.version == "v2": old_or_new = "new" - else: - continue + elif args.version == "cosine": + old_or_new = "old" ckpt_path = os.path.join(ckpt_dir, d, ckpt) - task = tasks[d.replace("_" + version, "")] + try: + task = tasks[d.replace("_" + args.version, "")] + except KeyError: + continue cmd = f"python do_eval_sft.py {ckpt_path} {task} {old_or_new}" - if full: + if args.full: cmd += " --full" + if args.save_dir: + cmd += f" --save_eval_path {os.path.join(args.save_dir, d + '.json')}" print(cmd) os.system(cmd) print() - break From c2fb843c8c03042a6f14cefe05b1cb04807fbdd0 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 10 Sep 2025 16:41:31 +0000 Subject: [PATCH 11/16] Commit rest of scripts --- .../configs/2025_08_18_task_all/all.yaml | 2 +- .../2025_08_28_regression_test/old.yaml | 2520 ---------- .../configs/2025_08_29_joint/OUT_all.yaml | 4032 ++++++++++++++++ .../configs/2025_08_29_joint/all.yaml | 39 + .../configs/2025_08_29_joint/base.yaml | 60 + .../configs/2025_08_29_joint/exp_id.txt | 1 + .../configs/2025_08_29_lora/OUT_all.yaml | 4069 ++++++++++++++++ .../configs/2025_08_29_lora/all.yaml | 39 + .../configs/2025_08_29_lora/base.yaml | 83 + .../configs/2025_08_29_lora/exp_id.txt | 1 + .../configs/2025_08_29_lora_moe/OUT_all.yaml | 4082 ++++++++++++++++ .../configs/2025_08_29_lora_moe/all.yaml | 39 + .../configs/2025_08_29_lora_moe/base.yaml | 92 + .../configs/2025_08_29_lora_moe/exp_id.txt | 1 + .../2025_08_29_lora_moe_pcgrad/OUT_all.yaml | 4086 +++++++++++++++++ .../2025_08_29_lora_moe_pcgrad/all.yaml | 39 + .../2025_08_29_lora_moe_pcgrad/base.yaml | 94 + .../2025_08_29_lora_moe_pcgrad/exp_id.txt | 1 + .../2025_08_31_moe_decoder/OUT_all.yaml | 4086 +++++++++++++++++ .../configs/2025_08_31_moe_decoder/all.yaml | 58 + .../configs/2025_08_31_moe_decoder/base.yaml | 82 + .../configs/2025_08_31_moe_decoder/exp_id.txt | 1 + .../OUT_landsat_vessels_classifier.yaml | 204 + .../OUT_landsat_vessels_detector.yaml | 288 ++ .../2025_09_01_lora/OUT_nandi_crop_type.yaml | 574 +++ .../configs/2025_09_01_lora/OUT_pastis.yaml | 864 ++++ .../OUT_satlas_marine_infra.yaml | 615 +++ .../OUT_satlas_solar_farm.yaml | 565 +++ .../OUT_satlas_wind_turbine.yaml | 707 +++ .../OUT_sentinel1_vessels.yaml | 278 ++ .../OUT_sentinel2_vessels.yaml | 308 ++ .../OUT_worldcereal_cropland.yaml | 559 +++ .../configs/2025_09_01_lora/base.yaml | 72 + .../configs/2025_09_01_lora/exp_id.txt | 1 + .../landsat_vessels_classifier.yaml | 18 + .../landsat_vessels_detector.yaml | 18 + .../2025_09_01_lora/nandi_crop_type.yaml | 18 + .../configs/2025_09_01_lora/pastis.yaml | 19 + .../2025_09_01_lora/satlas_marine_infra.yaml | 19 + .../2025_09_01_lora/satlas_solar_farm.yaml | 19 + .../2025_09_01_lora/satlas_wind_turbine.yaml | 19 + .../2025_09_01_lora/sentinel1_vessels.yaml | 19 + .../2025_09_01_lora/sentinel2_vessels.yaml | 19 + .../2025_09_01_lora/worldcereal_cropland.yaml | 18 + .../2025_09_02_final/OUT_classify.yaml | 1157 +++++ .../OUT_detect.yaml} | 50 +- .../configs/2025_09_02_final/OUT_segment.yaml | 1318 ++++++ .../configs/2025_09_02_final/base.yaml | 48 + .../configs/2025_09_02_final/classify.yaml | 83 + .../configs/2025_09_02_final/detect.yaml | 74 + .../configs/2025_09_02_final/exp_id.txt | 1 + .../configs/2025_09_02_final/segment.yaml | 65 + .../configs/2025_09_02_scaling/base.yaml | 48 + .../2025_09_03_marine_crop/OUT_crop_lora.yaml | 1817 ++++++++ .../OUT_crop_lora_moe.yaml | 1836 ++++++++ .../OUT_marine_lora_moe.yaml | 2399 ++++++++++ .../OUT_marine_moe.yaml | 2363 ++++++++++ .../configs/2025_09_03_marine_crop/base.yaml | 48 + .../2025_09_03_marine_crop/crop_lora.yaml | 67 + .../2025_09_03_marine_crop/crop_lora_moe.yaml | 84 + .../configs/2025_09_03_marine_crop/exp_id.txt | 1 + .../marine_lora_moe.yaml | 93 + .../2025_09_03_marine_crop/marine_moe.yaml | 67 + .../2025_09_03_scaling/OUT_crop_1.yaml | 587 +++ .../2025_09_03_scaling/OUT_crop_2.yaml | 1201 +++++ .../2025_09_03_scaling/OUT_marine_1.yaml | 459 ++ .../2025_09_03_scaling/OUT_marine_2.yaml | 1063 +++++ .../2025_09_03_scaling/OUT_marine_3.yaml | 1268 +++++ .../configs/2025_09_03_scaling/base.yaml | 48 + .../configs/2025_09_03_scaling/crop_1.yaml | 71 + .../configs/2025_09_03_scaling/crop_2.yaml | 73 + .../configs/2025_09_03_scaling/exp_id.txt | 1 + .../configs/2025_09_03_scaling/marine_1.yaml | 58 + .../configs/2025_09_03_scaling/marine_2.yaml | 60 + .../configs/2025_09_03_scaling/marine_3.yaml | 62 + .../OUT_no_landsat.yaml} | 262 +- .../configs/2025_09_04_loo/OUT_no_marine.yaml | 1304 ++++++ .../configs/2025_09_04_loo/OUT_no_s1.yaml | 1641 +++++++ .../configs/2025_09_04_loo/OUT_no_s2.yaml | 1611 +++++++ .../2025_09_04_loo/OUT_no_turbine.yaml | 1212 +++++ .../configs/2025_09_04_loo/base.yaml | 48 + .../configs/2025_09_04_loo/exp_id.txt | 1 + .../configs/2025_09_04_loo/no_landsat.yaml | 89 + .../configs/2025_09_04_loo/no_marine.yaml | 88 + .../configs/2025_09_04_loo/no_s1.yaml | 88 + .../configs/2025_09_04_loo/no_s2.yaml | 88 + .../configs/2025_09_04_loo/no_turbine.yaml | 88 + .../configs/2025_09_04_loo/template.yaml | 88 + .../basecfg_cosinelr.yaml | 2 +- .../configs/v3_singletask/freeze.yaml | 7 + .../scripts/do_eval_merged.py | 16 +- .../scripts/do_eval_sft.py | 41 +- .../scripts/do_eval_unmerged.py | 16 +- .../scripts/measure_throughput.py | 429 ++ .../scripts/multiple_eval_sft.py | 8 +- .../2025_07_joint_finetune/scripts/run.py | 15 + .../2025_07_joint_finetune/scripts/run_all.py | 9 +- .../scripts/submit_base_finetune.py | 11 +- .../scripts/submit_data_percent_finetune.py | 59 +- .../scripts/submit_isolate_finetune.py | 266 +- .../scripts/submit_joint_finetune.py | 75 +- .../scripts/unmerge_singletask_model.py | 13 +- rslp/helios/checkpoint.py | 2 +- rslp/helios/model.py | 2 +- 104 files changed, 49998 insertions(+), 2879 deletions(-) delete mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_28_regression_test/old.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_29_joint/OUT_all.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_29_joint/all.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_29_joint/base.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_29_joint/exp_id.txt create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_29_lora/OUT_all.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_29_lora/all.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_29_lora/base.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_29_lora/exp_id.txt create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_29_lora_moe/OUT_all.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_29_lora_moe/all.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_29_lora_moe/base.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_29_lora_moe/exp_id.txt create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_29_lora_moe_pcgrad/OUT_all.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_29_lora_moe_pcgrad/all.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_29_lora_moe_pcgrad/base.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_29_lora_moe_pcgrad/exp_id.txt create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_31_moe_decoder/OUT_all.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_31_moe_decoder/all.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_31_moe_decoder/base.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_08_31_moe_decoder/exp_id.txt create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/OUT_landsat_vessels_classifier.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/OUT_landsat_vessels_detector.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/OUT_nandi_crop_type.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/OUT_pastis.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/OUT_satlas_marine_infra.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/OUT_satlas_solar_farm.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/OUT_satlas_wind_turbine.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/OUT_sentinel1_vessels.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/OUT_sentinel2_vessels.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/OUT_worldcereal_cropland.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/base.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/exp_id.txt create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/landsat_vessels_classifier.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/landsat_vessels_detector.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/nandi_crop_type.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/pastis.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/satlas_marine_infra.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/satlas_solar_farm.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/satlas_wind_turbine.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/sentinel1_vessels.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/sentinel2_vessels.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/worldcereal_cropland.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_02_final/OUT_classify.yaml rename one_off_projects/2025_07_joint_finetune/configs/{2025_08_28_regression_test/main.yaml => 2025_09_02_final/OUT_detect.yaml} (97%) create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_02_final/OUT_segment.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_02_final/base.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_02_final/classify.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_02_final/detect.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_02_final/exp_id.txt create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_02_final/segment.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_02_scaling/base.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_03_marine_crop/OUT_crop_lora.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_03_marine_crop/OUT_crop_lora_moe.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_03_marine_crop/OUT_marine_lora_moe.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_03_marine_crop/OUT_marine_moe.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_03_marine_crop/base.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_03_marine_crop/crop_lora.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_03_marine_crop/crop_lora_moe.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_03_marine_crop/exp_id.txt create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_03_marine_crop/marine_lora_moe.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_03_marine_crop/marine_moe.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_03_scaling/OUT_crop_1.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_03_scaling/OUT_crop_2.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_03_scaling/OUT_marine_1.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_03_scaling/OUT_marine_2.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_03_scaling/OUT_marine_3.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_03_scaling/base.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_03_scaling/crop_1.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_03_scaling/crop_2.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_03_scaling/exp_id.txt create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_03_scaling/marine_1.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_03_scaling/marine_2.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_03_scaling/marine_3.yaml rename one_off_projects/2025_07_joint_finetune/configs/{2025_08_28_regression_test/new.yaml => 2025_09_04_loo/OUT_no_landsat.yaml} (87%) create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/OUT_no_marine.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/OUT_no_s1.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/OUT_no_s2.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/OUT_no_turbine.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/base.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/exp_id.txt create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/no_landsat.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/no_marine.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/no_s1.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/no_s2.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/no_turbine.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/template.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/configs/v3_singletask/freeze.yaml create mode 100644 one_off_projects/2025_07_joint_finetune/scripts/measure_throughput.py diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/all.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/all.yaml index 381ef05e..e6402fbe 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/all.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/all.yaml @@ -30,7 +30,7 @@ global_overrides: model: class_path: rslearn.train.lightning_module.RslearnLightningModule trainer: - accumulate_grad_batches: 9 + accumulate_grad_batches: 10 merge_options: merge_heads: true diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_28_regression_test/old.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_28_regression_test/old.yaml deleted file mode 100644 index 2ce386ac..00000000 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_08_28_regression_test/old.yaml +++ /dev/null @@ -1,2520 +0,0 @@ -data: - class_path: rslearn.train.data_module.MultiDatasetDataModule - init_args: - batch_sizes: - detect_satlas_marine_infra: 8 - detect_satlas_wind_turbine: 8 - detect_sentinel1_vessels: 8 - detect_sentinel2_vessels: 8 - vessel_detection: 8 - data_modules: - detect_satlas_marine_infra: - class_path: rslearn.train.data_module.RslearnDataModule - init_args: - batch_size: 8 - default_config: - class_path: rslearn.train.dataset.SplitConfig - init_args: - groups: null - load_all_patches: null - names: null - num_patches: null - num_samples: null - overlap_ratio: null - patch_size: null - sampler: null - skip_targets: null - tags: null - transforms: - - class_path: rslearn.train.transforms.concatenate.Concatenate - init_args: - output_selector: sentinel2_l2a - selections: - s21: [] - s22: [] - s23: [] - s24: [] - - class_path: rslearn.train.transforms.concatenate.Concatenate - init_args: - output_selector: landsat - selections: - landsat1: [] - landsat2: [] - landsat3: [] - landsat4: [] - - class_path: rslearn.train.transforms.concatenate.Concatenate - init_args: - output_selector: sentinel1 - selections: - s1a1: [] - s1a2: [] - s1a3: [] - s1a4: [] - - class_path: rslp.helios.norm.HeliosNormalize - init_args: - band_names: - landsat: - - B8 - - B1 - - B2 - - B3 - - B4 - - B5 - - B6 - - B7 - - B9 - - B10 - - B11 - sentinel1: - - vv - - vh - sentinel2_l2a: - - B02 - - B03 - - B04 - - B08 - - B05 - - B06 - - B07 - - B8A - - B11 - - B12 - - B01 - - B09 - config_fname: /opt/helios/data/norm_configs/computed.json - std_multiplier: 2.0 - - class_path: rslp.transforms.mask.Mask - init_args: - mask_selector: mask - selectors: - - sentinel2_l2a - - landsat - - sentinel1 - - class_path: rslearn.train.transforms.concatenate.Concatenate - init_args: - output_selector: image - selections: - sentinel2_l2a: [] - inputs: - landsat1: - class_path: rslearn.train.dataset.DataInput - init_args: - bands: - - B8 - - B1 - - B2 - - B3 - - B4 - - B5 - - B6 - - B7 - - B9 - - B10 - - B11 - data_type: raster - dtype: FLOAT32 - is_target: false - layers: - - landsat - passthrough: true - required: true - landsat2: - class_path: rslearn.train.dataset.DataInput - init_args: - bands: - - B8 - - B1 - - B2 - - B3 - - B4 - - B5 - - B6 - - B7 - - B9 - - B10 - - B11 - data_type: raster - dtype: FLOAT32 - is_target: false - layers: - - landsat.1 - passthrough: true - required: true - landsat3: - class_path: rslearn.train.dataset.DataInput - init_args: - bands: - - B8 - - B1 - - B2 - - B3 - - B4 - - B5 - - B6 - - B7 - - B9 - - B10 - - B11 - data_type: raster - dtype: FLOAT32 - is_target: false - layers: - - landsat.2 - passthrough: true - required: true - landsat4: - class_path: rslearn.train.dataset.DataInput - init_args: - bands: - - B8 - - B1 - - B2 - - B3 - - B4 - - B5 - - B6 - - B7 - - B9 - - B10 - - B11 - data_type: raster - dtype: FLOAT32 - is_target: false - layers: - - landsat.3 - passthrough: true - required: true - mask: - class_path: rslearn.train.dataset.DataInput - init_args: - bands: - - mask - data_type: raster - dtype: FLOAT32 - is_target: true - layers: - - mask - passthrough: true - required: true - s1a1: - class_path: rslearn.train.dataset.DataInput - init_args: - bands: - - vv - - vh - data_type: raster - dtype: FLOAT32 - is_target: false - layers: - - sentinel1_ascending - passthrough: true - required: true - s1a2: - class_path: rslearn.train.dataset.DataInput - init_args: - bands: - - vv - - vh - data_type: raster - dtype: FLOAT32 - is_target: false - layers: - - sentinel1_ascending.1 - passthrough: true - required: true - s1a3: - class_path: rslearn.train.dataset.DataInput - init_args: - bands: - - vv - - vh - data_type: raster - dtype: FLOAT32 - is_target: false - layers: - - sentinel1_ascending.2 - passthrough: true - required: true - s1a4: - class_path: rslearn.train.dataset.DataInput - init_args: - bands: - - vv - - vh - data_type: raster - dtype: FLOAT32 - is_target: false - layers: - - sentinel1_ascending.3 - passthrough: true - required: true - s1d1: - class_path: rslearn.train.dataset.DataInput - init_args: - bands: - - vv - - vh - data_type: raster - dtype: FLOAT32 - is_target: false - layers: - - sentinel1_descending - passthrough: true - required: true - s1d2: - class_path: rslearn.train.dataset.DataInput - init_args: - bands: - - vv - - vh - data_type: raster - dtype: FLOAT32 - is_target: false - layers: - - sentinel1_descending.1 - passthrough: true - required: true - s1d3: - class_path: rslearn.train.dataset.DataInput - init_args: - bands: - - vv - - vh - data_type: raster - dtype: FLOAT32 - is_target: false - layers: - - sentinel1_descending.2 - passthrough: true - required: true - s1d4: - class_path: rslearn.train.dataset.DataInput - init_args: - bands: - - vv - - vh - data_type: raster - dtype: FLOAT32 - is_target: false - layers: - - sentinel1_descending.3 - passthrough: true - required: true - s21: - class_path: rslearn.train.dataset.DataInput - init_args: - bands: - - B02 - - B03 - - B04 - - B08 - - B05 - - B06 - - B07 - - B8A - - B11 - - B12 - - B01 - - B09 - data_type: raster - dtype: FLOAT32 - is_target: false - layers: - - sentinel2 - passthrough: true - required: true - s22: - class_path: rslearn.train.dataset.DataInput - init_args: - bands: - - B02 - - B03 - - B04 - - B08 - - B05 - - B06 - - B07 - - B8A - - B11 - - B12 - - B01 - - B09 - data_type: raster - dtype: FLOAT32 - is_target: false - layers: - - sentinel2.1 - passthrough: true - required: true - s23: - class_path: rslearn.train.dataset.DataInput - init_args: - bands: - - B02 - - B03 - - B04 - - B08 - - B05 - - B06 - - B07 - - B8A - - B11 - - B12 - - B01 - - B09 - data_type: raster - dtype: FLOAT32 - is_target: false - layers: - - sentinel2.2 - passthrough: true - required: true - s24: - class_path: rslearn.train.dataset.DataInput - init_args: - bands: - - B02 - - B03 - - B04 - - B08 - - B05 - - B06 - - B07 - - B8A - - B11 - - B12 - - B01 - - B09 - data_type: raster - dtype: FLOAT32 - is_target: false - layers: - - sentinel2.3 - passthrough: true - required: true - targets: - class_path: rslearn.train.dataset.DataInput - init_args: - bands: null - data_type: vector - dtype: FLOAT32 - is_target: true - layers: - - label - passthrough: false - required: true - name: null - num_workers: 16 - path: /weka/dfive-default/rslearn-eai/datasets/marine_infra/dataset_v1/20250605/ - path_options: {} - predict_config: - class_path: rslearn.train.dataset.SplitConfig - init_args: - groups: null - load_all_patches: null - names: null - num_patches: null - num_samples: null - overlap_ratio: null - patch_size: null - sampler: null - skip_targets: null - tags: null - transforms: null - task: - class_path: rslearn.train.tasks.multi_task.MultiTask - init_args: - input_mapping: - detect_satlas_marine_infra: - targets: targets - task_label_offsets: - detect_satlas_marine_infra: - num_outputs: 3 - offset: 2 - outputs_key: labels - detect_satlas_wind_turbine: - num_outputs: 3 - offset: 5 - outputs_key: labels - detect_sentinel1_vessels: - num_outputs: 2 - offset: 0 - outputs_key: labels - detect_sentinel2_vessels: - num_outputs: 2 - offset: 0 - outputs_key: labels - vessel_detection: - num_outputs: 2 - offset: 0 - outputs_key: labels - tasks: - detect_satlas_marine_infra: - class_path: rslp.satlas.train.MarineInfraTask - init_args: - box_size: 15 - classes: - - unknown - - platform - - turbine - clip_boxes: true - colors: - - - 255 - - 0 - - 0 - - - 0 - - 255 - - 0 - - - 0 - - 0 - - 255 - - - 255 - - 255 - - 0 - - - 0 - - 255 - - 255 - - - 255 - - 0 - - 255 - - - 0 - - 128 - - 0 - - - 255 - - 160 - - 122 - - - 139 - - 69 - - 19 - - - 128 - - 128 - - 128 - - - 255 - - 255 - - 255 - - - 143 - - 188 - - 143 - - - 95 - - 158 - - 160 - - - 255 - - 200 - - 0 - - - 128 - - 0 - - 0 - enable_f1_metric: true - enable_map_metric: true - enable_precision_recall: false - exclude_by_center: true - f1_metric_kwargs: - cmp_mode: distance - cmp_threshold: 15 - flatten_classes: true - f1_metric_thresholds: - - - 0.05 - - 0.1 - - 0.2 - - 0.3 - - 0.4 - - 0.5 - - 0.6 - - 0.7 - - 0.8 - - 0.9 - - 0.95 - - - 0.1 - - - 0.2 - - - 0.3 - - - 0.4 - - - 0.5 - - - 0.6 - - - 0.7 - - - 0.8 - - - 0.9 - filters: null - image_bands: - - 2 - - 1 - - 0 - property_name: category - read_class_id: false - remap_values: - - - 0.0 - - 0.25 - - - 0 - - 255 - score_threshold: 0.5 - skip_empty_examples: false - skip_unknown_categories: true - test_config: - class_path: rslearn.train.dataset.SplitConfig - init_args: - groups: null - load_all_patches: true - names: null - num_patches: null - num_samples: null - overlap_ratio: null - patch_size: 128 - sampler: null - skip_targets: null - tags: - split: val - transforms: null - train_config: - class_path: rslearn.train.dataset.SplitConfig - init_args: - groups: null - load_all_patches: null - names: null - num_patches: null - num_samples: null - overlap_ratio: null - patch_size: 128 - sampler: - class_path: rslearn.train.dataset.RandomSamplerFactory - init_args: - num_samples: 65536 - replacement: true - skip_targets: null - tags: - split: train - transforms: - - class_path: rslearn.train.transforms.concatenate.Concatenate - init_args: - output_selector: sentinel2_l2a - selections: - s21: [] - s22: [] - s23: [] - s24: [] - - class_path: rslearn.train.transforms.concatenate.Concatenate - init_args: - output_selector: landsat - selections: - landsat1: [] - landsat2: [] - landsat3: [] - landsat4: [] - - class_path: rslearn.train.transforms.concatenate.Concatenate - init_args: - output_selector: sentinel1 - selections: - s1a1: [] - s1a2: [] - s1a3: [] - s1a4: [] - - class_path: rslp.helios.norm.HeliosNormalize - init_args: - band_names: - landsat: - - B8 - - B1 - - B2 - - B3 - - B4 - - B5 - - B6 - - B7 - - B9 - - B10 - - B11 - sentinel1: - - vv - - vh - sentinel2_l2a: - - B02 - - B03 - - B04 - - B08 - - B05 - - B06 - - B07 - - B8A - - B11 - - B12 - - B01 - - B09 - config_fname: /opt/helios/data/norm_configs/computed.json - std_multiplier: 2.0 - - class_path: rslp.transforms.mask.Mask - init_args: - mask_selector: mask - selectors: - - sentinel2_l2a - - landsat - - sentinel1 - - class_path: rslearn.train.transforms.flip.Flip - init_args: - box_selectors: - - target/detect_satlas_marine_infra - horizontal: true - image_selectors: - - sentinel2_l2a - - landsat - - sentinel1 - vertical: true - - class_path: rslearn.train.transforms.concatenate.Concatenate - init_args: - output_selector: image - selections: - sentinel2_l2a: [] - val_config: - class_path: rslearn.train.dataset.SplitConfig - init_args: - groups: null - load_all_patches: true - names: null - num_patches: null - num_samples: null - overlap_ratio: null - patch_size: 128 - sampler: null - skip_targets: null - tags: - split: val - transforms: null - detect_satlas_wind_turbine: - class_path: rslearn.train.data_module.RslearnDataModule - init_args: - batch_size: 8 - default_config: - class_path: rslearn.train.dataset.SplitConfig - init_args: - groups: null - load_all_patches: null - names: null - num_patches: null - num_samples: null - overlap_ratio: null - patch_size: null - sampler: null - skip_targets: null - tags: null - transforms: - - class_path: rslearn.train.transforms.concatenate.Concatenate - init_args: - output_selector: sentinel2_l2a - selections: - s21: [] - s22: [] - s23: [] - s24: [] - s25: [] - s26: [] - - class_path: rslearn.train.transforms.concatenate.Concatenate - init_args: - output_selector: landsat - selections: - landsat1: [] - landsat2: [] - landsat3: [] - landsat4: [] - landsat5: [] - landsat6: [] - - class_path: rslearn.train.transforms.concatenate.Concatenate - init_args: - output_selector: sentinel1 - selections: - s1a1: [] - s1a2: [] - s1a3: [] - s1a4: [] - s1a5: [] - s1a6: [] - - class_path: rslp.helios.norm.HeliosNormalize - init_args: - band_names: - landsat: - - B8 - - B1 - - B2 - - B3 - - B4 - - B5 - - B6 - - B7 - - B9 - - B10 - - B11 - sentinel1: - - vv - - vh - sentinel2_l2a: - - B02 - - B03 - - B04 - - B08 - - B05 - - B06 - - B07 - - B8A - - B11 - - B12 - - B01 - - B09 - config_fname: /opt/helios/data/norm_configs/computed.json - std_multiplier: 2.0 - - class_path: rslp.transforms.mask.Mask - init_args: - mask_selector: mask - selectors: - - sentinel2_l2a - - landsat - - sentinel1 - - class_path: rslearn.train.transforms.concatenate.Concatenate - init_args: - output_selector: image - selections: - sentinel2_l2a: [] - inputs: - landsat1: - class_path: rslearn.train.dataset.DataInput - init_args: - bands: - - B8 - - B1 - - B2 - - B3 - - B4 - - B5 - - B6 - - B7 - - B9 - - B10 - - B11 - data_type: raster - dtype: FLOAT32 - is_target: false - layers: - - landsat - passthrough: true - required: true - landsat2: - class_path: rslearn.train.dataset.DataInput - init_args: - bands: - - B8 - - B1 - - B2 - - B3 - - B4 - - B5 - - B6 - - B7 - - B9 - - B10 - - B11 - data_type: raster - dtype: FLOAT32 - is_target: false - layers: - - landsat.1 - passthrough: true - required: true - landsat3: - class_path: rslearn.train.dataset.DataInput - init_args: - bands: - - B8 - - B1 - - B2 - - B3 - - B4 - - B5 - - B6 - - B7 - - B9 - - B10 - - B11 - data_type: raster - dtype: FLOAT32 - is_target: false - layers: - - landsat.2 - passthrough: true - required: true - landsat4: - class_path: rslearn.train.dataset.DataInput - init_args: - bands: - - B8 - - B1 - - B2 - - B3 - - B4 - - B5 - - B6 - - B7 - - B9 - - B10 - - B11 - data_type: raster - dtype: FLOAT32 - is_target: false - layers: - - landsat.3 - passthrough: true - required: true - landsat5: - class_path: rslearn.train.dataset.DataInput - init_args: - bands: - - B8 - - B1 - - B2 - - B3 - - B4 - - B5 - - B6 - - B7 - - B9 - - B10 - - B11 - data_type: raster - dtype: FLOAT32 - is_target: false - layers: - - landsat.4 - passthrough: true - required: true - landsat6: - class_path: rslearn.train.dataset.DataInput - init_args: - bands: - - B8 - - B1 - - B2 - - B3 - - B4 - - B5 - - B6 - - B7 - - B9 - - B10 - - B11 - data_type: raster - dtype: FLOAT32 - is_target: false - layers: - - landsat.5 - passthrough: true - required: true - mask: - class_path: rslearn.train.dataset.DataInput - init_args: - bands: - - mask - data_type: raster - dtype: FLOAT32 - is_target: true - layers: - - mask - passthrough: true - required: true - s1a1: - class_path: rslearn.train.dataset.DataInput - init_args: - bands: - - vv - - vh - data_type: raster - dtype: FLOAT32 - is_target: false - layers: - - sentinel1_ascending - passthrough: true - required: true - s1a2: - class_path: rslearn.train.dataset.DataInput - init_args: - bands: - - vv - - vh - data_type: raster - dtype: FLOAT32 - is_target: false - layers: - - sentinel1_ascending.1 - passthrough: true - required: true - s1a3: - class_path: rslearn.train.dataset.DataInput - init_args: - bands: - - vv - - vh - data_type: raster - dtype: FLOAT32 - is_target: false - layers: - - sentinel1_ascending.2 - passthrough: true - required: true - s1a4: - class_path: rslearn.train.dataset.DataInput - init_args: - bands: - - vv - - vh - data_type: raster - dtype: FLOAT32 - is_target: false - layers: - - sentinel1_ascending.3 - passthrough: true - required: true - s1a5: - class_path: rslearn.train.dataset.DataInput - init_args: - bands: - - vv - - vh - data_type: raster - dtype: FLOAT32 - is_target: false - layers: - - sentinel1_ascending.4 - passthrough: true - required: true - s1a6: - class_path: rslearn.train.dataset.DataInput - init_args: - bands: - - vv - - vh - data_type: raster - dtype: FLOAT32 - is_target: false - layers: - - sentinel1_ascending.5 - passthrough: true - required: true - s1d1: - class_path: rslearn.train.dataset.DataInput - init_args: - bands: - - vv - - vh - data_type: raster - dtype: FLOAT32 - is_target: false - layers: - - sentinel1_descending - passthrough: true - required: true - s1d2: - class_path: rslearn.train.dataset.DataInput - init_args: - bands: - - vv - - vh - data_type: raster - dtype: FLOAT32 - is_target: false - layers: - - sentinel1_descending.1 - passthrough: true - required: true - s1d3: - class_path: rslearn.train.dataset.DataInput - init_args: - bands: - - vv - - vh - data_type: raster - dtype: FLOAT32 - is_target: false - layers: - - sentinel1_descending.2 - passthrough: true - required: true - s1d4: - class_path: rslearn.train.dataset.DataInput - init_args: - bands: - - vv - - vh - data_type: raster - dtype: FLOAT32 - is_target: false - layers: - - sentinel1_descending.3 - passthrough: true - required: true - s1d5: - class_path: rslearn.train.dataset.DataInput - init_args: - bands: - - vv - - vh - data_type: raster - dtype: FLOAT32 - is_target: false - layers: - - sentinel1_descending.4 - passthrough: true - required: true - s1d6: - class_path: rslearn.train.dataset.DataInput - init_args: - bands: - - vv - - vh - data_type: raster - dtype: FLOAT32 - is_target: false - layers: - - sentinel1_descending.5 - passthrough: true - required: true - s21: - class_path: rslearn.train.dataset.DataInput - init_args: - bands: - - B02 - - B03 - - B04 - - B08 - - B05 - - B06 - - B07 - - B8A - - B11 - - B12 - - B01 - - B09 - data_type: raster - dtype: FLOAT32 - is_target: false - layers: - - sentinel2 - passthrough: true - required: true - s22: - class_path: rslearn.train.dataset.DataInput - init_args: - bands: - - B02 - - B03 - - B04 - - B08 - - B05 - - B06 - - B07 - - B8A - - B11 - - B12 - - B01 - - B09 - data_type: raster - dtype: FLOAT32 - is_target: false - layers: - - sentinel2.1 - passthrough: true - required: true - s23: - class_path: rslearn.train.dataset.DataInput - init_args: - bands: - - B02 - - B03 - - B04 - - B08 - - B05 - - B06 - - B07 - - B8A - - B11 - - B12 - - B01 - - B09 - data_type: raster - dtype: FLOAT32 - is_target: false - layers: - - sentinel2.2 - passthrough: true - required: true - s24: - class_path: rslearn.train.dataset.DataInput - init_args: - bands: - - B02 - - B03 - - B04 - - B08 - - B05 - - B06 - - B07 - - B8A - - B11 - - B12 - - B01 - - B09 - data_type: raster - dtype: FLOAT32 - is_target: false - layers: - - sentinel2.3 - passthrough: true - required: true - s25: - class_path: rslearn.train.dataset.DataInput - init_args: - bands: - - B02 - - B03 - - B04 - - B08 - - B05 - - B06 - - B07 - - B8A - - B11 - - B12 - - B01 - - B09 - data_type: raster - dtype: FLOAT32 - is_target: false - layers: - - sentinel2.4 - passthrough: true - required: true - s26: - class_path: rslearn.train.dataset.DataInput - init_args: - bands: - - B02 - - B03 - - B04 - - B08 - - B05 - - B06 - - B07 - - B8A - - B11 - - B12 - - B01 - - B09 - data_type: raster - dtype: FLOAT32 - is_target: false - layers: - - sentinel2.5 - passthrough: true - required: true - targets: - class_path: rslearn.train.dataset.DataInput - init_args: - bands: null - data_type: vector - dtype: FLOAT32 - is_target: true - layers: - - label - passthrough: false - required: true - name: null - num_workers: 16 - path: /weka/dfive-default/rslearn-eai/datasets/wind_turbine/dataset_v1/20250605/ - path_options: {} - predict_config: - class_path: rslearn.train.dataset.SplitConfig - init_args: - groups: null - load_all_patches: null - names: null - num_patches: null - num_samples: null - overlap_ratio: null - patch_size: null - sampler: null - skip_targets: null - tags: null - transforms: null - task: - class_path: rslearn.train.tasks.multi_task.MultiTask - init_args: - input_mapping: - detect_satlas_wind_turbine: - targets: targets - task_label_offsets: - detect_satlas_marine_infra: - num_outputs: 3 - offset: 2 - outputs_key: labels - detect_satlas_wind_turbine: - num_outputs: 3 - offset: 5 - outputs_key: labels - detect_sentinel1_vessels: - num_outputs: 2 - offset: 0 - outputs_key: labels - detect_sentinel2_vessels: - num_outputs: 2 - offset: 0 - outputs_key: labels - vessel_detection: - num_outputs: 2 - offset: 0 - outputs_key: labels - tasks: - detect_satlas_wind_turbine: - class_path: rslearn.train.tasks.detection.DetectionTask - init_args: - box_size: 15 - classes: - - unknown - - turbine - clip_boxes: true - colors: - - - 255 - - 0 - - 0 - - - 0 - - 255 - - 0 - - - 0 - - 0 - - 255 - - - 255 - - 255 - - 0 - - - 0 - - 255 - - 255 - - - 255 - - 0 - - 255 - - - 0 - - 128 - - 0 - - - 255 - - 160 - - 122 - - - 139 - - 69 - - 19 - - - 128 - - 128 - - 128 - - - 255 - - 255 - - 255 - - - 143 - - 188 - - 143 - - - 95 - - 158 - - 160 - - - 255 - - 200 - - 0 - - - 128 - - 0 - - 0 - enable_f1_metric: true - enable_map_metric: true - enable_precision_recall: false - exclude_by_center: true - f1_metric_kwargs: - cmp_mode: distance - cmp_threshold: 15 - flatten_classes: true - f1_metric_thresholds: - - - 0.05 - - 0.1 - - 0.2 - - 0.3 - - 0.4 - - 0.5 - - 0.6 - - 0.7 - - 0.8 - - 0.9 - - 0.95 - filters: null - image_bands: - - 0 - - 1 - - 2 - property_name: category - read_class_id: false - remap_values: - - - 0.0 - - 1.0 - - - 0 - - 255 - score_threshold: 0.5 - skip_empty_examples: false - skip_unknown_categories: false - test_config: - class_path: rslearn.train.dataset.SplitConfig - init_args: - groups: null - load_all_patches: true - names: null - num_patches: null - num_samples: null - overlap_ratio: null - patch_size: 128 - sampler: null - skip_targets: null - tags: - split: val - transforms: null - train_config: - class_path: rslearn.train.dataset.SplitConfig - init_args: - groups: null - load_all_patches: null - names: null - num_patches: null - num_samples: null - overlap_ratio: null - patch_size: 128 - sampler: - class_path: rslearn.train.dataset.RandomSamplerFactory - init_args: - num_samples: 65536 - replacement: true - skip_targets: null - tags: - split: train - transforms: - - class_path: rslearn.train.transforms.concatenate.Concatenate - init_args: - output_selector: sentinel2_l2a - selections: - s21: [] - s22: [] - s23: [] - s24: [] - s25: [] - s26: [] - - class_path: rslearn.train.transforms.concatenate.Concatenate - init_args: - output_selector: landsat - selections: - landsat1: [] - landsat2: [] - landsat3: [] - landsat4: [] - landsat5: [] - landsat6: [] - - class_path: rslearn.train.transforms.concatenate.Concatenate - init_args: - output_selector: sentinel1 - selections: - s1a1: [] - s1a2: [] - s1a3: [] - s1a4: [] - s1a5: [] - s1a6: [] - - class_path: rslp.helios.norm.HeliosNormalize - init_args: - band_names: - landsat: - - B8 - - B1 - - B2 - - B3 - - B4 - - B5 - - B6 - - B7 - - B9 - - B10 - - B11 - sentinel1: - - vv - - vh - sentinel2_l2a: - - B02 - - B03 - - B04 - - B08 - - B05 - - B06 - - B07 - - B8A - - B11 - - B12 - - B01 - - B09 - config_fname: /opt/helios/data/norm_configs/computed.json - std_multiplier: 2.0 - - class_path: rslp.transforms.mask.Mask - init_args: - mask_selector: mask - selectors: - - sentinel2_l2a - - landsat - - sentinel1 - - class_path: rslearn.train.transforms.flip.Flip - init_args: - box_selectors: - - target/detect_satlas_wind_turbine - horizontal: true - image_selectors: - - sentinel2_l2a - - landsat - - sentinel1 - vertical: true - - class_path: rslearn.train.transforms.concatenate.Concatenate - init_args: - output_selector: image - selections: - sentinel2_l2a: [] - val_config: - class_path: rslearn.train.dataset.SplitConfig - init_args: - groups: null - load_all_patches: true - names: null - num_patches: null - num_samples: null - overlap_ratio: null - patch_size: 128 - sampler: null - skip_targets: null - tags: - split: val - transforms: null - detect_sentinel1_vessels: - class_path: rslearn.train.data_module.RslearnDataModule - init_args: - batch_size: 8 - default_config: - class_path: rslearn.train.dataset.SplitConfig - init_args: - groups: null - load_all_patches: null - names: null - num_patches: null - num_samples: null - overlap_ratio: null - patch_size: null - sampler: null - skip_targets: null - tags: null - transforms: - - class_path: rslp.transforms.mask.Mask - init_args: - mask_selector: mask - selectors: - - image - - class_path: rslearn.train.transforms.concatenate.Concatenate - init_args: - output_selector: sentinel1 - selections: - image: [] - - class_path: rslp.helios.norm.HeliosNormalize - init_args: - band_names: - sentinel1: - - vv - - vh - config_fname: /opt/helios/data/norm_configs/computed.json - std_multiplier: 2.0 - inputs: - image: - class_path: rslearn.train.dataset.DataInput - init_args: - bands: - - vv - - vh - data_type: raster - dtype: FLOAT32 - is_target: false - layers: - - sentinel1 - passthrough: true - required: true - mask: - class_path: rslearn.train.dataset.DataInput - init_args: - bands: - - mask - data_type: raster - dtype: INT32 - is_target: true - layers: - - mask - passthrough: true - required: true - targets: - class_path: rslearn.train.dataset.DataInput - init_args: - bands: null - data_type: vector - dtype: FLOAT32 - is_target: true - layers: - - label - passthrough: false - required: true - name: null - num_workers: 16 - path: /weka/dfive-default/rslearn-eai/datasets/sentinel1_vessels/dataset_v1/20250602/ - path_options: {} - predict_config: - class_path: rslearn.train.dataset.SplitConfig - init_args: - groups: null - load_all_patches: null - names: null - num_patches: null - num_samples: null - overlap_ratio: null - patch_size: null - sampler: null - skip_targets: null - tags: null - transforms: null - task: - class_path: rslearn.train.tasks.multi_task.MultiTask - init_args: - input_mapping: - detect_sentinel1_vessels: - targets: targets - task_label_offsets: - detect_satlas_marine_infra: - num_outputs: 3 - offset: 2 - outputs_key: labels - detect_satlas_wind_turbine: - num_outputs: 3 - offset: 5 - outputs_key: labels - detect_sentinel1_vessels: - num_outputs: 2 - offset: 0 - outputs_key: labels - detect_sentinel2_vessels: - num_outputs: 2 - offset: 0 - outputs_key: labels - vessel_detection: - num_outputs: 2 - offset: 0 - outputs_key: labels - tasks: - detect_sentinel1_vessels: - class_path: rslearn.train.tasks.detection.DetectionTask - init_args: - box_size: 15 - classes: - - unknown - - vessel - clip_boxes: true - colors: - - - 255 - - 0 - - 0 - - - 0 - - 255 - - 0 - - - 0 - - 0 - - 255 - - - 255 - - 255 - - 0 - - - 0 - - 255 - - 255 - - - 255 - - 0 - - 255 - - - 0 - - 128 - - 0 - - - 255 - - 160 - - 122 - - - 139 - - 69 - - 19 - - - 128 - - 128 - - 128 - - - 255 - - 255 - - 255 - - - 143 - - 188 - - 143 - - - 95 - - 158 - - 160 - - - 255 - - 200 - - 0 - - - 128 - - 0 - - 0 - enable_f1_metric: true - enable_map_metric: true - enable_precision_recall: false - exclude_by_center: true - f1_metric_kwargs: - cmp_mode: distance - cmp_threshold: 15 - flatten_classes: true - f1_metric_thresholds: - - - 0.05 - - 0.1 - - 0.2 - - 0.3 - - 0.4 - - 0.5 - - 0.6 - - 0.7 - - 0.8 - - 0.9 - - 0.95 - filters: null - image_bands: - - 1 - - 1 - - 1 - property_name: category - read_class_id: false - remap_values: - - - 0.0 - - 1.0 - - - 0 - - 255 - score_threshold: 0.5 - skip_empty_examples: false - skip_unknown_categories: false - test_config: - class_path: rslearn.train.dataset.SplitConfig - init_args: - groups: - - val_ascending - - val_descending - load_all_patches: true - names: null - num_patches: null - num_samples: null - overlap_ratio: null - patch_size: 128 - sampler: null - skip_targets: null - tags: null - transforms: null - train_config: - class_path: rslearn.train.dataset.SplitConfig - init_args: - groups: - - train_ascending - - train_descending - load_all_patches: null - names: null - num_patches: null - num_samples: null - overlap_ratio: null - patch_size: 128 - sampler: - class_path: rslearn.train.dataset.RandomSamplerFactory - init_args: - num_samples: 32768 - replacement: true - skip_targets: null - tags: null - transforms: - - class_path: rslp.transforms.mask.Mask - init_args: - mask_selector: mask - selectors: - - image - - class_path: rslearn.train.transforms.concatenate.Concatenate - init_args: - output_selector: sentinel1 - selections: - image: [] - - class_path: rslp.helios.norm.HeliosNormalize - init_args: - band_names: - sentinel1: - - vv - - vh - config_fname: /opt/helios/data/norm_configs/computed.json - std_multiplier: 2.0 - - class_path: rslearn.train.transforms.flip.Flip - init_args: - box_selectors: - - target/detect_sentinel1_vessels - horizontal: true - image_selectors: - - image - - sentinel1 - vertical: true - val_config: - class_path: rslearn.train.dataset.SplitConfig - init_args: - groups: - - val_ascending - - val_descending - load_all_patches: true - names: null - num_patches: null - num_samples: null - overlap_ratio: null - patch_size: 128 - sampler: null - skip_targets: null - tags: null - transforms: null - detect_sentinel2_vessels: - class_path: rslearn.train.data_module.RslearnDataModule - init_args: - batch_size: 8 - default_config: - class_path: rslearn.train.dataset.SplitConfig - init_args: - groups: null - load_all_patches: null - names: null - num_patches: null - num_samples: null - overlap_ratio: null - patch_size: null - sampler: null - skip_targets: null - tags: null - transforms: - - class_path: rslp.transforms.mask.Mask - init_args: - mask_selector: mask - selectors: - - image - - class_path: rslearn.train.transforms.concatenate.Concatenate - init_args: - output_selector: sentinel2_l2a - selections: - image: [] - - class_path: rslp.helios.norm.HeliosNormalize - init_args: - band_names: - sentinel2_l2a: - - B02 - - B03 - - B04 - - B08 - - B05 - - B06 - - B07 - - B8A - - B11 - - B12 - - B01 - - B09 - config_fname: /opt/helios/data/norm_configs/computed.json - std_multiplier: 2.0 - inputs: - image: - class_path: rslearn.train.dataset.DataInput - init_args: - bands: - - B02 - - B03 - - B04 - - B08 - - B05 - - B06 - - B07 - - B8A - - B11 - - B12 - - B01 - - B09 - data_type: raster - dtype: FLOAT32 - is_target: false - layers: - - sentinel2 - passthrough: true - required: true - mask: - class_path: rslearn.train.dataset.DataInput - init_args: - bands: - - mask - data_type: raster - dtype: INT32 - is_target: true - layers: - - mask - passthrough: true - required: true - targets: - class_path: rslearn.train.dataset.DataInput - init_args: - bands: null - data_type: vector - dtype: FLOAT32 - is_target: true - layers: - - label - passthrough: false - required: true - name: null - num_workers: 16 - path: /weka/dfive-default/rslearn-eai/datasets/sentinel2_vessels/dataset_v1/20250213/ - path_options: {} - predict_config: - class_path: rslearn.train.dataset.SplitConfig - init_args: - groups: null - load_all_patches: null - names: null - num_patches: null - num_samples: null - overlap_ratio: null - patch_size: null - sampler: null - skip_targets: null - tags: null - transforms: null - task: - class_path: rslearn.train.tasks.multi_task.MultiTask - init_args: - input_mapping: - detect_sentinel2_vessels: - targets: targets - task_label_offsets: - detect_satlas_marine_infra: - num_outputs: 3 - offset: 2 - outputs_key: labels - detect_satlas_wind_turbine: - num_outputs: 3 - offset: 5 - outputs_key: labels - detect_sentinel1_vessels: - num_outputs: 2 - offset: 0 - outputs_key: labels - detect_sentinel2_vessels: - num_outputs: 2 - offset: 0 - outputs_key: labels - vessel_detection: - num_outputs: 2 - offset: 0 - outputs_key: labels - tasks: - detect_sentinel2_vessels: - class_path: rslearn.train.tasks.detection.DetectionTask - init_args: - box_size: 15 - classes: - - unknown - - vessel - clip_boxes: true - colors: - - - 255 - - 0 - - 0 - - - 0 - - 255 - - 0 - - - 0 - - 0 - - 255 - - - 255 - - 255 - - 0 - - - 0 - - 255 - - 255 - - - 255 - - 0 - - 255 - - - 0 - - 128 - - 0 - - - 255 - - 160 - - 122 - - - 139 - - 69 - - 19 - - - 128 - - 128 - - 128 - - - 255 - - 255 - - 255 - - - 143 - - 188 - - 143 - - - 95 - - 158 - - 160 - - - 255 - - 200 - - 0 - - - 128 - - 0 - - 0 - enable_f1_metric: true - enable_map_metric: true - enable_precision_recall: false - exclude_by_center: true - f1_metric_kwargs: - cmp_mode: distance - cmp_threshold: 15 - flatten_classes: true - f1_metric_thresholds: - - - 0.05 - - 0.1 - - 0.2 - - 0.3 - - 0.4 - - 0.5 - - 0.6 - - 0.7 - - 0.8 - - 0.9 - - 0.95 - filters: null - image_bands: - - 0 - - 1 - - 2 - property_name: category - read_class_id: false - remap_values: - - - 0.0 - - 1.0 - - - 0 - - 255 - score_threshold: 0.5 - skip_empty_examples: false - skip_unknown_categories: false - test_config: - class_path: rslearn.train.dataset.SplitConfig - init_args: - groups: - - sargassum_val - - split1 - - split7 - load_all_patches: true - names: null - num_patches: null - num_samples: null - overlap_ratio: null - patch_size: 128 - sampler: null - skip_targets: null - tags: null - transforms: null - train_config: - class_path: rslearn.train.dataset.SplitConfig - init_args: - groups: - - sargassum_train - - split2 - - split3 - - split4 - - split5 - - split6 - - train - - train-bg - - train2 - - train3 - load_all_patches: null - names: null - num_patches: null - num_samples: null - overlap_ratio: null - patch_size: 128 - sampler: - class_path: rslearn.train.dataset.RandomSamplerFactory - init_args: - num_samples: 131072 - replacement: true - skip_targets: null - tags: null - transforms: - - class_path: rslp.transforms.mask.Mask - init_args: - mask_selector: mask - selectors: - - image - - class_path: rslearn.train.transforms.concatenate.Concatenate - init_args: - output_selector: sentinel2_l2a - selections: - image: [] - - class_path: rslp.helios.norm.HeliosNormalize - init_args: - band_names: - sentinel2_l2a: - - B02 - - B03 - - B04 - - B08 - - B05 - - B06 - - B07 - - B8A - - B11 - - B12 - - B01 - - B09 - config_fname: /opt/helios/data/norm_configs/computed.json - std_multiplier: 2.0 - - class_path: rslearn.train.transforms.flip.Flip - init_args: - box_selectors: - - target/detect_sentinel2_vessels - horizontal: true - image_selectors: - - image - - sentinel2_l2a - vertical: true - val_config: - class_path: rslearn.train.dataset.SplitConfig - init_args: - groups: - - sargassum_val - - split1 - - split7 - load_all_patches: true - names: null - num_patches: null - num_samples: null - overlap_ratio: null - patch_size: 128 - sampler: null - skip_targets: null - tags: null - transforms: null - vessel_detection: - class_path: rslearn.train.data_module.RslearnDataModule - init_args: - batch_size: 8 - default_config: - class_path: rslearn.train.dataset.SplitConfig - init_args: - groups: null - load_all_patches: null - names: null - num_patches: null - num_samples: null - overlap_ratio: null - patch_size: null - sampler: null - skip_targets: null - tags: null - transforms: - - class_path: rslp.transforms.mask.Mask - init_args: - mask_selector: mask - selectors: - - image - - class_path: rslearn.train.transforms.concatenate.Concatenate - init_args: - output_selector: landsat - selections: - image: [] - - class_path: rslp.helios.norm.HeliosNormalize - init_args: - band_names: - landsat: - - B8 - - B1 - - B2 - - B3 - - B4 - - B5 - - B6 - - B7 - - B9 - - B10 - - B11 - config_fname: /opt/helios/data/norm_configs/computed.json - std_multiplier: 2.0 - inputs: - image: - class_path: rslearn.train.dataset.DataInput - init_args: - bands: - - B8 - - B1 - - B2 - - B3 - - B4 - - B5 - - B6 - - B7 - - B9 - - B10 - - B11 - data_type: raster - dtype: FLOAT32 - is_target: false - layers: - - landsat - passthrough: true - required: true - mask: - class_path: rslearn.train.dataset.DataInput - init_args: - bands: - - mask - data_type: raster - dtype: INT32 - is_target: true - layers: - - mask - passthrough: true - required: true - targets: - class_path: rslearn.train.dataset.DataInput - init_args: - bands: null - data_type: vector - dtype: FLOAT32 - is_target: true - layers: - - label - passthrough: false - required: true - name: null - num_workers: 16 - path: /weka/dfive-default/rslearn-eai/datasets/landsat_vessel_detection/detector/dataset_20250624 - path_options: {} - predict_config: - class_path: rslearn.train.dataset.SplitConfig - init_args: - groups: null - load_all_patches: null - names: null - num_patches: null - num_samples: null - overlap_ratio: null - patch_size: null - sampler: null - skip_targets: null - tags: null - transforms: null - task: - class_path: rslearn.train.tasks.multi_task.MultiTask - init_args: - input_mapping: - vessel_detection: - targets: targets - task_label_offsets: - detect_satlas_marine_infra: - num_outputs: 3 - offset: 2 - outputs_key: labels - detect_satlas_wind_turbine: - num_outputs: 3 - offset: 5 - outputs_key: labels - detect_sentinel1_vessels: - num_outputs: 2 - offset: 0 - outputs_key: labels - detect_sentinel2_vessels: - num_outputs: 2 - offset: 0 - outputs_key: labels - vessel_detection: - num_outputs: 2 - offset: 0 - outputs_key: labels - tasks: - vessel_detection: - class_path: rslearn.train.tasks.detection.DetectionTask - init_args: - box_size: 15 - classes: - - unknown - - vessel - clip_boxes: true - colors: - - - 255 - - 0 - - 0 - - - 0 - - 255 - - 0 - - - 0 - - 0 - - 255 - - - 255 - - 255 - - 0 - - - 0 - - 255 - - 255 - - - 255 - - 0 - - 255 - - - 0 - - 128 - - 0 - - - 255 - - 160 - - 122 - - - 139 - - 69 - - 19 - - - 128 - - 128 - - 128 - - - 255 - - 255 - - 255 - - - 143 - - 188 - - 143 - - - 95 - - 158 - - 160 - - - 255 - - 200 - - 0 - - - 128 - - 0 - - 0 - enable_f1_metric: true - enable_map_metric: true - enable_precision_recall: false - exclude_by_center: true - f1_metric_kwargs: - cmp_mode: distance - cmp_threshold: 15 - flatten_classes: true - f1_metric_thresholds: - - - 0.05 - - 0.1 - - 0.2 - - 0.3 - - 0.4 - - 0.5 - - 0.6 - - 0.7 - - 0.8 - - 0.9 - - 0.95 - filters: null - image_bands: - - 0 - - 1 - - 2 - property_name: category - read_class_id: false - remap_values: - - - 0.0 - - 1.0 - - - 0 - - 255 - score_threshold: 0.7 - skip_empty_examples: false - skip_unknown_categories: false - test_config: - class_path: rslearn.train.dataset.SplitConfig - init_args: - groups: - - labels_utm - load_all_patches: true - names: null - num_patches: null - num_samples: null - overlap_ratio: null - patch_size: 128 - sampler: null - skip_targets: null - tags: - split: val - transforms: null - train_config: - class_path: rslearn.train.dataset.SplitConfig - init_args: - groups: - - labels_utm - load_all_patches: true - names: null - num_patches: null - num_samples: null - overlap_ratio: null - patch_size: 128 - sampler: null - skip_targets: null - tags: - split: train - transforms: - - class_path: rslp.transforms.mask.Mask - init_args: - mask_selector: mask - selectors: - - image - - class_path: rslearn.train.transforms.concatenate.Concatenate - init_args: - output_selector: landsat - selections: - image: [] - - class_path: rslp.helios.norm.HeliosNormalize - init_args: - band_names: - landsat: - - B8 - - B1 - - B2 - - B3 - - B4 - - B5 - - B6 - - B7 - - B9 - - B10 - - B11 - config_fname: /opt/helios/data/norm_configs/computed.json - std_multiplier: 2.0 - val_config: - class_path: rslearn.train.dataset.SplitConfig - init_args: - groups: - - labels_utm - load_all_patches: true - names: null - num_patches: null - num_samples: null - overlap_ratio: null - patch_size: 128 - sampler: null - skip_targets: null - tags: - split: val - transforms: null - num_workers: 16 - per_dataset_patch_limit: null - refill_batches: true - sample_mode: random_cycle - steps_per_dataset: null -model: - class_path: rslearn.train.lightning_module.RslearnLightningModule - init_args: - lr: 0.0001 - metrics_file: null - model: - class_path: rslearn.models.multitask.MultiTaskModel - init_args: - decoder_to_target: - FasterRCNN: - - vessel_detection - - detect_satlas_marine_infra - - detect_satlas_wind_turbine - - detect_sentinel1_vessels - - detect_sentinel2_vessels - decoders: - FasterRCNN: - - class_path: rslearn.models.faster_rcnn.FasterRCNN - init_args: - anchor_sizes: - - - 32 - box_score_thresh: 0.05 - downsample_factors: - - 8 - instance_segmentation: false - num_channels: 768 - num_classes: 8 - encoder: - - class_path: rslp.helios.model.Helios - init_args: - autocast_dtype: bfloat16 - checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 - embedding_size: null - forward_kwargs: - patch_size: 8 - patch_size: null - random_initialization: false - selector: - - encoder - lazy_decode: true - loss_weights: null - task_embedding: null - trunk: - class_path: rslearn.models.trunk.DecoderTrunk - init_args: - dim: 768 - dropout: 0.1 - mlp_dim: 512 - n_heads: 12 - n_layers: 1 - num_experts: 4 - num_slots: 4 - task_embedding: - class_path: rslearn.models.task_embedding.TaskChannelEmbedding - init_args: - default_idx: 0 - encoder_embedding_size: 768 - task_moe: false - use_moe: true - optimizer: null - plateau: false - plateau_cooldown: 0 - plateau_factor: 0.1 - plateau_min_lr: 0.0 - plateau_patience: 10 - print_model: false - print_parameters: false - restore_config: null - scheduler: - class_path: rslearn.train.scheduler.CosineAnnealingScheduler - init_args: - T_max: 100 - eta_min: 0.0 - visualize_dir: null -rslp_experiment: detect__moe_v2 -rslp_project: helios_finetune_cosine_lr -trainer: - accumulate_grad_batches: 5 - callbacks: - - class_path: lightning.pytorch.callbacks.LearningRateMonitor - init_args: - log_momentum: false - log_weight_decay: false - logging_interval: epoch - - class_path: lightning.pytorch.callbacks.ModelCheckpoint - init_args: - auto_insert_metric_name: true - dirpath: /weka/dfive-default/rslearn-eai/projects/helios_finetune_cosine_lr/detect__moe_v2/checkpoints - enable_version_counter: true - every_n_epochs: null - every_n_train_steps: null - filename: null - mode: min - monitor: val_loss - save_last: true - save_on_train_epoch_end: null - save_top_k: 1 - save_weights_only: false - train_time_interval: null - verbose: false - - class_path: rslearn.train.callbacks.freeze_unfreeze.FreezeUnfreeze - init_args: - module_selector: - - model - - encoder - - 0 - unfreeze_at_epoch: 20 - unfreeze_lr_factor: 10.0 - limit_val_batches: 1024 - max_epochs: 200 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_29_joint/OUT_all.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_29_joint/OUT_all.yaml new file mode 100644 index 00000000..031d29c7 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_29_joint/OUT_all.yaml @@ -0,0 +1,4032 @@ +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + batch_sizes: + crop_type_classification: 32 + cropland_classification: 16 + detect_satlas_marine_infra: 8 + detect_satlas_wind_turbine: 8 + detect_sentinel1_vessels: 8 + detect_sentinel2_vessels: 8 + segment: 2 + segment_satlas_solar_farm: 8 + vessel_classification: 16 + vessel_detection: 8 + data_modules: + crop_type_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 32 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: [] + sentinel2_1: [] + sentinel2_10: [] + sentinel2_11: [] + sentinel2_2: [] + sentinel2_3: [] + sentinel2_4: [] + sentinel2_5: [] + sentinel2_6: [] + sentinel2_7: [] + sentinel2_8: [] + sentinel2_9: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + sentinel1_0: [] + sentinel1_1: [] + sentinel1_10: [] + sentinel1_11: [] + sentinel1_2: [] + sentinel1_3: [] + sentinel1_4: [] + sentinel1_5: [] + sentinel1_6: [] + sentinel1_7: [] + sentinel1_8: [] + sentinel1_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.pad.Pad + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + mode: center + size: 8 + inputs: + label: + data_type: vector + is_target: true + layers: + - label + sentinel1_0: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + sentinel1_1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + sentinel1_10: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.10 + passthrough: true + sentinel1_11: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.11 + passthrough: true + sentinel1_2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + sentinel1_3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + sentinel1_4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.4 + passthrough: true + sentinel1_5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.5 + passthrough: true + sentinel1_6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.6 + passthrough: true + sentinel1_7: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.7 + passthrough: true + sentinel1_8: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.8 + passthrough: true + sentinel1_9: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.9 + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/crop/kenya_nandi/20250625 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + crop_type_classification: + label: targets + tasks: + crop_type_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Coffee + - Trees + - Grassland + - Maize + - Sugarcane + - Tea + - Water + - Built-up + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + test_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: val + train_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: train + val_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: val + cropland_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 16 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: [] + sentinel2_1: [] + sentinel2_10: [] + sentinel2_11: [] + sentinel2_2: [] + sentinel2_3: [] + sentinel2_4: [] + sentinel2_5: [] + sentinel2_6: [] + sentinel2_7: [] + sentinel2_8: [] + sentinel2_9: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + sentinel1_0: [] + sentinel1_1: [] + sentinel1_10: [] + sentinel1_11: [] + sentinel1_2: [] + sentinel1_3: [] + sentinel1_4: [] + sentinel1_5: [] + sentinel1_6: [] + sentinel1_7: [] + sentinel1_8: [] + sentinel1_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.pad.Pad + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + mode: center + size: 8 + inputs: + label: + data_type: vector + is_target: true + layers: + - label + sentinel1_0: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1 + passthrough: true + sentinel1_1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.1 + passthrough: true + sentinel1_10: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.10 + passthrough: true + sentinel1_11: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.11 + passthrough: true + sentinel1_2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.2 + passthrough: true + sentinel1_3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.3 + passthrough: true + sentinel1_4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.4 + passthrough: true + sentinel1_5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.5 + passthrough: true + sentinel1_6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.6 + passthrough: true + sentinel1_7: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.7 + passthrough: true + sentinel1_8: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.8 + passthrough: true + sentinel1_9: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.9 + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/crop/worldcereal_cropland/20250626 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + cropland_classification: + label: targets + tasks: + cropland_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Cropland + - Non-Cropland + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + test_config: + groups: + - h3_sample100_66K + tags: + split: val + train_config: + groups: + - h3_sample100_66K + tags: + split: train + val_config: + groups: + - h3_sample100_66K + tags: + split: val + detect_satlas_marine_infra: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/marine_infra/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_marine_infra: + targets: targets + tasks: + detect_satlas_marine_infra: + class_path: rslp.satlas.train.MarineInfraTask + init_args: + box_size: 15 + classes: + - unknown + - platform + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + - - 0.1 + - - 0.2 + - - 0.3 + - - 0.4 + - - 0.5 + - - 0.6 + - - 0.7 + - - 0.8 + - - 0.9 + image_bands: + - 2 + - 1 + - 0 + property_name: category + remap_values: + - - 0 + - 0.25 + - - 0 + - 255 + skip_unknown_categories: true + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 65536 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_satlas_marine_infra + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + val_config: + patch_size: 128 + tags: + split: val + detect_satlas_wind_turbine: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + s25: [] + s26: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + landsat5: [] + landsat6: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + s1a5: [] + s1a6: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + landsat5: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.4 + passthrough: true + landsat6: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.5 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1a5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.4 + passthrough: true + s1a6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.5 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s1d5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.4 + passthrough: true + s1d6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.5 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + s25: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + s26: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/wind_turbine/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_wind_turbine: + targets: targets + tasks: + detect_satlas_wind_turbine: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 65536 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + s25: [] + s26: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + landsat5: [] + landsat6: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + s1a5: [] + s1a6: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_satlas_wind_turbine + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + val_config: + patch_size: 128 + tags: + split: val + detect_sentinel1_vessels: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/sentinel1_vessels/dataset_v1/20250602/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_sentinel1_vessels: + targets: targets + tasks: + detect_sentinel1_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + image_bands: + - 1 + - 1 + - 1 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.5 + test_config: + groups: + - val_ascending + - val_descending + patch_size: 128 + train_config: + groups: + - train_ascending + - train_descending + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 32768 + replacement: true + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_sentinel1_vessels + image_selectors: + - image + - sentinel1 + val_config: + groups: + - val_ascending + - val_descending + patch_size: 128 + detect_sentinel2_vessels: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/sentinel2_vessels/dataset_v1/20250213/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_sentinel2_vessels: + targets: targets + tasks: + detect_sentinel2_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + groups: + - sargassum_val + - split1 + - split7 + patch_size: 128 + train_config: + groups: + - sargassum_train + - split2 + - split3 + - split4 + - split5 + - split6 + - train + - train-bg + - train2 + - train3 + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 131072 + replacement: true + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_sentinel2_vessels + image_selectors: + - image + - sentinel2_l2a + val_config: + groups: + - sargassum_val + - split1 + - split7 + patch_size: 128 + segment: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 2 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_1: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_10: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_11: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_2: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_3: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_4: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_5: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_6: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_7: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_8: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_9: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1d_0: [] + s1d_1: [] + s1d_10: [] + s1d_11: [] + s1d_2: [] + s1d_3: [] + s1d_4: [] + s1d_5: [] + s1d_6: [] + s1d_7: [] + s1d_8: [] + s1d_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + s1d_0: + bands: + - vv + - vh + data_type: raster + layers: + - s1d + passthrough: true + s1d_1: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.1 + passthrough: true + s1d_10: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.10 + passthrough: true + s1d_11: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.11 + passthrough: true + s1d_2: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.2 + passthrough: true + s1d_3: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.3 + passthrough: true + s1d_4: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.4 + passthrough: true + s1d_5: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.5 + passthrough: true + s1d_6: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.6 + passthrough: true + s1d_7: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.7 + passthrough: true + s1d_8: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.8 + passthrough: true + s1d_9: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.9 + passthrough: true + targets: + bands: + - class + data_type: raster + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/pastis/rslearn_dataset/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + segment: + targets: targets + tasks: + segment: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_miou_metric: true + metric_kwargs: + average: micro + num_classes: 20 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + zero_is_invalid: true + test_config: + groups: + - fold5 + train_config: + groups: + - fold1 + - fold2 + - fold3 + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_1: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_10: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_11: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_2: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_3: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_4: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_5: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_6: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_7: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_8: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_9: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1d_0: [] + s1d_1: [] + s1d_10: [] + s1d_11: [] + s1d_2: [] + s1d_3: [] + s1d_4: [] + s1d_5: [] + s1d_6: [] + s1d_7: [] + s1d_8: [] + s1d_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + - target/segment/classes + - target/segment/valid + val_config: + groups: + - fold4 + segment_satlas_solar_farm: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + targets: + bands: + - label + data_type: raster + dtype: INT32 + is_target: true + layers: + - label_raster + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/solar_farm/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + segment_satlas_solar_farm: + targets: targets + tasks: + segment_satlas_solar_farm: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_f1_metric: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + metric_kwargs: + average: micro + num_classes: 2 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 16384 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - target/segment_satlas_solar_farm/classes + - target/segment_satlas_solar_farm/valid + val_config: + patch_size: 128 + tags: + split: val + vessel_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 16 + default_config: + transforms: + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + label: + data_type: vector + is_target: true + layers: + - label + landsat: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/landsat_vessel_detection/classifier/dataset_20250624 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + vessel_classification: + label: targets + tasks: + vessel_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + allow_invalid: true + classes: + - correct + - incorrect + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: label + skip_unknown_categories: true + test_config: + groups: + - phase2a_completed + tags: + split: val + train_config: + groups: + - selected_copy + - phase2a_completed + - phase3a_selected + tags: + split: train + val_config: + groups: + - phase2a_completed + tags: + split: val + vessel_detection: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/landsat_vessel_detection/detector/dataset_20250624 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + vessel_detection: + targets: targets + tasks: + vessel_detection: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.7 + test_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: val + train_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: train + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + val_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: val + num_workers: 16 + refill_batches: true + sample_mode: random_cycle +model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.0001 + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + decoder_to_target: + ClassificationHead: + - vessel_classification + - crop_type_classification + - cropland_classification + FasterRCNN: + - vessel_detection + - detect_satlas_marine_infra + - detect_satlas_wind_turbine + - detect_sentinel1_vessels + - detect_sentinel2_vessels + SegmentationHead: + - segment + - segment_satlas_solar_farm + decoders: + ClassificationHead: + - class_path: rslearn.models.pooling_decoder.PoolingDecoder + init_args: + in_channels: 768 + out_channels: 12 + - class_path: rslearn.train.tasks.classification.ClassificationHead + FasterRCNN: + - class_path: rslearn.models.faster_rcnn.FasterRCNN + init_args: + anchor_sizes: + - - 32 + downsample_factors: + - 8 + num_channels: 768 + num_classes: 8 + SegmentationHead: + - class_path: rslearn.models.unet.UNetDecoder + init_args: + conv_layers_per_resolution: 2 + in_channels: + - - 8 + - 768 + num_channels: + 1: 128 + 2: 256 + 4: 512 + 8: 512 + out_channels: 22 + - class_path: rslearn.train.tasks.segmentation.SegmentationHead + encoder: + - class_path: rslp.helios.model.Helios + init_args: + checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + forward_kwargs: + patch_size: 8 + selector: + - encoder + lazy_decode: true + task_label_offsets: + crop_type_classification: + num_outputs: 8 + offset: 2 + outputs_key: class + cropland_classification: + num_outputs: 2 + offset: 10 + outputs_key: class + detect_satlas_marine_infra: + num_outputs: 3 + offset: 2 + outputs_key: labels + detect_satlas_wind_turbine: + num_outputs: 3 + offset: 5 + outputs_key: labels + detect_sentinel1_vessels: + num_outputs: 2 + offset: 0 + outputs_key: labels + detect_sentinel2_vessels: + num_outputs: 2 + offset: 0 + outputs_key: labels + segment: + num_outputs: 20 + offset: 0 + outputs_key: classes + segment_satlas_solar_farm: + num_outputs: 2 + offset: 20 + outputs_key: classes + vessel_classification: + num_outputs: 2 + offset: 0 + outputs_key: class + vessel_detection: + num_outputs: 2 + offset: 0 + outputs_key: labels + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 100 + eta_min: 0 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + crop_type_classification: + label: targets + cropland_classification: + label: targets + detect_satlas_marine_infra: + targets: targets + detect_satlas_wind_turbine: + targets: targets + detect_sentinel1_vessels: + targets: targets + detect_sentinel2_vessels: + targets: targets + segment: + targets: targets + segment_satlas_solar_farm: + targets: targets + vessel_classification: + label: targets + vessel_detection: + targets: targets + tasks: + crop_type_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Coffee + - Trees + - Grassland + - Maize + - Sugarcane + - Tea + - Water + - Built-up + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + cropland_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Cropland + - Non-Cropland + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + detect_satlas_marine_infra: + class_path: rslp.satlas.train.MarineInfraTask + init_args: + box_size: 15 + classes: + - unknown + - platform + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + - - 0.1 + - - 0.2 + - - 0.3 + - - 0.4 + - - 0.5 + - - 0.6 + - - 0.7 + - - 0.8 + - - 0.9 + image_bands: + - 2 + - 1 + - 0 + property_name: category + remap_values: + - - 0 + - 0.25 + - - 0 + - 255 + skip_unknown_categories: true + detect_satlas_wind_turbine: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + detect_sentinel1_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + image_bands: + - 1 + - 1 + - 1 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.5 + detect_sentinel2_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + segment: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_miou_metric: true + metric_kwargs: + average: micro + num_classes: 20 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + zero_is_invalid: true + segment_satlas_solar_farm: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_f1_metric: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + metric_kwargs: + average: micro + num_classes: 2 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + vessel_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + allow_invalid: true + classes: + - correct + - incorrect + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: label + skip_unknown_categories: true + vessel_detection: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.7 +rslp_experiment: placeholder +rslp_project: placeholder +trainer: + accumulate_grad_batches: 10 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: epoch + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + mode: min + monitor: val_loss + save_last: true + save_top_k: 1 + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 0 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 5 + freeze_selectors: [] + unfreeze_selectors: + - head + - encoder + max_epochs: 100 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_29_joint/all.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_29_joint/all.yaml new file mode 100644 index 00000000..86629297 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_29_joint/all.yaml @@ -0,0 +1,39 @@ +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_29_joint/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_29_joint/OUT_all.yaml + +dataset_cfgs: + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_classifier_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_nandi_crop_type/finetune_s1_s2_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_worldcereal_cropland/finetune_s1_s2_cosinelr.yaml + + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_pastis/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_pastis/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_solar_farm_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_solar_farm_128/basecfg_helios_mm.yaml + + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_detector_cosinelr.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_marine_infra_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_marine_infra_128/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_wind_turbine_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_wind_turbine_128/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_helios.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel2_vessels_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel2_vessels_128/basecfg_helios.yaml + +substitutions: + patch_size: 8 + encoder_embedding_size: 768 + helios_checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + +global_overrides: + model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + trainer: + accumulate_grad_batches: 10 + +merge_options: + merge_heads: true + merge_task_labels: true + same_label_groups: + - [detect_sentinel1_vessels, detect_sentinel2_vessels, vessel_detection] \ No newline at end of file diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_29_joint/base.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_29_joint/base.yaml new file mode 100644 index 00000000..10960f26 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_29_joint/base.yaml @@ -0,0 +1,60 @@ +model: + class_path: rslp.helios.lightning_module.MoELightningModule + init_args: + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + encoder: + - class_path: rslp.helios.model.Helios + init_args: + checkpoint_path: "{CHECKPOINT_PATH}" + selector: ["encoder"] + forward_kwargs: + patch_size: {PATCH_SIZE} + decoders: # Filled in by make_multidataset_config.py + lazy_decode: true + lr: 0.0001 + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 100 + eta_min: 0 + +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + sample_mode: random_cycle + refill_batches: true + num_workers: 16 + data_modules: # Filled in by make_multidataset_config.py + +trainer: + max_epochs: 100 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: "epoch" + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + save_top_k: 1 + save_last: true + monitor: val_loss + mode: min + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 0 + freeze_selectors: ["encoder"] + unfreeze_selectors: ["head"] + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 5 + freeze_selectors: [] + unfreeze_selectors: ["head", "encoder"] + +rslp_project: placeholder +rslp_experiment: placeholder + +all_dataset_info_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v3_multitask/all_dataset_info.yaml \ No newline at end of file diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_29_joint/exp_id.txt b/one_off_projects/2025_07_joint_finetune/configs/2025_08_29_joint/exp_id.txt new file mode 100644 index 00000000..3e2adf2e --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_29_joint/exp_id.txt @@ -0,0 +1 @@ +{task}_joint \ No newline at end of file diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_29_lora/OUT_all.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_29_lora/OUT_all.yaml new file mode 100644 index 00000000..2dde3aa1 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_29_lora/OUT_all.yaml @@ -0,0 +1,4069 @@ +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + batch_sizes: + crop_type_classification: 32 + cropland_classification: 16 + detect_satlas_marine_infra: 8 + detect_satlas_wind_turbine: 8 + detect_sentinel1_vessels: 8 + detect_sentinel2_vessels: 8 + segment: 2 + segment_satlas_solar_farm: 8 + vessel_classification: 16 + vessel_detection: 8 + data_modules: + crop_type_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 32 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: [] + sentinel2_1: [] + sentinel2_10: [] + sentinel2_11: [] + sentinel2_2: [] + sentinel2_3: [] + sentinel2_4: [] + sentinel2_5: [] + sentinel2_6: [] + sentinel2_7: [] + sentinel2_8: [] + sentinel2_9: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + sentinel1_0: [] + sentinel1_1: [] + sentinel1_10: [] + sentinel1_11: [] + sentinel1_2: [] + sentinel1_3: [] + sentinel1_4: [] + sentinel1_5: [] + sentinel1_6: [] + sentinel1_7: [] + sentinel1_8: [] + sentinel1_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.pad.Pad + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + mode: center + size: 8 + inputs: + label: + data_type: vector + is_target: true + layers: + - label + sentinel1_0: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + sentinel1_1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + sentinel1_10: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.10 + passthrough: true + sentinel1_11: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.11 + passthrough: true + sentinel1_2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + sentinel1_3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + sentinel1_4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.4 + passthrough: true + sentinel1_5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.5 + passthrough: true + sentinel1_6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.6 + passthrough: true + sentinel1_7: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.7 + passthrough: true + sentinel1_8: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.8 + passthrough: true + sentinel1_9: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.9 + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/crop/kenya_nandi/20250625 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + crop_type_classification: + label: targets + tasks: + crop_type_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Coffee + - Trees + - Grassland + - Maize + - Sugarcane + - Tea + - Water + - Built-up + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + test_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: val + train_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: train + val_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: val + cropland_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 16 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: [] + sentinel2_1: [] + sentinel2_10: [] + sentinel2_11: [] + sentinel2_2: [] + sentinel2_3: [] + sentinel2_4: [] + sentinel2_5: [] + sentinel2_6: [] + sentinel2_7: [] + sentinel2_8: [] + sentinel2_9: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + sentinel1_0: [] + sentinel1_1: [] + sentinel1_10: [] + sentinel1_11: [] + sentinel1_2: [] + sentinel1_3: [] + sentinel1_4: [] + sentinel1_5: [] + sentinel1_6: [] + sentinel1_7: [] + sentinel1_8: [] + sentinel1_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.pad.Pad + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + mode: center + size: 8 + inputs: + label: + data_type: vector + is_target: true + layers: + - label + sentinel1_0: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1 + passthrough: true + sentinel1_1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.1 + passthrough: true + sentinel1_10: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.10 + passthrough: true + sentinel1_11: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.11 + passthrough: true + sentinel1_2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.2 + passthrough: true + sentinel1_3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.3 + passthrough: true + sentinel1_4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.4 + passthrough: true + sentinel1_5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.5 + passthrough: true + sentinel1_6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.6 + passthrough: true + sentinel1_7: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.7 + passthrough: true + sentinel1_8: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.8 + passthrough: true + sentinel1_9: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.9 + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/crop/worldcereal_cropland/20250626 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + cropland_classification: + label: targets + tasks: + cropland_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Cropland + - Non-Cropland + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + test_config: + groups: + - h3_sample100_66K + tags: + split: val + train_config: + groups: + - h3_sample100_66K + tags: + split: train + val_config: + groups: + - h3_sample100_66K + tags: + split: val + detect_satlas_marine_infra: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/marine_infra/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_marine_infra: + targets: targets + tasks: + detect_satlas_marine_infra: + class_path: rslp.satlas.train.MarineInfraTask + init_args: + box_size: 15 + classes: + - unknown + - platform + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + - - 0.1 + - - 0.2 + - - 0.3 + - - 0.4 + - - 0.5 + - - 0.6 + - - 0.7 + - - 0.8 + - - 0.9 + image_bands: + - 2 + - 1 + - 0 + property_name: category + remap_values: + - - 0 + - 0.25 + - - 0 + - 255 + skip_unknown_categories: true + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 65536 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_satlas_marine_infra + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + val_config: + patch_size: 128 + tags: + split: val + detect_satlas_wind_turbine: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + s25: [] + s26: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + landsat5: [] + landsat6: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + s1a5: [] + s1a6: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + landsat5: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.4 + passthrough: true + landsat6: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.5 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1a5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.4 + passthrough: true + s1a6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.5 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s1d5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.4 + passthrough: true + s1d6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.5 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + s25: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + s26: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/wind_turbine/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_wind_turbine: + targets: targets + tasks: + detect_satlas_wind_turbine: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 65536 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + s25: [] + s26: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + landsat5: [] + landsat6: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + s1a5: [] + s1a6: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_satlas_wind_turbine + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + val_config: + patch_size: 128 + tags: + split: val + detect_sentinel1_vessels: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/sentinel1_vessels/dataset_v1/20250602/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_sentinel1_vessels: + targets: targets + tasks: + detect_sentinel1_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + image_bands: + - 1 + - 1 + - 1 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.5 + test_config: + groups: + - val_ascending + - val_descending + patch_size: 128 + train_config: + groups: + - train_ascending + - train_descending + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 32768 + replacement: true + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_sentinel1_vessels + image_selectors: + - image + - sentinel1 + val_config: + groups: + - val_ascending + - val_descending + patch_size: 128 + detect_sentinel2_vessels: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/sentinel2_vessels/dataset_v1/20250213/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_sentinel2_vessels: + targets: targets + tasks: + detect_sentinel2_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + groups: + - sargassum_val + - split1 + - split7 + patch_size: 128 + train_config: + groups: + - sargassum_train + - split2 + - split3 + - split4 + - split5 + - split6 + - train + - train-bg + - train2 + - train3 + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 131072 + replacement: true + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_sentinel2_vessels + image_selectors: + - image + - sentinel2_l2a + val_config: + groups: + - sargassum_val + - split1 + - split7 + patch_size: 128 + segment: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 2 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_1: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_10: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_11: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_2: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_3: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_4: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_5: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_6: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_7: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_8: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_9: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1d_0: [] + s1d_1: [] + s1d_10: [] + s1d_11: [] + s1d_2: [] + s1d_3: [] + s1d_4: [] + s1d_5: [] + s1d_6: [] + s1d_7: [] + s1d_8: [] + s1d_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + s1d_0: + bands: + - vv + - vh + data_type: raster + layers: + - s1d + passthrough: true + s1d_1: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.1 + passthrough: true + s1d_10: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.10 + passthrough: true + s1d_11: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.11 + passthrough: true + s1d_2: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.2 + passthrough: true + s1d_3: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.3 + passthrough: true + s1d_4: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.4 + passthrough: true + s1d_5: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.5 + passthrough: true + s1d_6: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.6 + passthrough: true + s1d_7: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.7 + passthrough: true + s1d_8: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.8 + passthrough: true + s1d_9: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.9 + passthrough: true + targets: + bands: + - class + data_type: raster + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/pastis/rslearn_dataset/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + segment: + targets: targets + tasks: + segment: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_miou_metric: true + metric_kwargs: + average: micro + num_classes: 20 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + zero_is_invalid: true + test_config: + groups: + - fold5 + train_config: + groups: + - fold1 + - fold2 + - fold3 + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_1: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_10: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_11: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_2: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_3: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_4: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_5: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_6: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_7: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_8: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_9: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1d_0: [] + s1d_1: [] + s1d_10: [] + s1d_11: [] + s1d_2: [] + s1d_3: [] + s1d_4: [] + s1d_5: [] + s1d_6: [] + s1d_7: [] + s1d_8: [] + s1d_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + - target/segment/classes + - target/segment/valid + val_config: + groups: + - fold4 + segment_satlas_solar_farm: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + targets: + bands: + - label + data_type: raster + dtype: INT32 + is_target: true + layers: + - label_raster + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/solar_farm/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + segment_satlas_solar_farm: + targets: targets + tasks: + segment_satlas_solar_farm: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_f1_metric: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + metric_kwargs: + average: micro + num_classes: 2 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 16384 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - target/segment_satlas_solar_farm/classes + - target/segment_satlas_solar_farm/valid + val_config: + patch_size: 128 + tags: + split: val + vessel_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 16 + default_config: + transforms: + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + label: + data_type: vector + is_target: true + layers: + - label + landsat: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/landsat_vessel_detection/classifier/dataset_20250624 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + vessel_classification: + label: targets + tasks: + vessel_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + allow_invalid: true + classes: + - correct + - incorrect + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: label + skip_unknown_categories: true + test_config: + groups: + - phase2a_completed + tags: + split: val + train_config: + groups: + - selected_copy + - phase2a_completed + - phase3a_selected + tags: + split: train + val_config: + groups: + - phase2a_completed + tags: + split: val + vessel_detection: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/landsat_vessel_detection/detector/dataset_20250624 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + vessel_detection: + targets: targets + tasks: + vessel_detection: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.7 + test_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: val + train_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: train + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + val_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: val + num_workers: 16 + refill_batches: true + sample_mode: random_cycle +model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.0001 + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + decoder_to_target: + ClassificationHead: + - vessel_classification + - crop_type_classification + - cropland_classification + FasterRCNN: + - vessel_detection + - detect_satlas_marine_infra + - detect_satlas_wind_turbine + - detect_sentinel1_vessels + - detect_sentinel2_vessels + SegmentationHead: + - segment + - segment_satlas_solar_farm + decoders: + ClassificationHead: + - class_path: rslearn.models.pooling_decoder.PoolingDecoder + init_args: + in_channels: 768 + out_channels: 12 + - class_path: rslearn.train.tasks.classification.ClassificationHead + FasterRCNN: + - class_path: rslearn.models.faster_rcnn.FasterRCNN + init_args: + anchor_sizes: + - - 32 + downsample_factors: + - 8 + num_channels: 768 + num_classes: 8 + SegmentationHead: + - class_path: rslearn.models.unet.UNetDecoder + init_args: + conv_layers_per_resolution: 2 + in_channels: + - - 8 + - 768 + num_channels: + 1: 128 + 2: 256 + 4: 512 + 8: 512 + out_channels: 22 + - class_path: rslearn.train.tasks.segmentation.SegmentationHead + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_lora_kwargs: + gen_hidden: 64 + task_lora_indices: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 10 + - 11 + use_task_lora: true + selector: + - encoder + task_embed_opts: + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt + type: precomputed + lazy_decode: true + task_label_offsets: + crop_type_classification: + num_outputs: 8 + offset: 2 + outputs_key: class + cropland_classification: + num_outputs: 2 + offset: 10 + outputs_key: class + detect_satlas_marine_infra: + num_outputs: 3 + offset: 2 + outputs_key: labels + detect_satlas_wind_turbine: + num_outputs: 3 + offset: 5 + outputs_key: labels + detect_sentinel1_vessels: + num_outputs: 2 + offset: 0 + outputs_key: labels + detect_sentinel2_vessels: + num_outputs: 2 + offset: 0 + outputs_key: labels + segment: + num_outputs: 20 + offset: 0 + outputs_key: classes + segment_satlas_solar_farm: + num_outputs: 2 + offset: 20 + outputs_key: classes + vessel_classification: + num_outputs: 2 + offset: 0 + outputs_key: class + vessel_detection: + num_outputs: 2 + offset: 0 + outputs_key: labels + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 100 + eta_min: 0 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + crop_type_classification: + label: targets + cropland_classification: + label: targets + detect_satlas_marine_infra: + targets: targets + detect_satlas_wind_turbine: + targets: targets + detect_sentinel1_vessels: + targets: targets + detect_sentinel2_vessels: + targets: targets + segment: + targets: targets + segment_satlas_solar_farm: + targets: targets + vessel_classification: + label: targets + vessel_detection: + targets: targets + tasks: + crop_type_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Coffee + - Trees + - Grassland + - Maize + - Sugarcane + - Tea + - Water + - Built-up + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + cropland_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Cropland + - Non-Cropland + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + detect_satlas_marine_infra: + class_path: rslp.satlas.train.MarineInfraTask + init_args: + box_size: 15 + classes: + - unknown + - platform + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + - - 0.1 + - - 0.2 + - - 0.3 + - - 0.4 + - - 0.5 + - - 0.6 + - - 0.7 + - - 0.8 + - - 0.9 + image_bands: + - 2 + - 1 + - 0 + property_name: category + remap_values: + - - 0 + - 0.25 + - - 0 + - 255 + skip_unknown_categories: true + detect_satlas_wind_turbine: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + detect_sentinel1_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + image_bands: + - 1 + - 1 + - 1 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.5 + detect_sentinel2_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + segment: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_miou_metric: true + metric_kwargs: + average: micro + num_classes: 20 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + zero_is_invalid: true + segment_satlas_solar_farm: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_f1_metric: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + metric_kwargs: + average: micro + num_classes: 2 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + vessel_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + allow_invalid: true + classes: + - correct + - incorrect + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: label + skip_unknown_categories: true + vessel_detection: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.7 +rslp_experiment: placeholder +rslp_project: placeholder +trainer: + accumulate_grad_batches: 10 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: epoch + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + every_n_epochs: 10 + mode: min + monitor: val_loss + save_last: true + save_top_k: 1 + - class_path: rslearn.train.callbacks.adapters.ActivateLayers + init_args: + selectors: + - at_epoch: 10 + name: lora + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 0 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 10 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - lora + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 50 + freeze_selectors: [] + scale_existing_groups: 0.1 + unfreeze_lr_factor: 10 + unfreeze_selectors: + - head + - encoder + max_epochs: 100 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_29_lora/all.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_29_lora/all.yaml new file mode 100644 index 00000000..22715fa0 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_29_lora/all.yaml @@ -0,0 +1,39 @@ +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_29_lora/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_29_lora/OUT_all.yaml + +dataset_cfgs: + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_classifier_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_nandi_crop_type/finetune_s1_s2_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_worldcereal_cropland/finetune_s1_s2_cosinelr.yaml + + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_pastis/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_pastis/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_solar_farm_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_solar_farm_128/basecfg_helios_mm.yaml + + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_detector_cosinelr.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_marine_infra_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_marine_infra_128/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_wind_turbine_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_wind_turbine_128/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_helios.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel2_vessels_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel2_vessels_128/basecfg_helios.yaml + +substitutions: + patch_size: 8 + encoder_embedding_size: 768 + helios_checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + +global_overrides: + model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + trainer: + accumulate_grad_batches: 10 + +merge_options: + merge_heads: true + merge_task_labels: true + same_label_groups: + - [detect_sentinel1_vessels, detect_sentinel2_vessels, vessel_detection] \ No newline at end of file diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_29_lora/base.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_29_lora/base.yaml new file mode 100644 index 00000000..efebd988 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_29_lora/base.yaml @@ -0,0 +1,83 @@ +model: + class_path: rslp.helios.lightning_module.MoELightningModule + init_args: + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: "{CHECKPOINT_PATH}" + selector: ["encoder"] + forward_kwargs: + patch_size: {PATCH_SIZE} + model_overrides: + encoder_config: + task_lora_kwargs: + use_task_lora: true + task_lora_indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] + gen_hidden: 64 + task_embed_opts: + type: "precomputed" + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt + decoders: # Filled in by make_multidataset_config.py + lazy_decode: true + lr: 0.0001 + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 100 + eta_min: 0 + +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + sample_mode: random_cycle + refill_batches: true + num_workers: 16 + data_modules: # Filled in by make_multidataset_config.py + +trainer: + max_epochs: 100 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: "epoch" + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + save_top_k: 1 + every_n_epochs: 10 + save_last: true + monitor: val_loss + mode: min + - class_path: rslearn.train.callbacks.adapters.ActivateLayers + init_args: + selectors: + - name: lora + at_epoch: 10 + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 0 + freeze_selectors: ["encoder"] + unfreeze_selectors: ["head"] + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 10 + freeze_selectors: ["encoder"] + unfreeze_selectors: ["head", "lora"] + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 50 + freeze_selectors: [] + unfreeze_selectors: ["head", "encoder"] + unfreeze_lr_factor: 10 + scale_existing_groups: 0.1 + + +rslp_project: placeholder +rslp_experiment: placeholder + +all_dataset_info_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v3_multitask/all_dataset_info.yaml \ No newline at end of file diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_29_lora/exp_id.txt b/one_off_projects/2025_07_joint_finetune/configs/2025_08_29_lora/exp_id.txt new file mode 100644 index 00000000..292de9b9 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_29_lora/exp_id.txt @@ -0,0 +1 @@ +{task}_lora \ No newline at end of file diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_29_lora_moe/OUT_all.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_29_lora_moe/OUT_all.yaml new file mode 100644 index 00000000..5582c10e --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_29_lora_moe/OUT_all.yaml @@ -0,0 +1,4082 @@ +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + batch_sizes: + crop_type_classification: 32 + cropland_classification: 16 + detect_satlas_marine_infra: 8 + detect_satlas_wind_turbine: 8 + detect_sentinel1_vessels: 8 + detect_sentinel2_vessels: 8 + segment: 2 + segment_satlas_solar_farm: 8 + vessel_classification: 16 + vessel_detection: 8 + data_modules: + crop_type_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 32 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: [] + sentinel2_1: [] + sentinel2_10: [] + sentinel2_11: [] + sentinel2_2: [] + sentinel2_3: [] + sentinel2_4: [] + sentinel2_5: [] + sentinel2_6: [] + sentinel2_7: [] + sentinel2_8: [] + sentinel2_9: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + sentinel1_0: [] + sentinel1_1: [] + sentinel1_10: [] + sentinel1_11: [] + sentinel1_2: [] + sentinel1_3: [] + sentinel1_4: [] + sentinel1_5: [] + sentinel1_6: [] + sentinel1_7: [] + sentinel1_8: [] + sentinel1_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.pad.Pad + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + mode: center + size: 8 + inputs: + label: + data_type: vector + is_target: true + layers: + - label + sentinel1_0: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + sentinel1_1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + sentinel1_10: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.10 + passthrough: true + sentinel1_11: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.11 + passthrough: true + sentinel1_2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + sentinel1_3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + sentinel1_4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.4 + passthrough: true + sentinel1_5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.5 + passthrough: true + sentinel1_6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.6 + passthrough: true + sentinel1_7: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.7 + passthrough: true + sentinel1_8: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.8 + passthrough: true + sentinel1_9: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.9 + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/crop/kenya_nandi/20250625 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + crop_type_classification: + label: targets + tasks: + crop_type_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Coffee + - Trees + - Grassland + - Maize + - Sugarcane + - Tea + - Water + - Built-up + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + test_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: val + train_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: train + val_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: val + cropland_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 16 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: [] + sentinel2_1: [] + sentinel2_10: [] + sentinel2_11: [] + sentinel2_2: [] + sentinel2_3: [] + sentinel2_4: [] + sentinel2_5: [] + sentinel2_6: [] + sentinel2_7: [] + sentinel2_8: [] + sentinel2_9: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + sentinel1_0: [] + sentinel1_1: [] + sentinel1_10: [] + sentinel1_11: [] + sentinel1_2: [] + sentinel1_3: [] + sentinel1_4: [] + sentinel1_5: [] + sentinel1_6: [] + sentinel1_7: [] + sentinel1_8: [] + sentinel1_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.pad.Pad + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + mode: center + size: 8 + inputs: + label: + data_type: vector + is_target: true + layers: + - label + sentinel1_0: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1 + passthrough: true + sentinel1_1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.1 + passthrough: true + sentinel1_10: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.10 + passthrough: true + sentinel1_11: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.11 + passthrough: true + sentinel1_2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.2 + passthrough: true + sentinel1_3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.3 + passthrough: true + sentinel1_4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.4 + passthrough: true + sentinel1_5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.5 + passthrough: true + sentinel1_6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.6 + passthrough: true + sentinel1_7: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.7 + passthrough: true + sentinel1_8: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.8 + passthrough: true + sentinel1_9: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.9 + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/crop/worldcereal_cropland/20250626 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + cropland_classification: + label: targets + tasks: + cropland_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Cropland + - Non-Cropland + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + test_config: + groups: + - h3_sample100_66K + tags: + split: val + train_config: + groups: + - h3_sample100_66K + tags: + split: train + val_config: + groups: + - h3_sample100_66K + tags: + split: val + detect_satlas_marine_infra: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/marine_infra/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_marine_infra: + targets: targets + tasks: + detect_satlas_marine_infra: + class_path: rslp.satlas.train.MarineInfraTask + init_args: + box_size: 15 + classes: + - unknown + - platform + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + - - 0.1 + - - 0.2 + - - 0.3 + - - 0.4 + - - 0.5 + - - 0.6 + - - 0.7 + - - 0.8 + - - 0.9 + image_bands: + - 2 + - 1 + - 0 + property_name: category + remap_values: + - - 0 + - 0.25 + - - 0 + - 255 + skip_unknown_categories: true + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 65536 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_satlas_marine_infra + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + val_config: + patch_size: 128 + tags: + split: val + detect_satlas_wind_turbine: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + s25: [] + s26: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + landsat5: [] + landsat6: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + s1a5: [] + s1a6: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + landsat5: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.4 + passthrough: true + landsat6: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.5 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1a5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.4 + passthrough: true + s1a6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.5 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s1d5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.4 + passthrough: true + s1d6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.5 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + s25: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + s26: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/wind_turbine/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_wind_turbine: + targets: targets + tasks: + detect_satlas_wind_turbine: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 65536 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + s25: [] + s26: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + landsat5: [] + landsat6: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + s1a5: [] + s1a6: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_satlas_wind_turbine + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + val_config: + patch_size: 128 + tags: + split: val + detect_sentinel1_vessels: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/sentinel1_vessels/dataset_v1/20250602/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_sentinel1_vessels: + targets: targets + tasks: + detect_sentinel1_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + image_bands: + - 1 + - 1 + - 1 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.5 + test_config: + groups: + - val_ascending + - val_descending + patch_size: 128 + train_config: + groups: + - train_ascending + - train_descending + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 32768 + replacement: true + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_sentinel1_vessels + image_selectors: + - image + - sentinel1 + val_config: + groups: + - val_ascending + - val_descending + patch_size: 128 + detect_sentinel2_vessels: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/sentinel2_vessels/dataset_v1/20250213/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_sentinel2_vessels: + targets: targets + tasks: + detect_sentinel2_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + groups: + - sargassum_val + - split1 + - split7 + patch_size: 128 + train_config: + groups: + - sargassum_train + - split2 + - split3 + - split4 + - split5 + - split6 + - train + - train-bg + - train2 + - train3 + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 131072 + replacement: true + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_sentinel2_vessels + image_selectors: + - image + - sentinel2_l2a + val_config: + groups: + - sargassum_val + - split1 + - split7 + patch_size: 128 + segment: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 2 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_1: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_10: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_11: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_2: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_3: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_4: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_5: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_6: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_7: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_8: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_9: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1d_0: [] + s1d_1: [] + s1d_10: [] + s1d_11: [] + s1d_2: [] + s1d_3: [] + s1d_4: [] + s1d_5: [] + s1d_6: [] + s1d_7: [] + s1d_8: [] + s1d_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + s1d_0: + bands: + - vv + - vh + data_type: raster + layers: + - s1d + passthrough: true + s1d_1: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.1 + passthrough: true + s1d_10: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.10 + passthrough: true + s1d_11: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.11 + passthrough: true + s1d_2: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.2 + passthrough: true + s1d_3: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.3 + passthrough: true + s1d_4: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.4 + passthrough: true + s1d_5: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.5 + passthrough: true + s1d_6: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.6 + passthrough: true + s1d_7: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.7 + passthrough: true + s1d_8: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.8 + passthrough: true + s1d_9: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.9 + passthrough: true + targets: + bands: + - class + data_type: raster + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/pastis/rslearn_dataset/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + segment: + targets: targets + tasks: + segment: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_miou_metric: true + metric_kwargs: + average: micro + num_classes: 20 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + zero_is_invalid: true + test_config: + groups: + - fold5 + train_config: + groups: + - fold1 + - fold2 + - fold3 + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_1: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_10: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_11: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_2: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_3: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_4: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_5: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_6: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_7: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_8: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_9: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1d_0: [] + s1d_1: [] + s1d_10: [] + s1d_11: [] + s1d_2: [] + s1d_3: [] + s1d_4: [] + s1d_5: [] + s1d_6: [] + s1d_7: [] + s1d_8: [] + s1d_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + - target/segment/classes + - target/segment/valid + val_config: + groups: + - fold4 + segment_satlas_solar_farm: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + targets: + bands: + - label + data_type: raster + dtype: INT32 + is_target: true + layers: + - label_raster + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/solar_farm/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + segment_satlas_solar_farm: + targets: targets + tasks: + segment_satlas_solar_farm: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_f1_metric: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + metric_kwargs: + average: micro + num_classes: 2 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 16384 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - target/segment_satlas_solar_farm/classes + - target/segment_satlas_solar_farm/valid + val_config: + patch_size: 128 + tags: + split: val + vessel_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 16 + default_config: + transforms: + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + label: + data_type: vector + is_target: true + layers: + - label + landsat: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/landsat_vessel_detection/classifier/dataset_20250624 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + vessel_classification: + label: targets + tasks: + vessel_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + allow_invalid: true + classes: + - correct + - incorrect + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: label + skip_unknown_categories: true + test_config: + groups: + - phase2a_completed + tags: + split: val + train_config: + groups: + - selected_copy + - phase2a_completed + - phase3a_selected + tags: + split: train + val_config: + groups: + - phase2a_completed + tags: + split: val + vessel_detection: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/landsat_vessel_detection/detector/dataset_20250624 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + vessel_detection: + targets: targets + tasks: + vessel_detection: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.7 + test_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: val + train_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: train + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + val_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: val + num_workers: 16 + refill_batches: true + sample_mode: random_cycle +model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.0001 + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + decoder_to_target: + ClassificationHead: + - vessel_classification + - crop_type_classification + - cropland_classification + FasterRCNN: + - vessel_detection + - detect_satlas_marine_infra + - detect_satlas_wind_turbine + - detect_sentinel1_vessels + - detect_sentinel2_vessels + SegmentationHead: + - segment + - segment_satlas_solar_farm + decoders: + ClassificationHead: + - class_path: rslearn.models.pooling_decoder.PoolingDecoder + init_args: + in_channels: 768 + out_channels: 12 + - class_path: rslearn.train.tasks.classification.ClassificationHead + FasterRCNN: + - class_path: rslearn.models.faster_rcnn.FasterRCNN + init_args: + anchor_sizes: + - - 32 + downsample_factors: + - 8 + num_channels: 768 + num_classes: 8 + SegmentationHead: + - class_path: rslearn.models.unet.UNetDecoder + init_args: + conv_layers_per_resolution: 2 + in_channels: + - - 8 + - 768 + num_channels: + 1: 128 + 2: 256 + 4: 512 + 8: 512 + out_channels: 22 + - class_path: rslearn.train.tasks.segmentation.SegmentationHead + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_lora_kwargs: + gen_hidden: 64 + task_lora_indices: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 10 + - 11 + use_task_lora: true + task_moe_kwargs: + add_noise: true + compute_slots_from_task: true + expert_mult: 4 + noise_mult: 0.2 + num_experts: 4 + num_slots: 4 + task_moe_indices: + - 9 + - 10 + - 11 + use_task_moe: true + selector: + - encoder + task_embed_opts: + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt + type: precomputed + lazy_decode: true + task_label_offsets: + crop_type_classification: + num_outputs: 8 + offset: 2 + outputs_key: class + cropland_classification: + num_outputs: 2 + offset: 10 + outputs_key: class + detect_satlas_marine_infra: + num_outputs: 3 + offset: 2 + outputs_key: labels + detect_satlas_wind_turbine: + num_outputs: 3 + offset: 5 + outputs_key: labels + detect_sentinel1_vessels: + num_outputs: 2 + offset: 0 + outputs_key: labels + detect_sentinel2_vessels: + num_outputs: 2 + offset: 0 + outputs_key: labels + segment: + num_outputs: 20 + offset: 0 + outputs_key: classes + segment_satlas_solar_farm: + num_outputs: 2 + offset: 20 + outputs_key: classes + vessel_classification: + num_outputs: 2 + offset: 0 + outputs_key: class + vessel_detection: + num_outputs: 2 + offset: 0 + outputs_key: labels + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 100 + eta_min: 0 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + crop_type_classification: + label: targets + cropland_classification: + label: targets + detect_satlas_marine_infra: + targets: targets + detect_satlas_wind_turbine: + targets: targets + detect_sentinel1_vessels: + targets: targets + detect_sentinel2_vessels: + targets: targets + segment: + targets: targets + segment_satlas_solar_farm: + targets: targets + vessel_classification: + label: targets + vessel_detection: + targets: targets + tasks: + crop_type_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Coffee + - Trees + - Grassland + - Maize + - Sugarcane + - Tea + - Water + - Built-up + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + cropland_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Cropland + - Non-Cropland + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + detect_satlas_marine_infra: + class_path: rslp.satlas.train.MarineInfraTask + init_args: + box_size: 15 + classes: + - unknown + - platform + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + - - 0.1 + - - 0.2 + - - 0.3 + - - 0.4 + - - 0.5 + - - 0.6 + - - 0.7 + - - 0.8 + - - 0.9 + image_bands: + - 2 + - 1 + - 0 + property_name: category + remap_values: + - - 0 + - 0.25 + - - 0 + - 255 + skip_unknown_categories: true + detect_satlas_wind_turbine: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + detect_sentinel1_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + image_bands: + - 1 + - 1 + - 1 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.5 + detect_sentinel2_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + segment: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_miou_metric: true + metric_kwargs: + average: micro + num_classes: 20 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + zero_is_invalid: true + segment_satlas_solar_farm: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_f1_metric: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + metric_kwargs: + average: micro + num_classes: 2 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + vessel_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + allow_invalid: true + classes: + - correct + - incorrect + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: label + skip_unknown_categories: true + vessel_detection: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.7 +rslp_experiment: placeholder +rslp_project: placeholder +trainer: + accumulate_grad_batches: 10 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: epoch + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + every_n_epochs: 10 + mode: min + monitor: val_loss + save_last: true + save_top_k: 1 + - class_path: rslearn.train.callbacks.adapters.ActivateLayers + init_args: + selectors: + - at_epoch: 10 + name: lora + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 0 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - moe + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 10 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - lora + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 50 + freeze_selectors: [] + scale_existing_groups: 0.1 + unfreeze_lr_factor: 10 + unfreeze_selectors: + - head + - encoder + max_epochs: 100 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_29_lora_moe/all.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_29_lora_moe/all.yaml new file mode 100644 index 00000000..a993c428 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_29_lora_moe/all.yaml @@ -0,0 +1,39 @@ +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_29_lora_moe/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_29_lora_moe/OUT_all.yaml + +dataset_cfgs: + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_classifier_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_nandi_crop_type/finetune_s1_s2_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_worldcereal_cropland/finetune_s1_s2_cosinelr.yaml + + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_pastis/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_pastis/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_solar_farm_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_solar_farm_128/basecfg_helios_mm.yaml + + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_detector_cosinelr.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_marine_infra_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_marine_infra_128/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_wind_turbine_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_wind_turbine_128/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_helios.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel2_vessels_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel2_vessels_128/basecfg_helios.yaml + +substitutions: + patch_size: 8 + encoder_embedding_size: 768 + helios_checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + +global_overrides: + model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + trainer: + accumulate_grad_batches: 10 + +merge_options: + merge_heads: true + merge_task_labels: true + same_label_groups: + - [detect_sentinel1_vessels, detect_sentinel2_vessels, vessel_detection] \ No newline at end of file diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_29_lora_moe/base.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_29_lora_moe/base.yaml new file mode 100644 index 00000000..b9556918 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_29_lora_moe/base.yaml @@ -0,0 +1,92 @@ +model: + class_path: rslp.helios.lightning_module.MoELightningModule + init_args: + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: "{CHECKPOINT_PATH}" + selector: ["encoder"] + forward_kwargs: + patch_size: {PATCH_SIZE} + model_overrides: + encoder_config: + task_lora_kwargs: + use_task_lora: true + task_lora_indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] + gen_hidden: 64 + task_moe_kwargs: + use_task_moe: true + task_moe_indices: [9, 10, 11] + add_noise: true + noise_mult: 0.2 + num_experts: 4 + num_slots: 4 + expert_mult: 4 + compute_slots_from_task: true + task_embed_opts: + type: "precomputed" + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt + decoders: # Filled in by make_multidataset_config.py + lazy_decode: true + lr: 0.0001 + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 100 + eta_min: 0 + +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + sample_mode: random_cycle + refill_batches: true + num_workers: 16 + data_modules: # Filled in by make_multidataset_config.py + +trainer: + max_epochs: 100 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: "epoch" + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + save_top_k: 1 + every_n_epochs: 10 + save_last: true + monitor: val_loss + mode: min + - class_path: rslearn.train.callbacks.adapters.ActivateLayers + init_args: + selectors: + - name: lora + at_epoch: 10 + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 0 + freeze_selectors: ["encoder"] + unfreeze_selectors: ["head", "moe"] + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 10 + freeze_selectors: ["encoder"] + unfreeze_selectors: ["head", "lora"] + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 50 + freeze_selectors: [] + unfreeze_selectors: ["head", "encoder"] + unfreeze_lr_factor: 10 + scale_existing_groups: 0.1 + + +rslp_project: placeholder +rslp_experiment: placeholder + +all_dataset_info_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v3_multitask/all_dataset_info.yaml \ No newline at end of file diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_29_lora_moe/exp_id.txt b/one_off_projects/2025_07_joint_finetune/configs/2025_08_29_lora_moe/exp_id.txt new file mode 100644 index 00000000..9f069320 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_29_lora_moe/exp_id.txt @@ -0,0 +1 @@ +{task}_lora_moe \ No newline at end of file diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_29_lora_moe_pcgrad/OUT_all.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_29_lora_moe_pcgrad/OUT_all.yaml new file mode 100644 index 00000000..a25564f1 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_29_lora_moe_pcgrad/OUT_all.yaml @@ -0,0 +1,4086 @@ +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + batch_sizes: + crop_type_classification: 32 + cropland_classification: 16 + detect_satlas_marine_infra: 8 + detect_satlas_wind_turbine: 8 + detect_sentinel1_vessels: 8 + detect_sentinel2_vessels: 8 + segment: 2 + segment_satlas_solar_farm: 8 + vessel_classification: 16 + vessel_detection: 8 + data_modules: + crop_type_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 32 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: [] + sentinel2_1: [] + sentinel2_10: [] + sentinel2_11: [] + sentinel2_2: [] + sentinel2_3: [] + sentinel2_4: [] + sentinel2_5: [] + sentinel2_6: [] + sentinel2_7: [] + sentinel2_8: [] + sentinel2_9: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + sentinel1_0: [] + sentinel1_1: [] + sentinel1_10: [] + sentinel1_11: [] + sentinel1_2: [] + sentinel1_3: [] + sentinel1_4: [] + sentinel1_5: [] + sentinel1_6: [] + sentinel1_7: [] + sentinel1_8: [] + sentinel1_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.pad.Pad + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + mode: center + size: 8 + inputs: + label: + data_type: vector + is_target: true + layers: + - label + sentinel1_0: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + sentinel1_1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + sentinel1_10: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.10 + passthrough: true + sentinel1_11: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.11 + passthrough: true + sentinel1_2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + sentinel1_3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + sentinel1_4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.4 + passthrough: true + sentinel1_5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.5 + passthrough: true + sentinel1_6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.6 + passthrough: true + sentinel1_7: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.7 + passthrough: true + sentinel1_8: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.8 + passthrough: true + sentinel1_9: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.9 + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/crop/kenya_nandi/20250625 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + crop_type_classification: + label: targets + tasks: + crop_type_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Coffee + - Trees + - Grassland + - Maize + - Sugarcane + - Tea + - Water + - Built-up + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + test_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: val + train_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: train + val_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: val + cropland_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 16 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: [] + sentinel2_1: [] + sentinel2_10: [] + sentinel2_11: [] + sentinel2_2: [] + sentinel2_3: [] + sentinel2_4: [] + sentinel2_5: [] + sentinel2_6: [] + sentinel2_7: [] + sentinel2_8: [] + sentinel2_9: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + sentinel1_0: [] + sentinel1_1: [] + sentinel1_10: [] + sentinel1_11: [] + sentinel1_2: [] + sentinel1_3: [] + sentinel1_4: [] + sentinel1_5: [] + sentinel1_6: [] + sentinel1_7: [] + sentinel1_8: [] + sentinel1_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.pad.Pad + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + mode: center + size: 8 + inputs: + label: + data_type: vector + is_target: true + layers: + - label + sentinel1_0: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1 + passthrough: true + sentinel1_1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.1 + passthrough: true + sentinel1_10: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.10 + passthrough: true + sentinel1_11: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.11 + passthrough: true + sentinel1_2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.2 + passthrough: true + sentinel1_3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.3 + passthrough: true + sentinel1_4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.4 + passthrough: true + sentinel1_5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.5 + passthrough: true + sentinel1_6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.6 + passthrough: true + sentinel1_7: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.7 + passthrough: true + sentinel1_8: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.8 + passthrough: true + sentinel1_9: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.9 + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/crop/worldcereal_cropland/20250626 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + cropland_classification: + label: targets + tasks: + cropland_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Cropland + - Non-Cropland + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + test_config: + groups: + - h3_sample100_66K + tags: + split: val + train_config: + groups: + - h3_sample100_66K + tags: + split: train + val_config: + groups: + - h3_sample100_66K + tags: + split: val + detect_satlas_marine_infra: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/marine_infra/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_marine_infra: + targets: targets + tasks: + detect_satlas_marine_infra: + class_path: rslp.satlas.train.MarineInfraTask + init_args: + box_size: 15 + classes: + - unknown + - platform + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + - - 0.1 + - - 0.2 + - - 0.3 + - - 0.4 + - - 0.5 + - - 0.6 + - - 0.7 + - - 0.8 + - - 0.9 + image_bands: + - 2 + - 1 + - 0 + property_name: category + remap_values: + - - 0 + - 0.25 + - - 0 + - 255 + skip_unknown_categories: true + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 65536 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_satlas_marine_infra + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + val_config: + patch_size: 128 + tags: + split: val + detect_satlas_wind_turbine: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + s25: [] + s26: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + landsat5: [] + landsat6: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + s1a5: [] + s1a6: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + landsat5: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.4 + passthrough: true + landsat6: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.5 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1a5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.4 + passthrough: true + s1a6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.5 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s1d5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.4 + passthrough: true + s1d6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.5 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + s25: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + s26: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/wind_turbine/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_wind_turbine: + targets: targets + tasks: + detect_satlas_wind_turbine: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 65536 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + s25: [] + s26: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + landsat5: [] + landsat6: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + s1a5: [] + s1a6: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_satlas_wind_turbine + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + val_config: + patch_size: 128 + tags: + split: val + detect_sentinel1_vessels: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/sentinel1_vessels/dataset_v1/20250602/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_sentinel1_vessels: + targets: targets + tasks: + detect_sentinel1_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + image_bands: + - 1 + - 1 + - 1 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.5 + test_config: + groups: + - val_ascending + - val_descending + patch_size: 128 + train_config: + groups: + - train_ascending + - train_descending + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 32768 + replacement: true + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_sentinel1_vessels + image_selectors: + - image + - sentinel1 + val_config: + groups: + - val_ascending + - val_descending + patch_size: 128 + detect_sentinel2_vessels: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/sentinel2_vessels/dataset_v1/20250213/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_sentinel2_vessels: + targets: targets + tasks: + detect_sentinel2_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + groups: + - sargassum_val + - split1 + - split7 + patch_size: 128 + train_config: + groups: + - sargassum_train + - split2 + - split3 + - split4 + - split5 + - split6 + - train + - train-bg + - train2 + - train3 + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 131072 + replacement: true + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_sentinel2_vessels + image_selectors: + - image + - sentinel2_l2a + val_config: + groups: + - sargassum_val + - split1 + - split7 + patch_size: 128 + segment: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 2 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_1: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_10: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_11: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_2: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_3: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_4: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_5: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_6: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_7: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_8: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_9: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1d_0: [] + s1d_1: [] + s1d_10: [] + s1d_11: [] + s1d_2: [] + s1d_3: [] + s1d_4: [] + s1d_5: [] + s1d_6: [] + s1d_7: [] + s1d_8: [] + s1d_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + s1d_0: + bands: + - vv + - vh + data_type: raster + layers: + - s1d + passthrough: true + s1d_1: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.1 + passthrough: true + s1d_10: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.10 + passthrough: true + s1d_11: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.11 + passthrough: true + s1d_2: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.2 + passthrough: true + s1d_3: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.3 + passthrough: true + s1d_4: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.4 + passthrough: true + s1d_5: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.5 + passthrough: true + s1d_6: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.6 + passthrough: true + s1d_7: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.7 + passthrough: true + s1d_8: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.8 + passthrough: true + s1d_9: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.9 + passthrough: true + targets: + bands: + - class + data_type: raster + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/pastis/rslearn_dataset/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + segment: + targets: targets + tasks: + segment: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_miou_metric: true + metric_kwargs: + average: micro + num_classes: 20 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + zero_is_invalid: true + test_config: + groups: + - fold5 + train_config: + groups: + - fold1 + - fold2 + - fold3 + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_1: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_10: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_11: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_2: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_3: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_4: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_5: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_6: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_7: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_8: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_9: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1d_0: [] + s1d_1: [] + s1d_10: [] + s1d_11: [] + s1d_2: [] + s1d_3: [] + s1d_4: [] + s1d_5: [] + s1d_6: [] + s1d_7: [] + s1d_8: [] + s1d_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + - target/segment/classes + - target/segment/valid + val_config: + groups: + - fold4 + segment_satlas_solar_farm: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + targets: + bands: + - label + data_type: raster + dtype: INT32 + is_target: true + layers: + - label_raster + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/solar_farm/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + segment_satlas_solar_farm: + targets: targets + tasks: + segment_satlas_solar_farm: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_f1_metric: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + metric_kwargs: + average: micro + num_classes: 2 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 16384 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - target/segment_satlas_solar_farm/classes + - target/segment_satlas_solar_farm/valid + val_config: + patch_size: 128 + tags: + split: val + vessel_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 16 + default_config: + transforms: + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + label: + data_type: vector + is_target: true + layers: + - label + landsat: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/landsat_vessel_detection/classifier/dataset_20250624 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + vessel_classification: + label: targets + tasks: + vessel_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + allow_invalid: true + classes: + - correct + - incorrect + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: label + skip_unknown_categories: true + test_config: + groups: + - phase2a_completed + tags: + split: val + train_config: + groups: + - selected_copy + - phase2a_completed + - phase3a_selected + tags: + split: train + val_config: + groups: + - phase2a_completed + tags: + split: val + vessel_detection: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/landsat_vessel_detection/detector/dataset_20250624 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + vessel_detection: + targets: targets + tasks: + vessel_detection: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.7 + test_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: val + train_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: train + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + val_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: val + num_workers: 16 + refill_batches: true + sample_mode: random_cycle +model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.0001 + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + decoder_to_target: + ClassificationHead: + - vessel_classification + - crop_type_classification + - cropland_classification + FasterRCNN: + - vessel_detection + - detect_satlas_marine_infra + - detect_satlas_wind_turbine + - detect_sentinel1_vessels + - detect_sentinel2_vessels + SegmentationHead: + - segment + - segment_satlas_solar_farm + decoders: + ClassificationHead: + - class_path: rslearn.models.pooling_decoder.PoolingDecoder + init_args: + in_channels: 768 + out_channels: 12 + - class_path: rslearn.train.tasks.classification.ClassificationHead + FasterRCNN: + - class_path: rslearn.models.faster_rcnn.FasterRCNN + init_args: + anchor_sizes: + - - 32 + downsample_factors: + - 8 + num_channels: 768 + num_classes: 8 + SegmentationHead: + - class_path: rslearn.models.unet.UNetDecoder + init_args: + conv_layers_per_resolution: 2 + in_channels: + - - 8 + - 768 + num_channels: + 1: 128 + 2: 256 + 4: 512 + 8: 512 + out_channels: 22 + - class_path: rslearn.train.tasks.segmentation.SegmentationHead + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_lora_kwargs: + gen_hidden: 64 + task_lora_indices: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 10 + - 11 + use_task_lora: true + task_moe_kwargs: + add_noise: true + compute_slots_from_task: true + expert_mult: 4 + noise_mult: 0.2 + num_experts: 4 + num_slots: 4 + task_moe_indices: + - 9 + - 10 + - 11 + use_task_moe: true + selector: + - encoder + task_embed_opts: + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt + type: precomputed + lazy_decode: true + task_label_offsets: + crop_type_classification: + num_outputs: 8 + offset: 2 + outputs_key: class + cropland_classification: + num_outputs: 2 + offset: 10 + outputs_key: class + detect_satlas_marine_infra: + num_outputs: 3 + offset: 2 + outputs_key: labels + detect_satlas_wind_turbine: + num_outputs: 3 + offset: 5 + outputs_key: labels + detect_sentinel1_vessels: + num_outputs: 2 + offset: 0 + outputs_key: labels + detect_sentinel2_vessels: + num_outputs: 2 + offset: 0 + outputs_key: labels + segment: + num_outputs: 20 + offset: 0 + outputs_key: classes + segment_satlas_solar_farm: + num_outputs: 2 + offset: 20 + outputs_key: classes + vessel_classification: + num_outputs: 2 + offset: 0 + outputs_key: class + vessel_detection: + num_outputs: 2 + offset: 0 + outputs_key: labels + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 100 + eta_min: 0 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + crop_type_classification: + label: targets + cropland_classification: + label: targets + detect_satlas_marine_infra: + targets: targets + detect_satlas_wind_turbine: + targets: targets + detect_sentinel1_vessels: + targets: targets + detect_sentinel2_vessels: + targets: targets + segment: + targets: targets + segment_satlas_solar_farm: + targets: targets + vessel_classification: + label: targets + vessel_detection: + targets: targets + tasks: + crop_type_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Coffee + - Trees + - Grassland + - Maize + - Sugarcane + - Tea + - Water + - Built-up + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + cropland_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Cropland + - Non-Cropland + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + detect_satlas_marine_infra: + class_path: rslp.satlas.train.MarineInfraTask + init_args: + box_size: 15 + classes: + - unknown + - platform + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + - - 0.1 + - - 0.2 + - - 0.3 + - - 0.4 + - - 0.5 + - - 0.6 + - - 0.7 + - - 0.8 + - - 0.9 + image_bands: + - 2 + - 1 + - 0 + property_name: category + remap_values: + - - 0 + - 0.25 + - - 0 + - 255 + skip_unknown_categories: true + detect_satlas_wind_turbine: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + detect_sentinel1_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + image_bands: + - 1 + - 1 + - 1 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.5 + detect_sentinel2_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + segment: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_miou_metric: true + metric_kwargs: + average: micro + num_classes: 20 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + zero_is_invalid: true + segment_satlas_solar_farm: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_f1_metric: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + metric_kwargs: + average: micro + num_classes: 2 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + vessel_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + allow_invalid: true + classes: + - correct + - incorrect + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: label + skip_unknown_categories: true + vessel_detection: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.7 +rslp_experiment: placeholder +rslp_project: placeholder +trainer: + accumulate_grad_batches: 10 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: epoch + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + every_n_epochs: 10 + mode: min + monitor: val_loss + save_last: true + save_top_k: 1 + - class_path: rslearn.train.callbacks.adapters.ActivateLayers + init_args: + selectors: + - at_epoch: 10 + name: lora + - class_path: rslearn.train.callbacks.gradients.MiniPCGrad + init_args: + selectors: + - encoder + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 0 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - moe + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 10 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - lora + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 50 + freeze_selectors: [] + scale_existing_groups: 0.1 + unfreeze_lr_factor: 10 + unfreeze_selectors: + - head + - encoder + max_epochs: 100 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_29_lora_moe_pcgrad/all.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_29_lora_moe_pcgrad/all.yaml new file mode 100644 index 00000000..7c552561 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_29_lora_moe_pcgrad/all.yaml @@ -0,0 +1,39 @@ +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_29_lora_moe_pcgrad/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_29_lora_moe_pcgrad/OUT_all.yaml + +dataset_cfgs: + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_classifier_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_nandi_crop_type/finetune_s1_s2_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_worldcereal_cropland/finetune_s1_s2_cosinelr.yaml + + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_pastis/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_pastis/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_solar_farm_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_solar_farm_128/basecfg_helios_mm.yaml + + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_detector_cosinelr.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_marine_infra_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_marine_infra_128/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_wind_turbine_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_wind_turbine_128/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_helios.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel2_vessels_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel2_vessels_128/basecfg_helios.yaml + +substitutions: + patch_size: 8 + encoder_embedding_size: 768 + helios_checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + +global_overrides: + model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + trainer: + accumulate_grad_batches: 10 + +merge_options: + merge_heads: true + merge_task_labels: true + same_label_groups: + - [detect_sentinel1_vessels, detect_sentinel2_vessels, vessel_detection] \ No newline at end of file diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_29_lora_moe_pcgrad/base.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_29_lora_moe_pcgrad/base.yaml new file mode 100644 index 00000000..aef6efd4 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_29_lora_moe_pcgrad/base.yaml @@ -0,0 +1,94 @@ +model: + class_path: rslp.helios.lightning_module.MoELightningModule + init_args: + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: "{CHECKPOINT_PATH}" + selector: ["encoder"] + forward_kwargs: + patch_size: {PATCH_SIZE} + model_overrides: + encoder_config: + task_lora_kwargs: + use_task_lora: true + task_lora_indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] + gen_hidden: 64 + task_moe_kwargs: + use_task_moe: true + task_moe_indices: [9, 10, 11] + add_noise: true + noise_mult: 0.2 + num_experts: 4 + num_slots: 4 + expert_mult: 4 + compute_slots_from_task: true + task_embed_opts: + type: "precomputed" + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt + decoders: # Filled in by make_multidataset_config.py + lazy_decode: true + lr: 0.0001 + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 100 + eta_min: 0 + +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + sample_mode: random_cycle + refill_batches: true + num_workers: 16 + data_modules: # Filled in by make_multidataset_config.py + +trainer: + max_epochs: 100 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: "epoch" + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + save_top_k: 1 + every_n_epochs: 10 + save_last: true + monitor: val_loss + mode: min + - class_path: rslearn.train.callbacks.adapters.ActivateLayers + init_args: + selectors: + - name: lora + at_epoch: 10 + - class_path: rslearn.train.callbacks.gradients.MiniPCGrad + init_args: + selectors: ["encoder"] + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 0 + freeze_selectors: ["encoder"] + unfreeze_selectors: ["head", "moe"] + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 10 + freeze_selectors: ["encoder"] + unfreeze_selectors: ["head", "lora"] + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 50 + freeze_selectors: [] + unfreeze_selectors: ["head", "encoder"] + unfreeze_lr_factor: 10 + scale_existing_groups: 0.1 + +rslp_project: placeholder +rslp_experiment: placeholder + +all_dataset_info_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v3_multitask/all_dataset_info.yaml \ No newline at end of file diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_29_lora_moe_pcgrad/exp_id.txt b/one_off_projects/2025_07_joint_finetune/configs/2025_08_29_lora_moe_pcgrad/exp_id.txt new file mode 100644 index 00000000..b288e410 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_29_lora_moe_pcgrad/exp_id.txt @@ -0,0 +1 @@ +{task}_lora_moe_pcgrad \ No newline at end of file diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_31_moe_decoder/OUT_all.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_31_moe_decoder/OUT_all.yaml new file mode 100644 index 00000000..4dec1f0e --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_31_moe_decoder/OUT_all.yaml @@ -0,0 +1,4086 @@ +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + batch_sizes: + crop_type_classification: 32 + cropland_classification: 16 + detect_satlas_marine_infra: 8 + detect_satlas_wind_turbine: 8 + detect_sentinel1_vessels: 8 + detect_sentinel2_vessels: 8 + segment: 2 + segment_satlas_solar_farm: 8 + vessel_classification: 16 + vessel_detection: 8 + data_modules: + crop_type_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 32 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: [] + sentinel2_1: [] + sentinel2_10: [] + sentinel2_11: [] + sentinel2_2: [] + sentinel2_3: [] + sentinel2_4: [] + sentinel2_5: [] + sentinel2_6: [] + sentinel2_7: [] + sentinel2_8: [] + sentinel2_9: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + sentinel1_0: [] + sentinel1_1: [] + sentinel1_10: [] + sentinel1_11: [] + sentinel1_2: [] + sentinel1_3: [] + sentinel1_4: [] + sentinel1_5: [] + sentinel1_6: [] + sentinel1_7: [] + sentinel1_8: [] + sentinel1_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.pad.Pad + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + mode: center + size: 8 + inputs: + label: + data_type: vector + is_target: true + layers: + - label + sentinel1_0: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + sentinel1_1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + sentinel1_10: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.10 + passthrough: true + sentinel1_11: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.11 + passthrough: true + sentinel1_2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + sentinel1_3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + sentinel1_4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.4 + passthrough: true + sentinel1_5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.5 + passthrough: true + sentinel1_6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.6 + passthrough: true + sentinel1_7: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.7 + passthrough: true + sentinel1_8: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.8 + passthrough: true + sentinel1_9: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.9 + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/crop/kenya_nandi/20250625 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + crop_type_classification: + label: targets + tasks: + crop_type_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Coffee + - Trees + - Grassland + - Maize + - Sugarcane + - Tea + - Water + - Built-up + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + test_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: val + train_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: train + val_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: val + cropland_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 16 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: [] + sentinel2_1: [] + sentinel2_10: [] + sentinel2_11: [] + sentinel2_2: [] + sentinel2_3: [] + sentinel2_4: [] + sentinel2_5: [] + sentinel2_6: [] + sentinel2_7: [] + sentinel2_8: [] + sentinel2_9: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + sentinel1_0: [] + sentinel1_1: [] + sentinel1_10: [] + sentinel1_11: [] + sentinel1_2: [] + sentinel1_3: [] + sentinel1_4: [] + sentinel1_5: [] + sentinel1_6: [] + sentinel1_7: [] + sentinel1_8: [] + sentinel1_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.pad.Pad + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + mode: center + size: 8 + inputs: + label: + data_type: vector + is_target: true + layers: + - label + sentinel1_0: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1 + passthrough: true + sentinel1_1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.1 + passthrough: true + sentinel1_10: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.10 + passthrough: true + sentinel1_11: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.11 + passthrough: true + sentinel1_2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.2 + passthrough: true + sentinel1_3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.3 + passthrough: true + sentinel1_4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.4 + passthrough: true + sentinel1_5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.5 + passthrough: true + sentinel1_6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.6 + passthrough: true + sentinel1_7: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.7 + passthrough: true + sentinel1_8: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.8 + passthrough: true + sentinel1_9: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.9 + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/crop/worldcereal_cropland/20250626 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + cropland_classification: + label: targets + tasks: + cropland_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Cropland + - Non-Cropland + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + test_config: + groups: + - h3_sample100_66K + tags: + split: val + train_config: + groups: + - h3_sample100_66K + tags: + split: train + val_config: + groups: + - h3_sample100_66K + tags: + split: val + detect_satlas_marine_infra: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/marine_infra/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_marine_infra: + targets: targets + tasks: + detect_satlas_marine_infra: + class_path: rslp.satlas.train.MarineInfraTask + init_args: + box_size: 15 + classes: + - unknown + - platform + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + - - 0.1 + - - 0.2 + - - 0.3 + - - 0.4 + - - 0.5 + - - 0.6 + - - 0.7 + - - 0.8 + - - 0.9 + image_bands: + - 2 + - 1 + - 0 + property_name: category + remap_values: + - - 0 + - 0.25 + - - 0 + - 255 + skip_unknown_categories: true + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 65536 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_satlas_marine_infra + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + val_config: + patch_size: 128 + tags: + split: val + detect_satlas_wind_turbine: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + s25: [] + s26: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + landsat5: [] + landsat6: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + s1a5: [] + s1a6: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + landsat5: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.4 + passthrough: true + landsat6: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.5 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1a5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.4 + passthrough: true + s1a6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.5 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s1d5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.4 + passthrough: true + s1d6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.5 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + s25: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + s26: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/wind_turbine/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_wind_turbine: + targets: targets + tasks: + detect_satlas_wind_turbine: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 65536 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + s25: [] + s26: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + landsat5: [] + landsat6: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + s1a5: [] + s1a6: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_satlas_wind_turbine + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + val_config: + patch_size: 128 + tags: + split: val + detect_sentinel1_vessels: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/sentinel1_vessels/dataset_v1/20250602/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_sentinel1_vessels: + targets: targets + tasks: + detect_sentinel1_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + image_bands: + - 1 + - 1 + - 1 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.5 + test_config: + groups: + - val_ascending + - val_descending + patch_size: 128 + train_config: + groups: + - train_ascending + - train_descending + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 32768 + replacement: true + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_sentinel1_vessels + image_selectors: + - image + - sentinel1 + val_config: + groups: + - val_ascending + - val_descending + patch_size: 128 + detect_sentinel2_vessels: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/sentinel2_vessels/dataset_v1/20250213/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_sentinel2_vessels: + targets: targets + tasks: + detect_sentinel2_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + groups: + - sargassum_val + - split1 + - split7 + patch_size: 128 + train_config: + groups: + - sargassum_train + - split2 + - split3 + - split4 + - split5 + - split6 + - train + - train-bg + - train2 + - train3 + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 131072 + replacement: true + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_sentinel2_vessels + image_selectors: + - image + - sentinel2_l2a + val_config: + groups: + - sargassum_val + - split1 + - split7 + patch_size: 128 + segment: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 2 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_1: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_10: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_11: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_2: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_3: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_4: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_5: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_6: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_7: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_8: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_9: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1d_0: [] + s1d_1: [] + s1d_10: [] + s1d_11: [] + s1d_2: [] + s1d_3: [] + s1d_4: [] + s1d_5: [] + s1d_6: [] + s1d_7: [] + s1d_8: [] + s1d_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + s1d_0: + bands: + - vv + - vh + data_type: raster + layers: + - s1d + passthrough: true + s1d_1: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.1 + passthrough: true + s1d_10: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.10 + passthrough: true + s1d_11: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.11 + passthrough: true + s1d_2: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.2 + passthrough: true + s1d_3: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.3 + passthrough: true + s1d_4: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.4 + passthrough: true + s1d_5: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.5 + passthrough: true + s1d_6: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.6 + passthrough: true + s1d_7: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.7 + passthrough: true + s1d_8: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.8 + passthrough: true + s1d_9: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.9 + passthrough: true + targets: + bands: + - class + data_type: raster + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/pastis/rslearn_dataset/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + segment: + targets: targets + tasks: + segment: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_miou_metric: true + metric_kwargs: + average: micro + num_classes: 20 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + zero_is_invalid: true + test_config: + groups: + - fold5 + train_config: + groups: + - fold1 + - fold2 + - fold3 + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_1: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_10: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_11: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_2: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_3: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_4: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_5: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_6: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_7: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_8: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_9: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1d_0: [] + s1d_1: [] + s1d_10: [] + s1d_11: [] + s1d_2: [] + s1d_3: [] + s1d_4: [] + s1d_5: [] + s1d_6: [] + s1d_7: [] + s1d_8: [] + s1d_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + - target/segment/classes + - target/segment/valid + val_config: + groups: + - fold4 + segment_satlas_solar_farm: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + targets: + bands: + - label + data_type: raster + dtype: INT32 + is_target: true + layers: + - label_raster + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/solar_farm/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + segment_satlas_solar_farm: + targets: targets + tasks: + segment_satlas_solar_farm: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_f1_metric: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + metric_kwargs: + average: micro + num_classes: 2 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 16384 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - target/segment_satlas_solar_farm/classes + - target/segment_satlas_solar_farm/valid + val_config: + patch_size: 128 + tags: + split: val + vessel_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 16 + default_config: + transforms: + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + label: + data_type: vector + is_target: true + layers: + - label + landsat: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/landsat_vessel_detection/classifier/dataset_20250624 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + vessel_classification: + label: targets + tasks: + vessel_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + allow_invalid: true + classes: + - correct + - incorrect + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: label + skip_unknown_categories: true + test_config: + groups: + - phase2a_completed + tags: + split: val + train_config: + groups: + - selected_copy + - phase2a_completed + - phase3a_selected + tags: + split: train + val_config: + groups: + - phase2a_completed + tags: + split: val + vessel_detection: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/landsat_vessel_detection/detector/dataset_20250624 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + vessel_detection: + targets: targets + tasks: + vessel_detection: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.7 + test_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: val + train_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: train + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + val_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: val + num_workers: 16 + refill_batches: true + sample_mode: random_cycle +model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.0001 + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + decoder_to_target: + ClassificationHead: + - vessel_classification + - crop_type_classification + - cropland_classification + FasterRCNN: + - vessel_detection + - detect_satlas_marine_infra + - detect_satlas_wind_turbine + - detect_sentinel1_vessels + - detect_sentinel2_vessels + SegmentationHead: + - segment + - segment_satlas_solar_farm + decoders: + ClassificationHead: + - class_path: rslearn.models.pooling_decoder.PoolingDecoder + init_args: + in_channels: 768 + out_channels: 12 + - class_path: rslearn.train.tasks.classification.ClassificationHead + FasterRCNN: + - class_path: rslearn.models.faster_rcnn.FasterRCNN + init_args: + anchor_sizes: + - - 32 + downsample_factors: + - 8 + num_channels: 768 + num_classes: 8 + SegmentationHead: + - class_path: rslearn.models.unet.UNetDecoder + init_args: + conv_layers_per_resolution: 2 + in_channels: + - - 8 + - 768 + num_channels: + 1: 128 + 2: 256 + 4: 512 + 8: 512 + out_channels: 22 + - class_path: rslearn.train.tasks.segmentation.SegmentationHead + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_lora_kwargs: + gen_hidden: 64 + task_lora_indices: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 10 + - 11 + use_task_lora: true + selector: + - encoder + task_embed_opts: + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct.pt + type: precomputed + lazy_decode: true + task_label_offsets: + crop_type_classification: + num_outputs: 8 + offset: 2 + outputs_key: class + cropland_classification: + num_outputs: 2 + offset: 10 + outputs_key: class + detect_satlas_marine_infra: + num_outputs: 3 + offset: 2 + outputs_key: labels + detect_satlas_wind_turbine: + num_outputs: 3 + offset: 5 + outputs_key: labels + detect_sentinel1_vessels: + num_outputs: 2 + offset: 0 + outputs_key: labels + detect_sentinel2_vessels: + num_outputs: 2 + offset: 0 + outputs_key: labels + segment: + num_outputs: 20 + offset: 0 + outputs_key: classes + segment_satlas_solar_farm: + num_outputs: 2 + offset: 20 + outputs_key: classes + vessel_classification: + num_outputs: 2 + offset: 0 + outputs_key: class + vessel_detection: + num_outputs: 2 + offset: 0 + outputs_key: labels + trunk: + class_path: rslearn.models.trunk.DecoderTrunk + init_args: + layers: + - class_path: rslp.helios.moe.MoETransformer + init_args: + dim: 768 + n_heads: 12 + n_layers: 1 + num_experts: 4 + num_slots: 4 + task_embedding: + class_path: rslearn.models.task_embedding.TaskChannelEmbedding + init_args: + add_spatial_embed: true + encoder_embedding_size: 768 + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 100 + eta_min: 0 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + crop_type_classification: + label: targets + cropland_classification: + label: targets + detect_satlas_marine_infra: + targets: targets + detect_satlas_wind_turbine: + targets: targets + detect_sentinel1_vessels: + targets: targets + detect_sentinel2_vessels: + targets: targets + segment: + targets: targets + segment_satlas_solar_farm: + targets: targets + vessel_classification: + label: targets + vessel_detection: + targets: targets + tasks: + crop_type_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Coffee + - Trees + - Grassland + - Maize + - Sugarcane + - Tea + - Water + - Built-up + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + cropland_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Cropland + - Non-Cropland + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + detect_satlas_marine_infra: + class_path: rslp.satlas.train.MarineInfraTask + init_args: + box_size: 15 + classes: + - unknown + - platform + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + - - 0.1 + - - 0.2 + - - 0.3 + - - 0.4 + - - 0.5 + - - 0.6 + - - 0.7 + - - 0.8 + - - 0.9 + image_bands: + - 2 + - 1 + - 0 + property_name: category + remap_values: + - - 0 + - 0.25 + - - 0 + - 255 + skip_unknown_categories: true + detect_satlas_wind_turbine: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + detect_sentinel1_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + image_bands: + - 1 + - 1 + - 1 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.5 + detect_sentinel2_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + segment: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_miou_metric: true + metric_kwargs: + average: micro + num_classes: 20 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + zero_is_invalid: true + segment_satlas_solar_farm: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_f1_metric: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + metric_kwargs: + average: micro + num_classes: 2 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + vessel_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + allow_invalid: true + classes: + - correct + - incorrect + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: label + skip_unknown_categories: true + vessel_detection: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.7 +rslp_experiment: placeholder +rslp_project: placeholder +trainer: + accumulate_grad_batches: 10 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: epoch + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + every_n_epochs: 10 + mode: min + monitor: val_loss + save_last: true + save_top_k: 1 + - class_path: rslearn.train.callbacks.adapters.ActivateLayers + init_args: + selectors: + - at_epoch: 20 + name: lora + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 0 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - moe + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 20 + freeze_selectors: + - encoder + unfreeze_lr_factor: 10 + unfreeze_selectors: + - head + - lora + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 30 + freeze_selectors: [] + unfreeze_lr_factor: 2 + unfreeze_selectors: + - head + - encoder + max_epochs: 100 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_31_moe_decoder/all.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_31_moe_decoder/all.yaml new file mode 100644 index 00000000..b3f90f88 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_31_moe_decoder/all.yaml @@ -0,0 +1,58 @@ +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_31_moe_decoder/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_31_moe_decoder/OUT_all.yaml + +dataset_cfgs: + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_classifier_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_nandi_crop_type/finetune_s1_s2_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_worldcereal_cropland/finetune_s1_s2_cosinelr.yaml + + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_pastis/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_pastis/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_solar_farm_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_solar_farm_128/basecfg_helios_mm.yaml + + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_detector_cosinelr.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_marine_infra_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_marine_infra_128/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_wind_turbine_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_wind_turbine_128/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_helios.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel2_vessels_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel2_vessels_128/basecfg_helios.yaml + +substitutions: + patch_size: 8 + encoder_embedding_size: 768 + helios_checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + +global_overrides: + model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + model: + init_args: + trunk: + class_path: rslearn.models.trunk.DecoderTrunk + init_args: + task_embedding: + class_path: rslearn.models.task_embedding.TaskChannelEmbedding + init_args: + encoder_embedding_size: 768 + add_spatial_embed: true + layers: + - class_path: rslp.helios.moe.MoETransformer + init_args: + dim: 768 + n_layers: 1 + n_heads: 12 + num_experts: 4 + num_slots: 4 + trainer: + accumulate_grad_batches: 10 + +merge_options: + merge_heads: true + merge_task_labels: true + same_label_groups: + - [detect_sentinel1_vessels, detect_sentinel2_vessels, vessel_detection] diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_31_moe_decoder/base.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_31_moe_decoder/base.yaml new file mode 100644 index 00000000..82e9a772 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_31_moe_decoder/base.yaml @@ -0,0 +1,82 @@ +model: + class_path: rslp.helios.lightning_module.MoELightningModule + init_args: + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: "{CHECKPOINT_PATH}" + selector: ["encoder"] + forward_kwargs: + patch_size: {PATCH_SIZE} + model_overrides: + encoder_config: + task_lora_kwargs: + use_task_lora: true + task_lora_indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] + gen_hidden: 64 + task_embed_opts: + type: "precomputed" + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct.pt + decoders: # Filled in by make_multidataset_config.py + lazy_decode: true + lr: 0.0001 + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 100 + eta_min: 0 + +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + sample_mode: random_cycle + refill_batches: true + num_workers: 16 + data_modules: # Filled in by make_multidataset_config.py + +trainer: + max_epochs: 100 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: "epoch" + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + save_top_k: 1 + every_n_epochs: 10 + save_last: true + monitor: val_loss + mode: min + - class_path: rslearn.train.callbacks.adapters.ActivateLayers + init_args: + selectors: + - name: lora + at_epoch: 20 + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 0 + freeze_selectors: ["encoder"] + unfreeze_selectors: ["head", "moe"] + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 20 + freeze_selectors: ["encoder"] + unfreeze_selectors: ["head", "lora"] + unfreeze_lr_factor: 10 + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 30 + freeze_selectors: [] + unfreeze_selectors: ["head", "encoder"] + unfreeze_lr_factor: 2 + +rslp_project: placeholder +rslp_experiment: placeholder + +all_dataset_info_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v3_multitask/all_dataset_info.yaml diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_31_moe_decoder/exp_id.txt b/one_off_projects/2025_07_joint_finetune/configs/2025_08_31_moe_decoder/exp_id.txt new file mode 100644 index 00000000..8c1de06d --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_31_moe_decoder/exp_id.txt @@ -0,0 +1 @@ +{task}_moe_decoder diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/OUT_landsat_vessels_classifier.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/OUT_landsat_vessels_classifier.yaml new file mode 100644 index 00000000..07ea245c --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/OUT_landsat_vessels_classifier.yaml @@ -0,0 +1,204 @@ +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + batch_sizes: + vessel_classification: 16 + data_modules: + vessel_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 16 + default_config: + transforms: + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + label: + data_type: vector + is_target: true + layers: + - label + landsat: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/landsat_vessel_detection/classifier/dataset_20250624 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + vessel_classification: + label: targets + tasks: + vessel_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + allow_invalid: true + classes: + - correct + - incorrect + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: label + skip_unknown_categories: true + test_config: + groups: + - phase2a_completed + tags: + split: val + train_config: + groups: + - selected_copy + - phase2a_completed + - phase3a_selected + tags: + split: train + val_config: + groups: + - phase2a_completed + tags: + split: val + num_workers: 16 + refill_batches: true + sample_mode: random_cycle +model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.0001 + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + decoder_to_target: + ClassificationHead: + - vessel_classification + decoders: + ClassificationHead: + - class_path: rslearn.models.pooling_decoder.PoolingDecoder + init_args: + in_channels: 768 + out_channels: 2 + - class_path: rslearn.train.tasks.classification.ClassificationHead + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_lora_kwargs: + gen_hidden: 64 + no_task_conditioning: true + task_lora_indices: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 10 + - 11 + use_task_lora: true + selector: + - encoder + task_embed_opts: + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt + type: precomputed + lazy_decode: true + task_label_offsets: + vessel_classification: + num_outputs: 2 + offset: 0 + outputs_key: class + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 100 + eta_min: 0 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + vessel_classification: + label: targets + tasks: + vessel_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + allow_invalid: true + classes: + - correct + - incorrect + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: label + skip_unknown_categories: true +rslp_experiment: placeholder +rslp_project: placeholder +trainer: + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: epoch + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + every_n_epochs: 10 + mode: min + monitor: val_loss + save_last: true + save_top_k: 1 + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 0 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 20 + freeze_selectors: + - encoder + unfreeze_lr_factor: 10 + unfreeze_selectors: + - head + - lora + max_epochs: 100 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/OUT_landsat_vessels_detector.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/OUT_landsat_vessels_detector.yaml new file mode 100644 index 00000000..ae74f5fc --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/OUT_landsat_vessels_detector.yaml @@ -0,0 +1,288 @@ +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + batch_sizes: + vessel_detection: 8 + data_modules: + vessel_detection: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/landsat_vessel_detection/detector/dataset_20250624 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + vessel_detection: + targets: targets + tasks: + vessel_detection: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.7 + test_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: val + train_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: train + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + val_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: val + num_workers: 16 + refill_batches: true + sample_mode: random_cycle +model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.0001 + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + decoder_to_target: + FasterRCNN: + - vessel_detection + decoders: + FasterRCNN: + - class_path: rslearn.models.faster_rcnn.FasterRCNN + init_args: + anchor_sizes: + - - 32 + downsample_factors: + - 8 + num_channels: 768 + num_classes: 2 + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_lora_kwargs: + gen_hidden: 64 + no_task_conditioning: true + task_lora_indices: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 10 + - 11 + use_task_lora: true + selector: + - encoder + task_embed_opts: + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt + type: precomputed + lazy_decode: true + task_label_offsets: + vessel_detection: + num_outputs: 2 + offset: 0 + outputs_key: labels + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 100 + eta_min: 0 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + vessel_detection: + targets: targets + tasks: + vessel_detection: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.7 +rslp_experiment: placeholder +rslp_project: placeholder +trainer: + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: epoch + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + every_n_epochs: 10 + mode: min + monitor: val_loss + save_last: true + save_top_k: 1 + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 0 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 20 + freeze_selectors: + - encoder + unfreeze_lr_factor: 10 + unfreeze_selectors: + - head + - lora + max_epochs: 100 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/OUT_nandi_crop_type.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/OUT_nandi_crop_type.yaml new file mode 100644 index 00000000..0e2ac488 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/OUT_nandi_crop_type.yaml @@ -0,0 +1,574 @@ +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + batch_sizes: + crop_type_classification: 32 + data_modules: + crop_type_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 32 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: [] + sentinel2_1: [] + sentinel2_10: [] + sentinel2_11: [] + sentinel2_2: [] + sentinel2_3: [] + sentinel2_4: [] + sentinel2_5: [] + sentinel2_6: [] + sentinel2_7: [] + sentinel2_8: [] + sentinel2_9: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + sentinel1_0: [] + sentinel1_1: [] + sentinel1_10: [] + sentinel1_11: [] + sentinel1_2: [] + sentinel1_3: [] + sentinel1_4: [] + sentinel1_5: [] + sentinel1_6: [] + sentinel1_7: [] + sentinel1_8: [] + sentinel1_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.pad.Pad + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + mode: center + size: 8 + inputs: + label: + data_type: vector + is_target: true + layers: + - label + sentinel1_0: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + sentinel1_1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + sentinel1_10: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.10 + passthrough: true + sentinel1_11: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.11 + passthrough: true + sentinel1_2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + sentinel1_3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + sentinel1_4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.4 + passthrough: true + sentinel1_5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.5 + passthrough: true + sentinel1_6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.6 + passthrough: true + sentinel1_7: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.7 + passthrough: true + sentinel1_8: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.8 + passthrough: true + sentinel1_9: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.9 + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/crop/kenya_nandi/20250625 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + crop_type_classification: + label: targets + tasks: + crop_type_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Coffee + - Trees + - Grassland + - Maize + - Sugarcane + - Tea + - Water + - Built-up + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + test_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: val + train_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: train + val_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: val + num_workers: 16 + refill_batches: true + sample_mode: random_cycle +model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.0001 + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + decoder_to_target: + ClassificationHead: + - crop_type_classification + decoders: + ClassificationHead: + - class_path: rslearn.models.pooling_decoder.PoolingDecoder + init_args: + in_channels: 768 + out_channels: 8 + - class_path: rslearn.train.tasks.classification.ClassificationHead + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_lora_kwargs: + gen_hidden: 64 + no_task_conditioning: true + task_lora_indices: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 10 + - 11 + use_task_lora: true + selector: + - encoder + task_embed_opts: + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt + type: precomputed + lazy_decode: true + task_label_offsets: + crop_type_classification: + num_outputs: 8 + offset: 0 + outputs_key: class + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 100 + eta_min: 0 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + crop_type_classification: + label: targets + tasks: + crop_type_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Coffee + - Trees + - Grassland + - Maize + - Sugarcane + - Tea + - Water + - Built-up + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category +rslp_experiment: placeholder +rslp_project: placeholder +trainer: + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: epoch + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + every_n_epochs: 10 + mode: min + monitor: val_loss + save_last: true + save_top_k: 1 + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 0 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 20 + freeze_selectors: + - encoder + unfreeze_lr_factor: 10 + unfreeze_selectors: + - head + - lora + max_epochs: 100 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/OUT_pastis.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/OUT_pastis.yaml new file mode 100644 index 00000000..58b6f4ca --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/OUT_pastis.yaml @@ -0,0 +1,864 @@ +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + batch_sizes: + segment: 2 + data_modules: + segment: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 2 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_1: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_10: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_11: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_2: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_3: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_4: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_5: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_6: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_7: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_8: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_9: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1d_0: [] + s1d_1: [] + s1d_10: [] + s1d_11: [] + s1d_2: [] + s1d_3: [] + s1d_4: [] + s1d_5: [] + s1d_6: [] + s1d_7: [] + s1d_8: [] + s1d_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + s1d_0: + bands: + - vv + - vh + data_type: raster + layers: + - s1d + passthrough: true + s1d_1: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.1 + passthrough: true + s1d_10: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.10 + passthrough: true + s1d_11: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.11 + passthrough: true + s1d_2: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.2 + passthrough: true + s1d_3: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.3 + passthrough: true + s1d_4: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.4 + passthrough: true + s1d_5: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.5 + passthrough: true + s1d_6: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.6 + passthrough: true + s1d_7: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.7 + passthrough: true + s1d_8: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.8 + passthrough: true + s1d_9: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.9 + passthrough: true + targets: + bands: + - class + data_type: raster + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/pastis/rslearn_dataset/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + segment: + targets: targets + tasks: + segment: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_miou_metric: true + metric_kwargs: + average: micro + num_classes: 20 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + zero_is_invalid: true + test_config: + groups: + - fold5 + train_config: + groups: + - fold1 + - fold2 + - fold3 + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_1: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_10: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_11: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_2: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_3: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_4: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_5: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_6: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_7: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_8: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_9: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1d_0: [] + s1d_1: [] + s1d_10: [] + s1d_11: [] + s1d_2: [] + s1d_3: [] + s1d_4: [] + s1d_5: [] + s1d_6: [] + s1d_7: [] + s1d_8: [] + s1d_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + - target/segment/classes + - target/segment/valid + val_config: + groups: + - fold4 + num_workers: 16 + refill_batches: true + sample_mode: random_cycle +model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.0001 + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + decoder_to_target: + SegmentationHead: + - segment + decoders: + SegmentationHead: + - class_path: rslearn.models.unet.UNetDecoder + init_args: + conv_layers_per_resolution: 2 + in_channels: + - - 8 + - 768 + num_channels: + 1: 128 + 2: 256 + 4: 512 + 8: 512 + out_channels: 20 + - class_path: rslearn.train.tasks.segmentation.SegmentationHead + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_lora_kwargs: + gen_hidden: 64 + no_task_conditioning: true + task_lora_indices: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 10 + - 11 + use_task_lora: true + selector: + - encoder + task_embed_opts: + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt + type: precomputed + lazy_decode: true + task_label_offsets: + segment: + num_outputs: 20 + offset: 0 + outputs_key: classes + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 100 + eta_min: 0 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + segment: + targets: targets + tasks: + segment: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_miou_metric: true + metric_kwargs: + average: micro + num_classes: 20 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + zero_is_invalid: true +rslp_experiment: placeholder +rslp_project: placeholder +trainer: + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: epoch + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + every_n_epochs: 10 + mode: min + monitor: val_loss + save_last: true + save_top_k: 1 + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 0 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 20 + freeze_selectors: + - encoder + unfreeze_lr_factor: 10 + unfreeze_selectors: + - head + - lora + max_epochs: 100 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/OUT_satlas_marine_infra.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/OUT_satlas_marine_infra.yaml new file mode 100644 index 00000000..058d95d8 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/OUT_satlas_marine_infra.yaml @@ -0,0 +1,615 @@ +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + batch_sizes: + detect_satlas_marine_infra: 8 + data_modules: + detect_satlas_marine_infra: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/marine_infra/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_marine_infra: + targets: targets + tasks: + detect_satlas_marine_infra: + class_path: rslp.satlas.train.MarineInfraTask + init_args: + box_size: 15 + classes: + - unknown + - platform + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + - - 0.1 + - - 0.2 + - - 0.3 + - - 0.4 + - - 0.5 + - - 0.6 + - - 0.7 + - - 0.8 + - - 0.9 + image_bands: + - 2 + - 1 + - 0 + property_name: category + remap_values: + - - 0 + - 0.25 + - - 0 + - 255 + skip_unknown_categories: true + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 65536 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_satlas_marine_infra + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + val_config: + patch_size: 128 + tags: + split: val + num_workers: 16 + refill_batches: true + sample_mode: random_cycle +model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.0001 + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + decoder_to_target: + FasterRCNN: + - detect_satlas_marine_infra + decoders: + FasterRCNN: + - class_path: rslearn.models.faster_rcnn.FasterRCNN + init_args: + anchor_sizes: + - - 32 + downsample_factors: + - 8 + num_channels: 768 + num_classes: 3 + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_lora_kwargs: + gen_hidden: 64 + no_task_conditioning: true + task_lora_indices: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 10 + - 11 + use_task_lora: true + selector: + - encoder + task_embed_opts: + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt + type: precomputed + lazy_decode: true + task_label_offsets: + detect_satlas_marine_infra: + num_outputs: 3 + offset: 0 + outputs_key: labels + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 100 + eta_min: 0 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_marine_infra: + targets: targets + tasks: + detect_satlas_marine_infra: + class_path: rslp.satlas.train.MarineInfraTask + init_args: + box_size: 15 + classes: + - unknown + - platform + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + - - 0.1 + - - 0.2 + - - 0.3 + - - 0.4 + - - 0.5 + - - 0.6 + - - 0.7 + - - 0.8 + - - 0.9 + image_bands: + - 2 + - 1 + - 0 + property_name: category + remap_values: + - - 0 + - 0.25 + - - 0 + - 255 + skip_unknown_categories: true +rslp_experiment: placeholder +rslp_project: placeholder +trainer: + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: epoch + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + every_n_epochs: 10 + mode: min + monitor: val_loss + save_last: true + save_top_k: 1 + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 0 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 20 + freeze_selectors: + - encoder + unfreeze_lr_factor: 10 + unfreeze_selectors: + - head + - lora + max_epochs: 100 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/OUT_satlas_solar_farm.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/OUT_satlas_solar_farm.yaml new file mode 100644 index 00000000..9cbcb13d --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/OUT_satlas_solar_farm.yaml @@ -0,0 +1,565 @@ +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + batch_sizes: + segment_satlas_solar_farm: 8 + data_modules: + segment_satlas_solar_farm: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + targets: + bands: + - label + data_type: raster + dtype: INT32 + is_target: true + layers: + - label_raster + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/solar_farm/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + segment_satlas_solar_farm: + targets: targets + tasks: + segment_satlas_solar_farm: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_f1_metric: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + metric_kwargs: + average: micro + num_classes: 2 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 16384 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - target/segment_satlas_solar_farm/classes + - target/segment_satlas_solar_farm/valid + val_config: + patch_size: 128 + tags: + split: val + num_workers: 16 + refill_batches: true + sample_mode: random_cycle +model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.0001 + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + decoder_to_target: + SegmentationHead: + - segment_satlas_solar_farm + decoders: + SegmentationHead: + - class_path: rslearn.models.unet.UNetDecoder + init_args: + conv_layers_per_resolution: 2 + in_channels: + - - 8 + - 768 + num_channels: + 1: 128 + 2: 256 + 4: 512 + 8: 512 + out_channels: 2 + - class_path: rslearn.train.tasks.segmentation.SegmentationHead + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_lora_kwargs: + gen_hidden: 64 + no_task_conditioning: true + task_lora_indices: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 10 + - 11 + use_task_lora: true + selector: + - encoder + task_embed_opts: + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt + type: precomputed + lazy_decode: true + task_label_offsets: + segment_satlas_solar_farm: + num_outputs: 2 + offset: 0 + outputs_key: classes + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 100 + eta_min: 0 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + segment_satlas_solar_farm: + targets: targets + tasks: + segment_satlas_solar_farm: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_f1_metric: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + metric_kwargs: + average: micro + num_classes: 2 + remap_values: + - - 0 + - 1 + - - 0 + - 255 +rslp_experiment: placeholder +rslp_project: placeholder +trainer: + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: epoch + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + every_n_epochs: 10 + mode: min + monitor: val_loss + save_last: true + save_top_k: 1 + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 0 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 20 + freeze_selectors: + - encoder + unfreeze_lr_factor: 10 + unfreeze_selectors: + - head + - lora + max_epochs: 100 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/OUT_satlas_wind_turbine.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/OUT_satlas_wind_turbine.yaml new file mode 100644 index 00000000..7bb98133 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/OUT_satlas_wind_turbine.yaml @@ -0,0 +1,707 @@ +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + batch_sizes: + detect_satlas_wind_turbine: 8 + data_modules: + detect_satlas_wind_turbine: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + s25: [] + s26: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + landsat5: [] + landsat6: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + s1a5: [] + s1a6: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + landsat5: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.4 + passthrough: true + landsat6: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.5 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1a5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.4 + passthrough: true + s1a6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.5 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s1d5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.4 + passthrough: true + s1d6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.5 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + s25: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + s26: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/wind_turbine/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_wind_turbine: + targets: targets + tasks: + detect_satlas_wind_turbine: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 65536 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + s25: [] + s26: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + landsat5: [] + landsat6: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + s1a5: [] + s1a6: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_satlas_wind_turbine + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + val_config: + patch_size: 128 + tags: + split: val + num_workers: 16 + refill_batches: true + sample_mode: random_cycle +model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.0001 + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + decoder_to_target: + FasterRCNN: + - detect_satlas_wind_turbine + decoders: + FasterRCNN: + - class_path: rslearn.models.faster_rcnn.FasterRCNN + init_args: + anchor_sizes: + - - 32 + downsample_factors: + - 8 + num_channels: 768 + num_classes: 3 + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_lora_kwargs: + gen_hidden: 64 + no_task_conditioning: true + task_lora_indices: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 10 + - 11 + use_task_lora: true + selector: + - encoder + task_embed_opts: + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt + type: precomputed + lazy_decode: true + task_label_offsets: + detect_satlas_wind_turbine: + num_outputs: 3 + offset: 0 + outputs_key: labels + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 100 + eta_min: 0 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_wind_turbine: + targets: targets + tasks: + detect_satlas_wind_turbine: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 +rslp_experiment: placeholder +rslp_project: placeholder +trainer: + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: epoch + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + every_n_epochs: 10 + mode: min + monitor: val_loss + save_last: true + save_top_k: 1 + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 0 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 20 + freeze_selectors: + - encoder + unfreeze_lr_factor: 10 + unfreeze_selectors: + - head + - lora + max_epochs: 100 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/OUT_sentinel1_vessels.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/OUT_sentinel1_vessels.yaml new file mode 100644 index 00000000..8d6eb2eb --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/OUT_sentinel1_vessels.yaml @@ -0,0 +1,278 @@ +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + batch_sizes: + detect_sentinel1_vessels: 8 + data_modules: + detect_sentinel1_vessels: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/sentinel1_vessels/dataset_v1/20250602/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_sentinel1_vessels: + targets: targets + tasks: + detect_sentinel1_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + image_bands: + - 1 + - 1 + - 1 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.5 + test_config: + groups: + - val_ascending + - val_descending + patch_size: 128 + train_config: + groups: + - train_ascending + - train_descending + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 32768 + replacement: true + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_sentinel1_vessels + image_selectors: + - image + - sentinel1 + val_config: + groups: + - val_ascending + - val_descending + patch_size: 128 + num_workers: 16 + refill_batches: true + sample_mode: random_cycle +model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.0001 + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + decoder_to_target: + FasterRCNN: + - detect_sentinel1_vessels + decoders: + FasterRCNN: + - class_path: rslearn.models.faster_rcnn.FasterRCNN + init_args: + anchor_sizes: + - - 32 + downsample_factors: + - 8 + num_channels: 768 + num_classes: 2 + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_lora_kwargs: + gen_hidden: 64 + no_task_conditioning: true + task_lora_indices: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 10 + - 11 + use_task_lora: true + selector: + - encoder + task_embed_opts: + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt + type: precomputed + lazy_decode: true + task_label_offsets: + detect_sentinel1_vessels: + num_outputs: 2 + offset: 0 + outputs_key: labels + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 100 + eta_min: 0 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_sentinel1_vessels: + targets: targets + tasks: + detect_sentinel1_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + image_bands: + - 1 + - 1 + - 1 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.5 +rslp_experiment: placeholder +rslp_project: placeholder +trainer: + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: epoch + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + every_n_epochs: 10 + mode: min + monitor: val_loss + save_last: true + save_top_k: 1 + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 0 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 20 + freeze_selectors: + - encoder + unfreeze_lr_factor: 10 + unfreeze_selectors: + - head + - lora + max_epochs: 100 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/OUT_sentinel2_vessels.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/OUT_sentinel2_vessels.yaml new file mode 100644 index 00000000..3e9ac1f1 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/OUT_sentinel2_vessels.yaml @@ -0,0 +1,308 @@ +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + batch_sizes: + detect_sentinel2_vessels: 8 + data_modules: + detect_sentinel2_vessels: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/sentinel2_vessels/dataset_v1/20250213/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_sentinel2_vessels: + targets: targets + tasks: + detect_sentinel2_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + groups: + - sargassum_val + - split1 + - split7 + patch_size: 128 + train_config: + groups: + - sargassum_train + - split2 + - split3 + - split4 + - split5 + - split6 + - train + - train-bg + - train2 + - train3 + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 131072 + replacement: true + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_sentinel2_vessels + image_selectors: + - image + - sentinel2_l2a + val_config: + groups: + - sargassum_val + - split1 + - split7 + patch_size: 128 + num_workers: 16 + refill_batches: true + sample_mode: random_cycle +model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.0001 + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + decoder_to_target: + FasterRCNN: + - detect_sentinel2_vessels + decoders: + FasterRCNN: + - class_path: rslearn.models.faster_rcnn.FasterRCNN + init_args: + anchor_sizes: + - - 32 + downsample_factors: + - 8 + num_channels: 768 + num_classes: 2 + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_lora_kwargs: + gen_hidden: 64 + no_task_conditioning: true + task_lora_indices: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 10 + - 11 + use_task_lora: true + selector: + - encoder + task_embed_opts: + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt + type: precomputed + lazy_decode: true + task_label_offsets: + detect_sentinel2_vessels: + num_outputs: 2 + offset: 0 + outputs_key: labels + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 100 + eta_min: 0 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_sentinel2_vessels: + targets: targets + tasks: + detect_sentinel2_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 +rslp_experiment: placeholder +rslp_project: placeholder +trainer: + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: epoch + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + every_n_epochs: 10 + mode: min + monitor: val_loss + save_last: true + save_top_k: 1 + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 0 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 20 + freeze_selectors: + - encoder + unfreeze_lr_factor: 10 + unfreeze_selectors: + - head + - lora + max_epochs: 100 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/OUT_worldcereal_cropland.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/OUT_worldcereal_cropland.yaml new file mode 100644 index 00000000..9c63a685 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/OUT_worldcereal_cropland.yaml @@ -0,0 +1,559 @@ +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + batch_sizes: + cropland_classification: 16 + data_modules: + cropland_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 16 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: [] + sentinel2_1: [] + sentinel2_10: [] + sentinel2_11: [] + sentinel2_2: [] + sentinel2_3: [] + sentinel2_4: [] + sentinel2_5: [] + sentinel2_6: [] + sentinel2_7: [] + sentinel2_8: [] + sentinel2_9: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + sentinel1_0: [] + sentinel1_1: [] + sentinel1_10: [] + sentinel1_11: [] + sentinel1_2: [] + sentinel1_3: [] + sentinel1_4: [] + sentinel1_5: [] + sentinel1_6: [] + sentinel1_7: [] + sentinel1_8: [] + sentinel1_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.pad.Pad + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + mode: center + size: 8 + inputs: + label: + data_type: vector + is_target: true + layers: + - label + sentinel1_0: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1 + passthrough: true + sentinel1_1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.1 + passthrough: true + sentinel1_10: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.10 + passthrough: true + sentinel1_11: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.11 + passthrough: true + sentinel1_2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.2 + passthrough: true + sentinel1_3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.3 + passthrough: true + sentinel1_4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.4 + passthrough: true + sentinel1_5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.5 + passthrough: true + sentinel1_6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.6 + passthrough: true + sentinel1_7: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.7 + passthrough: true + sentinel1_8: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.8 + passthrough: true + sentinel1_9: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.9 + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/crop/worldcereal_cropland/20250626 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + cropland_classification: + label: targets + tasks: + cropland_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Cropland + - Non-Cropland + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + test_config: + groups: + - h3_sample100_66K + tags: + split: val + train_config: + groups: + - h3_sample100_66K + tags: + split: train + val_config: + groups: + - h3_sample100_66K + tags: + split: val + num_workers: 16 + refill_batches: true + sample_mode: random_cycle +model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.0001 + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + decoder_to_target: + ClassificationHead: + - cropland_classification + decoders: + ClassificationHead: + - class_path: rslearn.models.pooling_decoder.PoolingDecoder + init_args: + in_channels: 768 + out_channels: 2 + - class_path: rslearn.train.tasks.classification.ClassificationHead + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_lora_kwargs: + gen_hidden: 64 + no_task_conditioning: true + task_lora_indices: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 10 + - 11 + use_task_lora: true + selector: + - encoder + task_embed_opts: + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt + type: precomputed + lazy_decode: true + task_label_offsets: + cropland_classification: + num_outputs: 2 + offset: 0 + outputs_key: class + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 100 + eta_min: 0 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + cropland_classification: + label: targets + tasks: + cropland_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Cropland + - Non-Cropland + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category +rslp_experiment: placeholder +rslp_project: placeholder +trainer: + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: epoch + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + every_n_epochs: 10 + mode: min + monitor: val_loss + save_last: true + save_top_k: 1 + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 0 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 20 + freeze_selectors: + - encoder + unfreeze_lr_factor: 10 + unfreeze_selectors: + - head + - lora + max_epochs: 100 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/base.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/base.yaml new file mode 100644 index 00000000..aff99b9d --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/base.yaml @@ -0,0 +1,72 @@ +model: + class_path: rslp.helios.lightning_module.MoELightningModule + init_args: + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: "{CHECKPOINT_PATH}" + selector: ["encoder"] + forward_kwargs: + patch_size: {PATCH_SIZE} + model_overrides: + encoder_config: + task_lora_kwargs: + use_task_lora: true + task_lora_indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] + gen_hidden: 64 + no_task_conditioning: true + task_embed_opts: + type: "precomputed" + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt + decoders: # Filled in by make_multidataset_config.py + lazy_decode: true + lr: 0.0001 + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 100 + eta_min: 0 + +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + sample_mode: random_cycle + refill_batches: true + num_workers: 16 + data_modules: # Filled in by make_multidataset_config.py + +trainer: + max_epochs: 100 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: "epoch" + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + save_top_k: 1 + every_n_epochs: 10 + save_last: true + monitor: val_loss + mode: min + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 0 + freeze_selectors: ["encoder"] + unfreeze_selectors: ["head"] + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 20 + freeze_selectors: ["encoder"] + unfreeze_selectors: ["head", "lora"] + unfreeze_lr_factor: 10 + +rslp_project: placeholder +rslp_experiment: placeholder + +all_dataset_info_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v3_multitask/all_dataset_info.yaml \ No newline at end of file diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/exp_id.txt b/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/exp_id.txt new file mode 100644 index 00000000..292de9b9 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/exp_id.txt @@ -0,0 +1 @@ +{task}_lora \ No newline at end of file diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/landsat_vessels_classifier.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/landsat_vessels_classifier.yaml new file mode 100644 index 00000000..b8e5c108 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/landsat_vessels_classifier.yaml @@ -0,0 +1,18 @@ +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/OUT_landsat_vessels_classifier.yaml + +dataset_cfgs: + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_classifier_cosinelr.yaml + +substitutions: + patch_size: 8 + encoder_embedding_size: 768 + helios_checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + +merge_options: + merge_heads: true + merge_task_labels: true + +global_overrides: + model: + class_path: rslearn.train.lightning_module.RslearnLightningModule diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/landsat_vessels_detector.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/landsat_vessels_detector.yaml new file mode 100644 index 00000000..ab1b98f7 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/landsat_vessels_detector.yaml @@ -0,0 +1,18 @@ +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/OUT_landsat_vessels_detector.yaml + +dataset_cfgs: + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_detector_cosinelr.yaml + +substitutions: + patch_size: 8 + encoder_embedding_size: 768 + helios_checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + +merge_options: + merge_heads: true + merge_task_labels: true + +global_overrides: + model: + class_path: rslearn.train.lightning_module.RslearnLightningModule diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/nandi_crop_type.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/nandi_crop_type.yaml new file mode 100644 index 00000000..9472d072 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/nandi_crop_type.yaml @@ -0,0 +1,18 @@ +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/OUT_nandi_crop_type.yaml + +dataset_cfgs: + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_nandi_crop_type/finetune_s1_s2_cosinelr.yaml + +substitutions: + patch_size: 8 + encoder_embedding_size: 768 + helios_checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + +merge_options: + merge_heads: true + merge_task_labels: true + +global_overrides: + model: + class_path: rslearn.train.lightning_module.RslearnLightningModule diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/pastis.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/pastis.yaml new file mode 100644 index 00000000..87a62fdb --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/pastis.yaml @@ -0,0 +1,19 @@ +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/OUT_pastis.yaml + +dataset_cfgs: + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_pastis/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_pastis/basecfg_helios_mm.yaml + +substitutions: + patch_size: 8 + encoder_embedding_size: 768 + helios_checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + +merge_options: + merge_heads: true + merge_task_labels: true + +global_overrides: + model: + class_path: rslearn.train.lightning_module.RslearnLightningModule diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/satlas_marine_infra.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/satlas_marine_infra.yaml new file mode 100644 index 00000000..b7578acc --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/satlas_marine_infra.yaml @@ -0,0 +1,19 @@ +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/OUT_satlas_marine_infra.yaml + +dataset_cfgs: + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_marine_infra_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_marine_infra_128/basecfg_helios_mm.yaml + +substitutions: + patch_size: 8 + encoder_embedding_size: 768 + helios_checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + +merge_options: + merge_heads: true + merge_task_labels: true + +global_overrides: + model: + class_path: rslearn.train.lightning_module.RslearnLightningModule diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/satlas_solar_farm.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/satlas_solar_farm.yaml new file mode 100644 index 00000000..dce96fde --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/satlas_solar_farm.yaml @@ -0,0 +1,19 @@ +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/OUT_satlas_solar_farm.yaml + +dataset_cfgs: + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_solar_farm_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_solar_farm_128/basecfg_helios_mm.yaml + +substitutions: + patch_size: 8 + encoder_embedding_size: 768 + helios_checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + +merge_options: + merge_heads: true + merge_task_labels: true + +global_overrides: + model: + class_path: rslearn.train.lightning_module.RslearnLightningModule diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/satlas_wind_turbine.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/satlas_wind_turbine.yaml new file mode 100644 index 00000000..c10cb834 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/satlas_wind_turbine.yaml @@ -0,0 +1,19 @@ +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/OUT_satlas_wind_turbine.yaml + +dataset_cfgs: + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_wind_turbine_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_wind_turbine_128/basecfg_helios_mm.yaml + +substitutions: + patch_size: 8 + encoder_embedding_size: 768 + helios_checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + +merge_options: + merge_heads: true + merge_task_labels: true + +global_overrides: + model: + class_path: rslearn.train.lightning_module.RslearnLightningModule diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/sentinel1_vessels.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/sentinel1_vessels.yaml new file mode 100644 index 00000000..e150a31c --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/sentinel1_vessels.yaml @@ -0,0 +1,19 @@ +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/OUT_sentinel1_vessels.yaml + +dataset_cfgs: + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_helios.yaml + +substitutions: + patch_size: 8 + encoder_embedding_size: 768 + helios_checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + +merge_options: + merge_heads: true + merge_task_labels: true + +global_overrides: + model: + class_path: rslearn.train.lightning_module.RslearnLightningModule diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/sentinel2_vessels.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/sentinel2_vessels.yaml new file mode 100644 index 00000000..81a5083b --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/sentinel2_vessels.yaml @@ -0,0 +1,19 @@ +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/OUT_sentinel2_vessels.yaml + +dataset_cfgs: + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel2_vessels_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel2_vessels_128/basecfg_helios.yaml + +substitutions: + patch_size: 8 + encoder_embedding_size: 768 + helios_checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + +merge_options: + merge_heads: true + merge_task_labels: true + +global_overrides: + model: + class_path: rslearn.train.lightning_module.RslearnLightningModule diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/worldcereal_cropland.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/worldcereal_cropland.yaml new file mode 100644 index 00000000..e701d58b --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/worldcereal_cropland.yaml @@ -0,0 +1,18 @@ +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_09_01_lora/OUT_worldcereal_cropland.yaml + +dataset_cfgs: + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_worldcereal_cropland/finetune_s1_s2_cosinelr.yaml + +substitutions: + patch_size: 8 + encoder_embedding_size: 768 + helios_checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + +merge_options: + merge_heads: true + merge_task_labels: true + +global_overrides: + model: + class_path: rslearn.train.lightning_module.RslearnLightningModule diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_02_final/OUT_classify.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_02_final/OUT_classify.yaml new file mode 100644 index 00000000..27d86502 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_02_final/OUT_classify.yaml @@ -0,0 +1,1157 @@ +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + batch_sizes: + crop_type_classification: 32 + cropland_classification: 16 + vessel_classification: 16 + data_modules: + crop_type_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 32 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: [] + sentinel2_1: [] + sentinel2_10: [] + sentinel2_11: [] + sentinel2_2: [] + sentinel2_3: [] + sentinel2_4: [] + sentinel2_5: [] + sentinel2_6: [] + sentinel2_7: [] + sentinel2_8: [] + sentinel2_9: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + sentinel1_0: [] + sentinel1_1: [] + sentinel1_10: [] + sentinel1_11: [] + sentinel1_2: [] + sentinel1_3: [] + sentinel1_4: [] + sentinel1_5: [] + sentinel1_6: [] + sentinel1_7: [] + sentinel1_8: [] + sentinel1_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.pad.Pad + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + mode: center + size: 8 + inputs: + label: + data_type: vector + is_target: true + layers: + - label + sentinel1_0: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + sentinel1_1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + sentinel1_10: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.10 + passthrough: true + sentinel1_11: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.11 + passthrough: true + sentinel1_2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + sentinel1_3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + sentinel1_4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.4 + passthrough: true + sentinel1_5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.5 + passthrough: true + sentinel1_6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.6 + passthrough: true + sentinel1_7: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.7 + passthrough: true + sentinel1_8: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.8 + passthrough: true + sentinel1_9: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.9 + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/crop/kenya_nandi/20250625 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + crop_type_classification: + label: targets + tasks: + crop_type_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Coffee + - Trees + - Grassland + - Maize + - Sugarcane + - Tea + - Water + - Built-up + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + test_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: val + train_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: train + val_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: val + cropland_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 16 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: [] + sentinel2_1: [] + sentinel2_10: [] + sentinel2_11: [] + sentinel2_2: [] + sentinel2_3: [] + sentinel2_4: [] + sentinel2_5: [] + sentinel2_6: [] + sentinel2_7: [] + sentinel2_8: [] + sentinel2_9: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + sentinel1_0: [] + sentinel1_1: [] + sentinel1_10: [] + sentinel1_11: [] + sentinel1_2: [] + sentinel1_3: [] + sentinel1_4: [] + sentinel1_5: [] + sentinel1_6: [] + sentinel1_7: [] + sentinel1_8: [] + sentinel1_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.pad.Pad + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + mode: center + size: 8 + inputs: + label: + data_type: vector + is_target: true + layers: + - label + sentinel1_0: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1 + passthrough: true + sentinel1_1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.1 + passthrough: true + sentinel1_10: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.10 + passthrough: true + sentinel1_11: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.11 + passthrough: true + sentinel1_2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.2 + passthrough: true + sentinel1_3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.3 + passthrough: true + sentinel1_4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.4 + passthrough: true + sentinel1_5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.5 + passthrough: true + sentinel1_6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.6 + passthrough: true + sentinel1_7: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.7 + passthrough: true + sentinel1_8: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.8 + passthrough: true + sentinel1_9: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.9 + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/crop/worldcereal_cropland/20250626 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + cropland_classification: + label: targets + tasks: + cropland_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Cropland + - Non-Cropland + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + test_config: + groups: + - h3_sample100_66K + tags: + split: val + train_config: + groups: + - h3_sample100_66K + tags: + split: train + val_config: + groups: + - h3_sample100_66K + tags: + split: val + vessel_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 16 + default_config: + transforms: + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + label: + data_type: vector + is_target: true + layers: + - label + landsat: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/landsat_vessel_detection/classifier/dataset_20250624 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + vessel_classification: + label: targets + tasks: + vessel_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + allow_invalid: true + classes: + - correct + - incorrect + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: label + skip_unknown_categories: true + test_config: + groups: + - phase2a_completed + tags: + split: val + train_config: + groups: + - selected_copy + - phase2a_completed + - phase3a_selected + tags: + split: train + val_config: + groups: + - phase2a_completed + tags: + split: val + num_workers: 16 + refill_batches: true + sample_mode: random_cycle +model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.0002 + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + decoder_to_target: + ClassificationHead: + - vessel_classification + - crop_type_classification + - cropland_classification + decoders: + ClassificationHead: + - class_path: rslearn.models.pooling_decoder.PoolingDecoder + init_args: + in_channels: 768 + out_channels: 12 + - class_path: rslearn.train.tasks.classification.ClassificationHead + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: '{CHECKPOINT_PATH}' + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_lora_kwargs: + gen_hidden: 64 + task_lora_indices: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 10 + - 11 + use_task_lora: true + selector: + - encoder + task_embed_opts: + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt + type: precomputed + lazy_decode: true + task_label_offsets: + crop_type_classification: + num_outputs: 8 + offset: 2 + outputs_key: class + cropland_classification: + num_outputs: 2 + offset: 10 + outputs_key: class + vessel_classification: + num_outputs: 2 + offset: 0 + outputs_key: class + trunk: + class_path: rslearn.models.trunk.DecoderTrunk + init_args: + layers: + - class_path: rslp.helios.moe.MoETransformer + init_args: + dim: 768 + n_heads: 12 + n_layers: 1 + num_experts: 4 + num_slots: 4 + task_embedding: + class_path: rslearn.models.task_embedding.TaskChannelEmbedding + init_args: + add_spatial_embed: true + encoder_embedding_size: 768 + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 50 + eta_min: 0 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + crop_type_classification: + label: targets + cropland_classification: + label: targets + vessel_classification: + label: targets + tasks: + crop_type_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Coffee + - Trees + - Grassland + - Maize + - Sugarcane + - Tea + - Water + - Built-up + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + cropland_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Cropland + - Non-Cropland + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + vessel_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + allow_invalid: true + classes: + - correct + - incorrect + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: label + skip_unknown_categories: true +rslp_experiment: placeholder +rslp_project: placeholder +trainer: + accumulate_grad_batches: 3 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: epoch + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + every_n_epochs: 10 + mode: min + monitor: val_loss + save_last: true + save_top_k: 1 + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 0 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 20 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - lora + - class_path: rslearn.train.callbacks.adapters.ActivateLayers + init_args: + selectors: + - at_epoch: 20 + name: lora + max_epochs: 500 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_28_regression_test/main.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_02_final/OUT_detect.yaml similarity index 97% rename from one_off_projects/2025_07_joint_finetune/configs/2025_08_28_regression_test/main.yaml rename to one_off_projects/2025_07_joint_finetune/configs/2025_09_02_final/OUT_detect.yaml index c825e548..ca4948bf 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_08_28_regression_test/main.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_02_final/OUT_detect.yaml @@ -1536,14 +1536,11 @@ model: n_layers: 1 num_experts: 4 num_slots: 4 - mlp_dim: 512 - dropout: 0.1 task_embedding: class_path: rslearn.models.task_embedding.TaskChannelEmbedding init_args: - add_spatial_embed: false + add_spatial_embed: true encoder_embedding_size: 768 - default_idx: 0 scheduler: class_path: rslearn.train.scheduler.CosineAnnealingScheduler init_args: @@ -1755,17 +1752,44 @@ trainer: logging_interval: epoch - class_path: lightning.pytorch.callbacks.ModelCheckpoint init_args: + every_n_epochs: 10 mode: min monitor: val_loss save_last: true save_top_k: 1 - - class_path: rslearn.train.callbacks.freeze_unfreeze.FreezeUnfreeze + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning init_args: - module_selector: - - model - - encoder - - 0 - unfreeze_at_epoch: 20 - unfreeze_lr_factor: 10 - limit_val_batches: 1024 - max_epochs: 200 + stages: + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 0 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - moe + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 20 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - lora + - moe + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 30 + freeze_selectors: [] + unfreeze_lr_factor: 10 + unfreeze_selectors: + - encoder + - head + - lora + - moe + - class_path: rslearn.train.callbacks.adapters.ActivateLayers + init_args: + selectors: + - at_epoch: 20 + name: lora + max_epochs: 500 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_02_final/OUT_segment.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_02_final/OUT_segment.yaml new file mode 100644 index 00000000..7888c2a7 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_02_final/OUT_segment.yaml @@ -0,0 +1,1318 @@ +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + batch_sizes: + segment: 2 + segment_satlas_solar_farm: 8 + data_modules: + segment: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 2 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_1: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_10: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_11: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_2: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_3: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_4: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_5: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_6: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_7: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_8: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_9: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1d_0: [] + s1d_1: [] + s1d_10: [] + s1d_11: [] + s1d_2: [] + s1d_3: [] + s1d_4: [] + s1d_5: [] + s1d_6: [] + s1d_7: [] + s1d_8: [] + s1d_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + s1d_0: + bands: + - vv + - vh + data_type: raster + layers: + - s1d + passthrough: true + s1d_1: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.1 + passthrough: true + s1d_10: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.10 + passthrough: true + s1d_11: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.11 + passthrough: true + s1d_2: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.2 + passthrough: true + s1d_3: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.3 + passthrough: true + s1d_4: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.4 + passthrough: true + s1d_5: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.5 + passthrough: true + s1d_6: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.6 + passthrough: true + s1d_7: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.7 + passthrough: true + s1d_8: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.8 + passthrough: true + s1d_9: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.9 + passthrough: true + targets: + bands: + - class + data_type: raster + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/pastis/rslearn_dataset/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + segment: + targets: targets + tasks: + segment: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_miou_metric: true + metric_kwargs: + average: micro + num_classes: 20 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + zero_is_invalid: true + test_config: + groups: + - fold5 + train_config: + groups: + - fold1 + - fold2 + - fold3 + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_1: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_10: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_11: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_2: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_3: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_4: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_5: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_6: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_7: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_8: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_9: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1d_0: [] + s1d_1: [] + s1d_10: [] + s1d_11: [] + s1d_2: [] + s1d_3: [] + s1d_4: [] + s1d_5: [] + s1d_6: [] + s1d_7: [] + s1d_8: [] + s1d_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + - target/segment/classes + - target/segment/valid + val_config: + groups: + - fold4 + segment_satlas_solar_farm: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + targets: + bands: + - label + data_type: raster + dtype: INT32 + is_target: true + layers: + - label_raster + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/solar_farm/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + segment_satlas_solar_farm: + targets: targets + tasks: + segment_satlas_solar_farm: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_f1_metric: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + metric_kwargs: + average: micro + num_classes: 2 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 16384 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - target/segment_satlas_solar_farm/classes + - target/segment_satlas_solar_farm/valid + val_config: + patch_size: 128 + tags: + split: val + num_workers: 16 + refill_batches: true + sample_mode: random_cycle +model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.00015 + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + decoder_to_target: + SegmentationHead: + - segment + - segment_satlas_solar_farm + decoders: + SegmentationHead: + - class_path: rslearn.models.unet.UNetDecoder + init_args: + conv_layers_per_resolution: 2 + in_channels: + - - 8 + - 768 + num_channels: + 1: 128 + 2: 256 + 4: 512 + 8: 512 + out_channels: 22 + - class_path: rslearn.train.tasks.segmentation.SegmentationHead + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: '{CHECKPOINT_PATH}' + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_lora_kwargs: + gen_hidden: 64 + task_lora_indices: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 10 + - 11 + use_task_lora: true + selector: + - encoder + task_embed_opts: + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt + type: precomputed + lazy_decode: true + task_label_offsets: + segment: + num_outputs: 20 + offset: 0 + outputs_key: classes + segment_satlas_solar_farm: + num_outputs: 2 + offset: 20 + outputs_key: classes + trunk: + class_path: rslearn.models.trunk.DecoderTrunk + init_args: + layers: + - class_path: rslp.helios.moe.MoETransformer + init_args: + dim: 768 + n_heads: 12 + n_layers: 1 + num_experts: 4 + num_slots: 4 + task_embedding: + class_path: rslearn.models.task_embedding.TaskChannelEmbedding + init_args: + add_spatial_embed: true + encoder_embedding_size: 768 + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 50 + eta_min: 0 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + segment: + targets: targets + segment_satlas_solar_farm: + targets: targets + tasks: + segment: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_miou_metric: true + metric_kwargs: + average: micro + num_classes: 20 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + zero_is_invalid: true + segment_satlas_solar_farm: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_f1_metric: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + metric_kwargs: + average: micro + num_classes: 2 + remap_values: + - - 0 + - 1 + - - 0 + - 255 +rslp_experiment: placeholder +rslp_project: placeholder +trainer: + accumulate_grad_batches: 2 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: epoch + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + every_n_epochs: 10 + mode: min + monitor: val_loss + save_last: true + save_top_k: 1 + max_epochs: 500 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_02_final/base.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_02_final/base.yaml new file mode 100644 index 00000000..64d29a72 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_02_final/base.yaml @@ -0,0 +1,48 @@ +model: + class_path: rslp.helios.lightning_module.MoELightningModule + init_args: + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + encoder: + - class_path: rslp.helios.model.Helios + init_args: + checkpoint_path: "{CHECKPOINT_PATH}" + selector: ["encoder"] + forward_kwargs: + patch_size: {PATCH_SIZE} + decoders: # Filled in by make_multidataset_config.py + lazy_decode: true + lr: 0.0001 + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 100 + eta_min: 0 + +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + sample_mode: random_cycle + refill_batches: true + num_workers: 16 + data_modules: # Filled in by make_multidataset_config.py + +trainer: + max_epochs: 500 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: "epoch" + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + save_top_k: 1 + save_last: true + monitor: val_loss + mode: min + every_n_epochs: 10 + +rslp_project: placeholder +rslp_experiment: placeholder + +all_dataset_info_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v3_multitask/all_dataset_info.yaml diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_02_final/classify.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_02_final/classify.yaml new file mode 100644 index 00000000..e26e3086 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_02_final/classify.yaml @@ -0,0 +1,83 @@ +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_09_02_final/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_09_02_final/OUT_classify.yaml + +dataset_cfgs: + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_classifier_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_nandi_crop_type/finetune_s1_s2_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_worldcereal_cropland/finetune_s1_s2_cosinelr.yaml + +substitutions: + patch_size: 8 + encoder_embedding_size: 768 + helios_checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + +global_overrides: + model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.0002 + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 50 + eta_min: 0 + model: + init_args: + trunk: + class_path: rslearn.models.trunk.DecoderTrunk + init_args: + task_embedding: + class_path: rslearn.models.task_embedding.TaskChannelEmbedding + init_args: + encoder_embedding_size: 768 + add_spatial_embed: true + layers: + - class_path: rslp.helios.moe.MoETransformer + init_args: + dim: 768 + n_layers: 1 + n_heads: 12 + num_experts: 4 + num_slots: 4 + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: "{CHECKPOINT_PATH}" + selector: ["encoder"] + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_lora_kwargs: + use_task_lora: true + task_lora_indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] + gen_hidden: 64 + task_embed_opts: + type: "precomputed" + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt + trainer: + accumulate_grad_batches: 3 + callbacks+: + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 0 + freeze_selectors: ["encoder"] + unfreeze_selectors: ["head"] + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 20 + freeze_selectors: ["encoder"] + unfreeze_selectors: ["head", "lora"] + - class_path: rslearn.train.callbacks.adapters.ActivateLayers + init_args: + selectors: + - name: "lora" + at_epoch: 20 + +merge_options: + merge_heads: true + merge_task_labels: true + same_label_groups: diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_02_final/detect.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_02_final/detect.yaml new file mode 100644 index 00000000..8410cbf0 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_02_final/detect.yaml @@ -0,0 +1,74 @@ +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_09_02_final/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_09_02_final/OUT_detect.yaml + +dataset_cfgs: + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_detector_cosinelr.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_marine_infra_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_marine_infra_128/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_wind_turbine_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_wind_turbine_128/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_helios.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel2_vessels_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel2_vessels_128/basecfg_helios.yaml + +substitutions: + patch_size: 8 + encoder_embedding_size: 768 + helios_checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + +global_overrides: + model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + model: + init_args: + trunk: + class_path: rslearn.models.trunk.DecoderTrunk + init_args: + task_embedding: + class_path: rslearn.models.task_embedding.TaskChannelEmbedding + init_args: + encoder_embedding_size: 768 + add_spatial_embed: true + layers: + - class_path: rslp.helios.moe.MoETransformer + init_args: + dim: 768 + n_layers: 1 + n_heads: 12 + num_experts: 4 + num_slots: 4 + trainer: + accumulate_grad_batches: 5 + callbacks+: + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 0 + freeze_selectors: ["encoder"] + unfreeze_selectors: ["head", "moe"] + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 20 + freeze_selectors: ["encoder"] + unfreeze_selectors: ["head", "lora", "moe"] + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 30 + freeze_selectors: [] + unfreeze_selectors: ["encoder", "head", "lora", "moe"] + unfreeze_lr_factor: 10 + - class_path: rslearn.train.callbacks.adapters.ActivateLayers + init_args: + selectors: + - name: "lora" + at_epoch: 20 + +merge_options: + merge_heads: true + merge_task_labels: true + same_label_groups: + - [detect_sentinel1_vessels, detect_sentinel2_vessels, vessel_detection] diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_02_final/exp_id.txt b/one_off_projects/2025_07_joint_finetune/configs/2025_09_02_final/exp_id.txt new file mode 100644 index 00000000..b15006e4 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_02_final/exp_id.txt @@ -0,0 +1 @@ +{task}_v3_again diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_02_final/segment.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_02_final/segment.yaml new file mode 100644 index 00000000..cf087231 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_02_final/segment.yaml @@ -0,0 +1,65 @@ +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_09_02_final/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_09_02_final/OUT_segment.yaml + +dataset_cfgs: + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_pastis/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_pastis/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_solar_farm_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_solar_farm_128/basecfg_helios_mm.yaml + +global_overrides: + model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.00015 + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 50 + eta_min: 0 + model: + init_args: + trunk: + class_path: rslearn.models.trunk.DecoderTrunk + init_args: + task_embedding: + class_path: rslearn.models.task_embedding.TaskChannelEmbedding + init_args: + encoder_embedding_size: 768 + add_spatial_embed: true + layers: + - class_path: rslp.helios.moe.MoETransformer + init_args: + dim: 768 + n_layers: 1 + n_heads: 12 + num_experts: 4 + num_slots: 4 + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: "{CHECKPOINT_PATH}" + selector: ["encoder"] + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_lora_kwargs: + use_task_lora: true + task_lora_indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] + gen_hidden: 64 + task_embed_opts: + type: "precomputed" + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt + trainer: + accumulate_grad_batches: 2 + +merge_options: + merge_heads: true + merge_task_labels: true + same_label_groups: + +substitutions: + patch_size: 8 + encoder_embedding_size: 768 + helios_checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_02_scaling/base.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_02_scaling/base.yaml new file mode 100644 index 00000000..1d7a8e64 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_02_scaling/base.yaml @@ -0,0 +1,48 @@ +model: + class_path: rslp.helios.lightning_module.MoELightningModule + init_args: + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + encoder: + - class_path: rslp.helios.model.Helios + init_args: + checkpoint_path: "{CHECKPOINT_PATH}" + selector: ["encoder"] + forward_kwargs: + patch_size: {PATCH_SIZE} + decoders: # Filled in by make_multidataset_config.py + lazy_decode: true + lr: 0.0001 + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 100 + eta_min: 0 + +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + sample_mode: random_cycle + refill_batches: true + num_workers: 16 + data_modules: # Filled in by make_multidataset_config.py + +trainer: + max_epochs: 100 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: "epoch" + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + save_top_k: 1 + every_n_epochs: 10 + save_last: true + monitor: val_loss + mode: min + +rslp_project: placeholder +rslp_experiment: placeholder + +all_dataset_info_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v3_multitask/all_dataset_info.yaml diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_marine_crop/OUT_crop_lora.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_marine_crop/OUT_crop_lora.yaml new file mode 100644 index 00000000..3e57e8ef --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_marine_crop/OUT_crop_lora.yaml @@ -0,0 +1,1817 @@ +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + batch_sizes: + crop_type_classification: 32 + cropland_classification: 16 + segment: 2 + data_modules: + crop_type_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 32 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: [] + sentinel2_1: [] + sentinel2_10: [] + sentinel2_11: [] + sentinel2_2: [] + sentinel2_3: [] + sentinel2_4: [] + sentinel2_5: [] + sentinel2_6: [] + sentinel2_7: [] + sentinel2_8: [] + sentinel2_9: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + sentinel1_0: [] + sentinel1_1: [] + sentinel1_10: [] + sentinel1_11: [] + sentinel1_2: [] + sentinel1_3: [] + sentinel1_4: [] + sentinel1_5: [] + sentinel1_6: [] + sentinel1_7: [] + sentinel1_8: [] + sentinel1_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.pad.Pad + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + mode: center + size: 8 + inputs: + label: + data_type: vector + is_target: true + layers: + - label + sentinel1_0: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + sentinel1_1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + sentinel1_10: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.10 + passthrough: true + sentinel1_11: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.11 + passthrough: true + sentinel1_2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + sentinel1_3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + sentinel1_4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.4 + passthrough: true + sentinel1_5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.5 + passthrough: true + sentinel1_6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.6 + passthrough: true + sentinel1_7: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.7 + passthrough: true + sentinel1_8: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.8 + passthrough: true + sentinel1_9: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.9 + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/crop/kenya_nandi/20250625 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + crop_type_classification: + label: targets + tasks: + crop_type_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Coffee + - Trees + - Grassland + - Maize + - Sugarcane + - Tea + - Water + - Built-up + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + test_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: val + train_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: train + val_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: val + cropland_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 16 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: [] + sentinel2_1: [] + sentinel2_10: [] + sentinel2_11: [] + sentinel2_2: [] + sentinel2_3: [] + sentinel2_4: [] + sentinel2_5: [] + sentinel2_6: [] + sentinel2_7: [] + sentinel2_8: [] + sentinel2_9: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + sentinel1_0: [] + sentinel1_1: [] + sentinel1_10: [] + sentinel1_11: [] + sentinel1_2: [] + sentinel1_3: [] + sentinel1_4: [] + sentinel1_5: [] + sentinel1_6: [] + sentinel1_7: [] + sentinel1_8: [] + sentinel1_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.pad.Pad + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + mode: center + size: 8 + inputs: + label: + data_type: vector + is_target: true + layers: + - label + sentinel1_0: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1 + passthrough: true + sentinel1_1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.1 + passthrough: true + sentinel1_10: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.10 + passthrough: true + sentinel1_11: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.11 + passthrough: true + sentinel1_2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.2 + passthrough: true + sentinel1_3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.3 + passthrough: true + sentinel1_4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.4 + passthrough: true + sentinel1_5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.5 + passthrough: true + sentinel1_6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.6 + passthrough: true + sentinel1_7: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.7 + passthrough: true + sentinel1_8: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.8 + passthrough: true + sentinel1_9: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.9 + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/crop/worldcereal_cropland/20250626 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + cropland_classification: + label: targets + tasks: + cropland_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Cropland + - Non-Cropland + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + test_config: + groups: + - h3_sample100_66K + tags: + split: val + train_config: + groups: + - h3_sample100_66K + tags: + split: train + val_config: + groups: + - h3_sample100_66K + tags: + split: val + segment: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 2 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_1: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_10: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_11: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_2: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_3: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_4: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_5: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_6: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_7: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_8: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_9: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1d_0: [] + s1d_1: [] + s1d_10: [] + s1d_11: [] + s1d_2: [] + s1d_3: [] + s1d_4: [] + s1d_5: [] + s1d_6: [] + s1d_7: [] + s1d_8: [] + s1d_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + s1d_0: + bands: + - vv + - vh + data_type: raster + layers: + - s1d + passthrough: true + s1d_1: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.1 + passthrough: true + s1d_10: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.10 + passthrough: true + s1d_11: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.11 + passthrough: true + s1d_2: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.2 + passthrough: true + s1d_3: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.3 + passthrough: true + s1d_4: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.4 + passthrough: true + s1d_5: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.5 + passthrough: true + s1d_6: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.6 + passthrough: true + s1d_7: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.7 + passthrough: true + s1d_8: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.8 + passthrough: true + s1d_9: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.9 + passthrough: true + targets: + bands: + - class + data_type: raster + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/pastis/rslearn_dataset/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + segment: + targets: targets + tasks: + segment: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_miou_metric: true + metric_kwargs: + average: micro + num_classes: 20 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + zero_is_invalid: true + test_config: + groups: + - fold5 + train_config: + groups: + - fold1 + - fold2 + - fold3 + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_1: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_10: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_11: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_2: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_3: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_4: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_5: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_6: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_7: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_8: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_9: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1d_0: [] + s1d_1: [] + s1d_10: [] + s1d_11: [] + s1d_2: [] + s1d_3: [] + s1d_4: [] + s1d_5: [] + s1d_6: [] + s1d_7: [] + s1d_8: [] + s1d_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + - target/segment/classes + - target/segment/valid + val_config: + groups: + - fold4 + num_workers: 16 + refill_batches: true + sample_mode: random_cycle +model: + class_path: rslp.helios.lightning_module.MoELightningModule + init_args: + lr: 0.0001 + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + decoder_to_target: + ClassificationHead: + - crop_type_classification + - cropland_classification + SegmentationHead: + - segment + decoders: + ClassificationHead: + - class_path: rslearn.models.pooling_decoder.PoolingDecoder + init_args: + in_channels: 768 + out_channels: 10 + - class_path: rslearn.train.tasks.classification.ClassificationHead + SegmentationHead: + - class_path: rslearn.models.unet.UNetDecoder + init_args: + conv_layers_per_resolution: 2 + in_channels: + - - 8 + - 768 + num_channels: + 1: 128 + 2: 256 + 4: 512 + 8: 512 + out_channels: 20 + - class_path: rslearn.train.tasks.segmentation.SegmentationHead + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: '{CHECKPOINT_PATH}' + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_lora_kwargs: + gen_hidden: 64 + task_lora_indices: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 10 + - 11 + use_task_lora: true + selector: + - encoder + task_embed_opts: + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt + type: precomputed + lazy_decode: true + task_label_offsets: + crop_type_classification: + num_outputs: 8 + offset: 0 + outputs_key: class + cropland_classification: + num_outputs: 2 + offset: 8 + outputs_key: class + segment: + num_outputs: 20 + offset: 0 + outputs_key: classes + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 100 + eta_min: 0 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + crop_type_classification: + label: targets + cropland_classification: + label: targets + segment: + targets: targets + tasks: + crop_type_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Coffee + - Trees + - Grassland + - Maize + - Sugarcane + - Tea + - Water + - Built-up + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + cropland_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Cropland + - Non-Cropland + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + segment: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_miou_metric: true + metric_kwargs: + average: micro + num_classes: 20 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + zero_is_invalid: true +rslp_experiment: placeholder +rslp_project: placeholder +trainer: + accumulate_grad_batches: 3 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: epoch + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + every_n_epochs: 10 + mode: min + monitor: val_loss + save_last: true + save_top_k: 1 + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 0 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 20 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - lora + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 40 + freeze_selectors: [] + unfreeze_lr_factor: 10 + unfreeze_selectors: + - encoder + - head + - lora + - class_path: rslearn.train.callbacks.adapters.ActivateLayers + init_args: + selectors: + - at_epoch: 20 + name: lora + max_epochs: 500 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_marine_crop/OUT_crop_lora_moe.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_marine_crop/OUT_crop_lora_moe.yaml new file mode 100644 index 00000000..7dc7ba8b --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_marine_crop/OUT_crop_lora_moe.yaml @@ -0,0 +1,1836 @@ +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + batch_sizes: + crop_type_classification: 32 + cropland_classification: 16 + segment: 2 + data_modules: + crop_type_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 32 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: [] + sentinel2_1: [] + sentinel2_10: [] + sentinel2_11: [] + sentinel2_2: [] + sentinel2_3: [] + sentinel2_4: [] + sentinel2_5: [] + sentinel2_6: [] + sentinel2_7: [] + sentinel2_8: [] + sentinel2_9: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + sentinel1_0: [] + sentinel1_1: [] + sentinel1_10: [] + sentinel1_11: [] + sentinel1_2: [] + sentinel1_3: [] + sentinel1_4: [] + sentinel1_5: [] + sentinel1_6: [] + sentinel1_7: [] + sentinel1_8: [] + sentinel1_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.pad.Pad + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + mode: center + size: 8 + inputs: + label: + data_type: vector + is_target: true + layers: + - label + sentinel1_0: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + sentinel1_1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + sentinel1_10: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.10 + passthrough: true + sentinel1_11: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.11 + passthrough: true + sentinel1_2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + sentinel1_3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + sentinel1_4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.4 + passthrough: true + sentinel1_5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.5 + passthrough: true + sentinel1_6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.6 + passthrough: true + sentinel1_7: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.7 + passthrough: true + sentinel1_8: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.8 + passthrough: true + sentinel1_9: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.9 + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/crop/kenya_nandi/20250625 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + crop_type_classification: + label: targets + tasks: + crop_type_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Coffee + - Trees + - Grassland + - Maize + - Sugarcane + - Tea + - Water + - Built-up + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + test_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: val + train_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: train + val_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: val + cropland_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 16 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: [] + sentinel2_1: [] + sentinel2_10: [] + sentinel2_11: [] + sentinel2_2: [] + sentinel2_3: [] + sentinel2_4: [] + sentinel2_5: [] + sentinel2_6: [] + sentinel2_7: [] + sentinel2_8: [] + sentinel2_9: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + sentinel1_0: [] + sentinel1_1: [] + sentinel1_10: [] + sentinel1_11: [] + sentinel1_2: [] + sentinel1_3: [] + sentinel1_4: [] + sentinel1_5: [] + sentinel1_6: [] + sentinel1_7: [] + sentinel1_8: [] + sentinel1_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.pad.Pad + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + mode: center + size: 8 + inputs: + label: + data_type: vector + is_target: true + layers: + - label + sentinel1_0: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1 + passthrough: true + sentinel1_1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.1 + passthrough: true + sentinel1_10: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.10 + passthrough: true + sentinel1_11: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.11 + passthrough: true + sentinel1_2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.2 + passthrough: true + sentinel1_3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.3 + passthrough: true + sentinel1_4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.4 + passthrough: true + sentinel1_5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.5 + passthrough: true + sentinel1_6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.6 + passthrough: true + sentinel1_7: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.7 + passthrough: true + sentinel1_8: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.8 + passthrough: true + sentinel1_9: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.9 + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/crop/worldcereal_cropland/20250626 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + cropland_classification: + label: targets + tasks: + cropland_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Cropland + - Non-Cropland + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + test_config: + groups: + - h3_sample100_66K + tags: + split: val + train_config: + groups: + - h3_sample100_66K + tags: + split: train + val_config: + groups: + - h3_sample100_66K + tags: + split: val + segment: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 2 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_1: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_10: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_11: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_2: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_3: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_4: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_5: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_6: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_7: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_8: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_9: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1d_0: [] + s1d_1: [] + s1d_10: [] + s1d_11: [] + s1d_2: [] + s1d_3: [] + s1d_4: [] + s1d_5: [] + s1d_6: [] + s1d_7: [] + s1d_8: [] + s1d_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + s1d_0: + bands: + - vv + - vh + data_type: raster + layers: + - s1d + passthrough: true + s1d_1: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.1 + passthrough: true + s1d_10: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.10 + passthrough: true + s1d_11: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.11 + passthrough: true + s1d_2: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.2 + passthrough: true + s1d_3: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.3 + passthrough: true + s1d_4: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.4 + passthrough: true + s1d_5: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.5 + passthrough: true + s1d_6: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.6 + passthrough: true + s1d_7: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.7 + passthrough: true + s1d_8: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.8 + passthrough: true + s1d_9: + bands: + - vv + - vh + data_type: raster + layers: + - s1d.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + data_type: raster + layers: + - sentinel2.9 + passthrough: true + targets: + bands: + - class + data_type: raster + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/pastis/rslearn_dataset/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + segment: + targets: targets + tasks: + segment: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_miou_metric: true + metric_kwargs: + average: micro + num_classes: 20 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + zero_is_invalid: true + test_config: + groups: + - fold5 + train_config: + groups: + - fold1 + - fold2 + - fold3 + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_1: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_10: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_11: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_2: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_3: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_4: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_5: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_6: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_7: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_8: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + sentinel2_9: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 0 + - 7 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1d_0: [] + s1d_1: [] + s1d_10: [] + s1d_11: [] + s1d_2: [] + s1d_3: [] + s1d_4: [] + s1d_5: [] + s1d_6: [] + s1d_7: [] + s1d_8: [] + s1d_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + - target/segment/classes + - target/segment/valid + val_config: + groups: + - fold4 + num_workers: 16 + refill_batches: true + sample_mode: random_cycle +model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.0001 + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + decoder_to_target: + ClassificationHead: + - crop_type_classification + - cropland_classification + SegmentationHead: + - segment + decoders: + ClassificationHead: + - class_path: rslearn.models.pooling_decoder.PoolingDecoder + init_args: + in_channels: 768 + out_channels: 10 + - class_path: rslearn.train.tasks.classification.ClassificationHead + SegmentationHead: + - class_path: rslearn.models.unet.UNetDecoder + init_args: + conv_layers_per_resolution: 2 + in_channels: + - - 8 + - 768 + num_channels: + 1: 128 + 2: 256 + 4: 512 + 8: 512 + out_channels: 20 + - class_path: rslearn.train.tasks.segmentation.SegmentationHead + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: '{CHECKPOINT_PATH}' + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_lora_kwargs: + gen_hidden: 64 + task_lora_indices: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 10 + - 11 + use_task_lora: true + selector: + - encoder + task_embed_opts: + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt + type: precomputed + lazy_decode: true + task_label_offsets: + crop_type_classification: + num_outputs: 8 + offset: 0 + outputs_key: class + cropland_classification: + num_outputs: 2 + offset: 8 + outputs_key: class + segment: + num_outputs: 20 + offset: 0 + outputs_key: classes + trunk: + class_path: rslearn.models.trunk.DecoderTrunk + init_args: + layers: + - class_path: rslp.helios.moe.MoETransformer + init_args: + dim: 768 + n_heads: 12 + n_layers: 1 + num_experts: 4 + num_slots: 4 + task_embedding: + class_path: rslearn.models.task_embedding.TaskChannelEmbedding + init_args: + add_spatial_embed: true + encoder_embedding_size: 768 + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 100 + eta_min: 0 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + crop_type_classification: + label: targets + cropland_classification: + label: targets + segment: + targets: targets + tasks: + crop_type_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Coffee + - Trees + - Grassland + - Maize + - Sugarcane + - Tea + - Water + - Built-up + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + cropland_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Cropland + - Non-Cropland + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + segment: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_miou_metric: true + metric_kwargs: + average: micro + num_classes: 20 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + zero_is_invalid: true +rslp_experiment: placeholder +rslp_project: placeholder +trainer: + accumulate_grad_batches: 3 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: epoch + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + every_n_epochs: 10 + mode: min + monitor: val_loss + save_last: true + save_top_k: 1 + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 0 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - moe + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 20 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - lora + - moe + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 40 + freeze_selectors: [] + unfreeze_lr_factor: 10 + unfreeze_selectors: + - encoder + - head + - lora + - moe + - class_path: rslearn.train.callbacks.adapters.ActivateLayers + init_args: + selectors: + - at_epoch: 20 + name: lora + max_epochs: 500 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_marine_crop/OUT_marine_lora_moe.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_marine_crop/OUT_marine_lora_moe.yaml new file mode 100644 index 00000000..813a4219 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_marine_crop/OUT_marine_lora_moe.yaml @@ -0,0 +1,2399 @@ +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + batch_sizes: + detect_satlas_marine_infra: 8 + detect_satlas_wind_turbine: 8 + detect_sentinel1_vessels: 8 + detect_sentinel2_vessels: 8 + segment_satlas_solar_farm: 8 + vessel_classification: 16 + vessel_detection: 8 + data_modules: + detect_satlas_marine_infra: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/marine_infra/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_marine_infra: + targets: targets + tasks: + detect_satlas_marine_infra: + class_path: rslp.satlas.train.MarineInfraTask + init_args: + box_size: 15 + classes: + - unknown + - platform + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + - - 0.1 + - - 0.2 + - - 0.3 + - - 0.4 + - - 0.5 + - - 0.6 + - - 0.7 + - - 0.8 + - - 0.9 + image_bands: + - 2 + - 1 + - 0 + property_name: category + remap_values: + - - 0 + - 0.25 + - - 0 + - 255 + skip_unknown_categories: true + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 65536 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_satlas_marine_infra + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + val_config: + patch_size: 128 + tags: + split: val + detect_satlas_wind_turbine: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + s25: [] + s26: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + landsat5: [] + landsat6: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + s1a5: [] + s1a6: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + landsat5: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.4 + passthrough: true + landsat6: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.5 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1a5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.4 + passthrough: true + s1a6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.5 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s1d5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.4 + passthrough: true + s1d6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.5 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + s25: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + s26: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/wind_turbine/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_wind_turbine: + targets: targets + tasks: + detect_satlas_wind_turbine: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 65536 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + s25: [] + s26: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + landsat5: [] + landsat6: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + s1a5: [] + s1a6: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_satlas_wind_turbine + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + val_config: + patch_size: 128 + tags: + split: val + detect_sentinel1_vessels: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/sentinel1_vessels/dataset_v1/20250602/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_sentinel1_vessels: + targets: targets + tasks: + detect_sentinel1_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + image_bands: + - 1 + - 1 + - 1 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.5 + test_config: + groups: + - val_ascending + - val_descending + patch_size: 128 + train_config: + groups: + - train_ascending + - train_descending + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 32768 + replacement: true + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_sentinel1_vessels + image_selectors: + - image + - sentinel1 + val_config: + groups: + - val_ascending + - val_descending + patch_size: 128 + detect_sentinel2_vessels: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/sentinel2_vessels/dataset_v1/20250213/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_sentinel2_vessels: + targets: targets + tasks: + detect_sentinel2_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + groups: + - sargassum_val + - split1 + - split7 + patch_size: 128 + train_config: + groups: + - sargassum_train + - split2 + - split3 + - split4 + - split5 + - split6 + - train + - train-bg + - train2 + - train3 + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 131072 + replacement: true + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_sentinel2_vessels + image_selectors: + - image + - sentinel2_l2a + val_config: + groups: + - sargassum_val + - split1 + - split7 + patch_size: 128 + segment_satlas_solar_farm: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + targets: + bands: + - label + data_type: raster + dtype: INT32 + is_target: true + layers: + - label_raster + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/solar_farm/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + segment_satlas_solar_farm: + targets: targets + tasks: + segment_satlas_solar_farm: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_f1_metric: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + metric_kwargs: + average: micro + num_classes: 2 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 16384 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - target/segment_satlas_solar_farm/classes + - target/segment_satlas_solar_farm/valid + val_config: + patch_size: 128 + tags: + split: val + vessel_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 16 + default_config: + transforms: + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + label: + data_type: vector + is_target: true + layers: + - label + landsat: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/landsat_vessel_detection/classifier/dataset_20250624 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + vessel_classification: + label: targets + tasks: + vessel_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + allow_invalid: true + classes: + - correct + - incorrect + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: label + skip_unknown_categories: true + test_config: + groups: + - phase2a_completed + tags: + split: val + train_config: + groups: + - selected_copy + - phase2a_completed + - phase3a_selected + tags: + split: train + val_config: + groups: + - phase2a_completed + tags: + split: val + vessel_detection: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/landsat_vessel_detection/detector/dataset_20250624 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + vessel_detection: + targets: targets + tasks: + vessel_detection: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.7 + test_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: val + train_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: train + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + val_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: val + num_workers: 16 + refill_batches: true + sample_mode: random_cycle +model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.0001 + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + decoder_to_target: + ClassificationHead: + - vessel_classification + FasterRCNN: + - vessel_detection + - detect_satlas_marine_infra + - detect_satlas_wind_turbine + - detect_sentinel1_vessels + - detect_sentinel2_vessels + SegmentationHead: + - segment_satlas_solar_farm + decoders: + ClassificationHead: + - class_path: rslearn.models.pooling_decoder.PoolingDecoder + init_args: + in_channels: 768 + out_channels: 2 + - class_path: rslearn.train.tasks.classification.ClassificationHead + FasterRCNN: + - class_path: rslearn.models.faster_rcnn.FasterRCNN + init_args: + anchor_sizes: + - - 32 + downsample_factors: + - 8 + num_channels: 768 + num_classes: 8 + SegmentationHead: + - class_path: rslearn.models.unet.UNetDecoder + init_args: + conv_layers_per_resolution: 2 + in_channels: + - - 8 + - 768 + num_channels: + 1: 128 + 2: 256 + 4: 512 + 8: 512 + out_channels: 2 + - class_path: rslearn.train.tasks.segmentation.SegmentationHead + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: '{CHECKPOINT_PATH}' + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_lora_kwargs: + gen_hidden: 64 + task_lora_indices: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 10 + - 11 + use_task_lora: true + selector: + - encoder + task_embed_opts: + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt + type: precomputed + lazy_decode: true + task_label_offsets: + detect_satlas_marine_infra: + num_outputs: 3 + offset: 2 + outputs_key: labels + detect_satlas_wind_turbine: + num_outputs: 3 + offset: 5 + outputs_key: labels + detect_sentinel1_vessels: + num_outputs: 2 + offset: 0 + outputs_key: labels + detect_sentinel2_vessels: + num_outputs: 2 + offset: 0 + outputs_key: labels + segment_satlas_solar_farm: + num_outputs: 2 + offset: 0 + outputs_key: classes + vessel_classification: + num_outputs: 2 + offset: 0 + outputs_key: class + vessel_detection: + num_outputs: 2 + offset: 0 + outputs_key: labels + trunk: + class_path: rslearn.models.trunk.DecoderTrunk + init_args: + layers: + - class_path: rslp.helios.moe.MoETransformer + init_args: + dim: 768 + n_heads: 12 + n_layers: 1 + num_experts: 4 + num_slots: 4 + task_embedding: + class_path: rslearn.models.task_embedding.TaskChannelEmbedding + init_args: + add_spatial_embed: true + encoder_embedding_size: 768 + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 100 + eta_min: 0 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_marine_infra: + targets: targets + detect_satlas_wind_turbine: + targets: targets + detect_sentinel1_vessels: + targets: targets + detect_sentinel2_vessels: + targets: targets + segment_satlas_solar_farm: + targets: targets + vessel_classification: + label: targets + vessel_detection: + targets: targets + tasks: + detect_satlas_marine_infra: + class_path: rslp.satlas.train.MarineInfraTask + init_args: + box_size: 15 + classes: + - unknown + - platform + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + - - 0.1 + - - 0.2 + - - 0.3 + - - 0.4 + - - 0.5 + - - 0.6 + - - 0.7 + - - 0.8 + - - 0.9 + image_bands: + - 2 + - 1 + - 0 + property_name: category + remap_values: + - - 0 + - 0.25 + - - 0 + - 255 + skip_unknown_categories: true + detect_satlas_wind_turbine: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + detect_sentinel1_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + image_bands: + - 1 + - 1 + - 1 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.5 + detect_sentinel2_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + segment_satlas_solar_farm: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_f1_metric: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + metric_kwargs: + average: micro + num_classes: 2 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + vessel_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + allow_invalid: true + classes: + - correct + - incorrect + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: label + skip_unknown_categories: true + vessel_detection: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.7 +rslp_experiment: placeholder +rslp_project: placeholder +trainer: + accumulate_grad_batches: 7 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: epoch + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + every_n_epochs: 10 + mode: min + monitor: val_loss + save_last: true + save_top_k: 1 + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 0 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - moe + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 20 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - moe + - lora + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 40 + freeze_selectors: [] + unfreeze_lr_factor: 10 + unfreeze_selectors: + - head + - encoder + - lora + - moe + - class_path: rslearn.train.callbacks.adapters.ActivateLayers + init_args: + selectors: + - at_epoch: 20 + name: lora + max_epochs: 500 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_marine_crop/OUT_marine_moe.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_marine_crop/OUT_marine_moe.yaml new file mode 100644 index 00000000..0c168c3f --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_marine_crop/OUT_marine_moe.yaml @@ -0,0 +1,2363 @@ +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + batch_sizes: + detect_satlas_marine_infra: 8 + detect_satlas_wind_turbine: 8 + detect_sentinel1_vessels: 8 + detect_sentinel2_vessels: 8 + segment_satlas_solar_farm: 8 + vessel_classification: 16 + vessel_detection: 8 + data_modules: + detect_satlas_marine_infra: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/marine_infra/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_marine_infra: + targets: targets + tasks: + detect_satlas_marine_infra: + class_path: rslp.satlas.train.MarineInfraTask + init_args: + box_size: 15 + classes: + - unknown + - platform + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + - - 0.1 + - - 0.2 + - - 0.3 + - - 0.4 + - - 0.5 + - - 0.6 + - - 0.7 + - - 0.8 + - - 0.9 + image_bands: + - 2 + - 1 + - 0 + property_name: category + remap_values: + - - 0 + - 0.25 + - - 0 + - 255 + skip_unknown_categories: true + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 65536 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_satlas_marine_infra + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + val_config: + patch_size: 128 + tags: + split: val + detect_satlas_wind_turbine: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + s25: [] + s26: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + landsat5: [] + landsat6: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + s1a5: [] + s1a6: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + landsat5: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.4 + passthrough: true + landsat6: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.5 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1a5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.4 + passthrough: true + s1a6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.5 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s1d5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.4 + passthrough: true + s1d6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.5 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + s25: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + s26: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/wind_turbine/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_wind_turbine: + targets: targets + tasks: + detect_satlas_wind_turbine: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 65536 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + s25: [] + s26: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + landsat5: [] + landsat6: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + s1a5: [] + s1a6: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_satlas_wind_turbine + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + val_config: + patch_size: 128 + tags: + split: val + detect_sentinel1_vessels: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/sentinel1_vessels/dataset_v1/20250602/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_sentinel1_vessels: + targets: targets + tasks: + detect_sentinel1_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + image_bands: + - 1 + - 1 + - 1 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.5 + test_config: + groups: + - val_ascending + - val_descending + patch_size: 128 + train_config: + groups: + - train_ascending + - train_descending + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 32768 + replacement: true + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_sentinel1_vessels + image_selectors: + - image + - sentinel1 + val_config: + groups: + - val_ascending + - val_descending + patch_size: 128 + detect_sentinel2_vessels: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/sentinel2_vessels/dataset_v1/20250213/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_sentinel2_vessels: + targets: targets + tasks: + detect_sentinel2_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + groups: + - sargassum_val + - split1 + - split7 + patch_size: 128 + train_config: + groups: + - sargassum_train + - split2 + - split3 + - split4 + - split5 + - split6 + - train + - train-bg + - train2 + - train3 + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 131072 + replacement: true + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_sentinel2_vessels + image_selectors: + - image + - sentinel2_l2a + val_config: + groups: + - sargassum_val + - split1 + - split7 + patch_size: 128 + segment_satlas_solar_farm: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + targets: + bands: + - label + data_type: raster + dtype: INT32 + is_target: true + layers: + - label_raster + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/solar_farm/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + segment_satlas_solar_farm: + targets: targets + tasks: + segment_satlas_solar_farm: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_f1_metric: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + metric_kwargs: + average: micro + num_classes: 2 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 16384 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - target/segment_satlas_solar_farm/classes + - target/segment_satlas_solar_farm/valid + val_config: + patch_size: 128 + tags: + split: val + vessel_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 16 + default_config: + transforms: + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + label: + data_type: vector + is_target: true + layers: + - label + landsat: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/landsat_vessel_detection/classifier/dataset_20250624 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + vessel_classification: + label: targets + tasks: + vessel_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + allow_invalid: true + classes: + - correct + - incorrect + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: label + skip_unknown_categories: true + test_config: + groups: + - phase2a_completed + tags: + split: val + train_config: + groups: + - selected_copy + - phase2a_completed + - phase3a_selected + tags: + split: train + val_config: + groups: + - phase2a_completed + tags: + split: val + vessel_detection: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/landsat_vessel_detection/detector/dataset_20250624 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + vessel_detection: + targets: targets + tasks: + vessel_detection: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.7 + test_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: val + train_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: train + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + val_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: val + num_workers: 16 + refill_batches: true + sample_mode: random_cycle +model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.0001 + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + decoder_to_target: + ClassificationHead: + - vessel_classification + FasterRCNN: + - vessel_detection + - detect_satlas_marine_infra + - detect_satlas_wind_turbine + - detect_sentinel1_vessels + - detect_sentinel2_vessels + SegmentationHead: + - segment_satlas_solar_farm + decoders: + ClassificationHead: + - class_path: rslearn.models.pooling_decoder.PoolingDecoder + init_args: + in_channels: 768 + out_channels: 2 + - class_path: rslearn.train.tasks.classification.ClassificationHead + FasterRCNN: + - class_path: rslearn.models.faster_rcnn.FasterRCNN + init_args: + anchor_sizes: + - - 32 + downsample_factors: + - 8 + num_channels: 768 + num_classes: 8 + SegmentationHead: + - class_path: rslearn.models.unet.UNetDecoder + init_args: + conv_layers_per_resolution: 2 + in_channels: + - - 8 + - 768 + num_channels: + 1: 128 + 2: 256 + 4: 512 + 8: 512 + out_channels: 2 + - class_path: rslearn.train.tasks.segmentation.SegmentationHead + encoder: + - class_path: rslp.helios.model.Helios + init_args: + checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + forward_kwargs: + patch_size: 8 + selector: + - encoder + lazy_decode: true + task_label_offsets: + detect_satlas_marine_infra: + num_outputs: 3 + offset: 2 + outputs_key: labels + detect_satlas_wind_turbine: + num_outputs: 3 + offset: 5 + outputs_key: labels + detect_sentinel1_vessels: + num_outputs: 2 + offset: 0 + outputs_key: labels + detect_sentinel2_vessels: + num_outputs: 2 + offset: 0 + outputs_key: labels + segment_satlas_solar_farm: + num_outputs: 2 + offset: 0 + outputs_key: classes + vessel_classification: + num_outputs: 2 + offset: 0 + outputs_key: class + vessel_detection: + num_outputs: 2 + offset: 0 + outputs_key: labels + trunk: + class_path: rslearn.models.trunk.DecoderTrunk + init_args: + layers: + - class_path: rslp.helios.moe.MoETransformer + init_args: + dim: 768 + n_heads: 12 + n_layers: 1 + num_experts: 4 + num_slots: 4 + task_embedding: + class_path: rslearn.models.task_embedding.TaskChannelEmbedding + init_args: + add_spatial_embed: true + encoder_embedding_size: 768 + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 100 + eta_min: 0 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_marine_infra: + targets: targets + detect_satlas_wind_turbine: + targets: targets + detect_sentinel1_vessels: + targets: targets + detect_sentinel2_vessels: + targets: targets + segment_satlas_solar_farm: + targets: targets + vessel_classification: + label: targets + vessel_detection: + targets: targets + tasks: + detect_satlas_marine_infra: + class_path: rslp.satlas.train.MarineInfraTask + init_args: + box_size: 15 + classes: + - unknown + - platform + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + - - 0.1 + - - 0.2 + - - 0.3 + - - 0.4 + - - 0.5 + - - 0.6 + - - 0.7 + - - 0.8 + - - 0.9 + image_bands: + - 2 + - 1 + - 0 + property_name: category + remap_values: + - - 0 + - 0.25 + - - 0 + - 255 + skip_unknown_categories: true + detect_satlas_wind_turbine: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + detect_sentinel1_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + image_bands: + - 1 + - 1 + - 1 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.5 + detect_sentinel2_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + segment_satlas_solar_farm: + class_path: rslearn.train.tasks.segmentation.SegmentationTask + init_args: + enable_f1_metric: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + metric_kwargs: + average: micro + num_classes: 2 + remap_values: + - - 0 + - 1 + - - 0 + - 255 + vessel_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + allow_invalid: true + classes: + - correct + - incorrect + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: label + skip_unknown_categories: true + vessel_detection: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.7 +rslp_experiment: placeholder +rslp_project: placeholder +trainer: + accumulate_grad_batches: 7 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: epoch + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + every_n_epochs: 10 + mode: min + monitor: val_loss + save_last: true + save_top_k: 1 + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 0 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - moe + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 20 + freeze_selectors: [] + unfreeze_lr_factor: 10 + unfreeze_selectors: + - head + - moe + - encoder + max_epochs: 500 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_marine_crop/base.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_marine_crop/base.yaml new file mode 100644 index 00000000..64d29a72 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_marine_crop/base.yaml @@ -0,0 +1,48 @@ +model: + class_path: rslp.helios.lightning_module.MoELightningModule + init_args: + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + encoder: + - class_path: rslp.helios.model.Helios + init_args: + checkpoint_path: "{CHECKPOINT_PATH}" + selector: ["encoder"] + forward_kwargs: + patch_size: {PATCH_SIZE} + decoders: # Filled in by make_multidataset_config.py + lazy_decode: true + lr: 0.0001 + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 100 + eta_min: 0 + +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + sample_mode: random_cycle + refill_batches: true + num_workers: 16 + data_modules: # Filled in by make_multidataset_config.py + +trainer: + max_epochs: 500 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: "epoch" + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + save_top_k: 1 + save_last: true + monitor: val_loss + mode: min + every_n_epochs: 10 + +rslp_project: placeholder +rslp_experiment: placeholder + +all_dataset_info_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v3_multitask/all_dataset_info.yaml diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_marine_crop/crop_lora.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_marine_crop/crop_lora.yaml new file mode 100644 index 00000000..4979c4b2 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_marine_crop/crop_lora.yaml @@ -0,0 +1,67 @@ +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_marine_crop/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_marine_crop/OUT_crop_lora.yaml + +dataset_cfgs: + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_nandi_crop_type/finetune_s1_s2_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_worldcereal_cropland/finetune_s1_s2_cosinelr.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_pastis/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_pastis/basecfg_helios_mm.yaml + +substitutions: + patch_size: 8 + encoder_embedding_size: 768 + helios_checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + +global_overrides: + model: + init_args: + model: + init_args: + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: "{CHECKPOINT_PATH}" + selector: ["encoder"] + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_lora_kwargs: + use_task_lora: true + task_lora_indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] + gen_hidden: 64 + task_embed_opts: + type: "precomputed" + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt + trainer: + accumulate_grad_batches: 3 + callbacks+: + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 0 + freeze_selectors: ["encoder"] + unfreeze_selectors: ["head"] + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 20 + freeze_selectors: ["encoder"] + unfreeze_selectors: ["head", "lora"] + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 40 + freeze_selectors: [] + unfreeze_selectors: ["encoder", "head", "lora"] + unfreeze_lr_factor: 10 + - class_path: rslearn.train.callbacks.adapters.ActivateLayers + init_args: + selectors: + - name: "lora" + at_epoch: 20 + +merge_options: + merge_heads: true + merge_task_labels: true + same_label_groups: diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_marine_crop/crop_lora_moe.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_marine_crop/crop_lora_moe.yaml new file mode 100644 index 00000000..9f744378 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_marine_crop/crop_lora_moe.yaml @@ -0,0 +1,84 @@ +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_marine_crop/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_marine_crop/OUT_crop_lora_moe.yaml + +dataset_cfgs: + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_nandi_crop_type/finetune_s1_s2_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_worldcereal_cropland/finetune_s1_s2_cosinelr.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_pastis/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_pastis/basecfg_helios_mm.yaml + +substitutions: + patch_size: 8 + encoder_embedding_size: 768 + helios_checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + +global_overrides: + model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + model: + init_args: + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: "{CHECKPOINT_PATH}" + selector: ["encoder"] + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_lora_kwargs: + use_task_lora: true + task_lora_indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] + gen_hidden: 64 + task_embed_opts: + type: "precomputed" + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt + trunk: + class_path: rslearn.models.trunk.DecoderTrunk + init_args: + task_embedding: + class_path: rslearn.models.task_embedding.TaskChannelEmbedding + init_args: + encoder_embedding_size: 768 + add_spatial_embed: true + layers: + - class_path: rslp.helios.moe.MoETransformer + init_args: + dim: 768 + n_layers: 1 + n_heads: 12 + num_experts: 4 + num_slots: 4 + trainer: + accumulate_grad_batches: 3 + callbacks+: + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 0 + freeze_selectors: ["encoder"] + unfreeze_selectors: ["head", "moe"] + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 20 + freeze_selectors: ["encoder"] + unfreeze_selectors: ["head", "lora", "moe"] + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 40 + freeze_selectors: [] + unfreeze_selectors: ["encoder", "head", "lora", "moe"] + unfreeze_lr_factor: 10 + - class_path: rslearn.train.callbacks.adapters.ActivateLayers + init_args: + selectors: + - name: "lora" + at_epoch: 20 + +merge_options: + merge_heads: true + merge_task_labels: true + same_label_groups: diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_marine_crop/exp_id.txt b/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_marine_crop/exp_id.txt new file mode 100644 index 00000000..30e4a392 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_marine_crop/exp_id.txt @@ -0,0 +1 @@ +{task} diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_marine_crop/marine_lora_moe.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_marine_crop/marine_lora_moe.yaml new file mode 100644 index 00000000..ea39c126 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_marine_crop/marine_lora_moe.yaml @@ -0,0 +1,93 @@ +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_marine_crop/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_marine_crop/OUT_marine_lora_moe.yaml + +dataset_cfgs: + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_classifier_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_detector_cosinelr.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_marine_infra_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_marine_infra_128/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_wind_turbine_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_wind_turbine_128/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_helios.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel2_vessels_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel2_vessels_128/basecfg_helios.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_solar_farm_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_solar_farm_128/basecfg_helios_mm.yaml + +substitutions: + patch_size: 8 + encoder_embedding_size: 768 + helios_checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + +global_overrides: + model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + model: + init_args: + trunk: + class_path: rslearn.models.trunk.DecoderTrunk + init_args: + task_embedding: + class_path: rslearn.models.task_embedding.TaskChannelEmbedding + init_args: + encoder_embedding_size: 768 + add_spatial_embed: true + layers: + - class_path: rslp.helios.moe.MoETransformer + init_args: + dim: 768 + n_layers: 1 + n_heads: 12 + num_experts: 4 + num_slots: 4 + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: "{CHECKPOINT_PATH}" + selector: ["encoder"] + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_lora_kwargs: + use_task_lora: true + task_lora_indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] + gen_hidden: 64 + task_embed_opts: + type: "precomputed" + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt + trainer: + accumulate_grad_batches: 7 + callbacks+: + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 0 + freeze_selectors: ["encoder"] + unfreeze_selectors: ["head", "moe"] + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 20 + freeze_selectors: ["encoder"] + unfreeze_selectors: ["head", "moe", "lora"] + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 40 + freeze_selectors: [] + unfreeze_selectors: ["head", "encoder", "lora", "moe"] + unfreeze_lr_factor: 10 + - class_path: rslearn.train.callbacks.adapters.ActivateLayers + init_args: + selectors: + - name: "lora" + at_epoch: 20 + +merge_options: + merge_heads: true + merge_task_labels: true + same_label_groups: + - [detect_sentinel1_vessels, detect_sentinel2_vessels, vessel_detection] diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_marine_crop/marine_moe.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_marine_crop/marine_moe.yaml new file mode 100644 index 00000000..70af2179 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_marine_crop/marine_moe.yaml @@ -0,0 +1,67 @@ +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_marine_crop/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_marine_crop/OUT_marine_moe.yaml + +dataset_cfgs: + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_classifier_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_detector_cosinelr.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_marine_infra_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_marine_infra_128/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_wind_turbine_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_wind_turbine_128/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_helios.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel2_vessels_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel2_vessels_128/basecfg_helios.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_solar_farm_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_solar_farm_128/basecfg_helios_mm.yaml + +substitutions: + patch_size: 8 + encoder_embedding_size: 768 + helios_checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + +global_overrides: + model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + model: + init_args: + trunk: + class_path: rslearn.models.trunk.DecoderTrunk + init_args: + task_embedding: + class_path: rslearn.models.task_embedding.TaskChannelEmbedding + init_args: + encoder_embedding_size: 768 + add_spatial_embed: true + layers: + - class_path: rslp.helios.moe.MoETransformer + init_args: + dim: 768 + n_layers: 1 + n_heads: 12 + num_experts: 4 + num_slots: 4 + trainer: + accumulate_grad_batches: 7 + callbacks+: + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 0 + freeze_selectors: ["encoder"] + unfreeze_selectors: ["head", "moe"] + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 20 + freeze_selectors: [] + unfreeze_selectors: ["head", "moe", "encoder"] + unfreeze_lr_factor: 10 + +merge_options: + merge_heads: true + merge_task_labels: true + same_label_groups: + - [detect_sentinel1_vessels, detect_sentinel2_vessels, vessel_detection] diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_scaling/OUT_crop_1.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_scaling/OUT_crop_1.yaml new file mode 100644 index 00000000..103082ac --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_scaling/OUT_crop_1.yaml @@ -0,0 +1,587 @@ +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + batch_sizes: + crop_type_classification: 32 + data_modules: + crop_type_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 32 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: [] + sentinel2_1: [] + sentinel2_10: [] + sentinel2_11: [] + sentinel2_2: [] + sentinel2_3: [] + sentinel2_4: [] + sentinel2_5: [] + sentinel2_6: [] + sentinel2_7: [] + sentinel2_8: [] + sentinel2_9: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + sentinel1_0: [] + sentinel1_1: [] + sentinel1_10: [] + sentinel1_11: [] + sentinel1_2: [] + sentinel1_3: [] + sentinel1_4: [] + sentinel1_5: [] + sentinel1_6: [] + sentinel1_7: [] + sentinel1_8: [] + sentinel1_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.pad.Pad + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + mode: center + size: 8 + inputs: + label: + data_type: vector + is_target: true + layers: + - label + sentinel1_0: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + sentinel1_1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + sentinel1_10: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.10 + passthrough: true + sentinel1_11: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.11 + passthrough: true + sentinel1_2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + sentinel1_3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + sentinel1_4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.4 + passthrough: true + sentinel1_5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.5 + passthrough: true + sentinel1_6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.6 + passthrough: true + sentinel1_7: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.7 + passthrough: true + sentinel1_8: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.8 + passthrough: true + sentinel1_9: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.9 + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/crop/kenya_nandi/20250625 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + crop_type_classification: + label: targets + tasks: + crop_type_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Coffee + - Trees + - Grassland + - Maize + - Sugarcane + - Tea + - Water + - Built-up + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + test_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: val + train_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: train + val_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: val + num_workers: 16 + refill_batches: true + sample_mode: random_cycle +model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.0002 + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + decoder_to_target: + ClassificationHead: + - crop_type_classification + decoders: + ClassificationHead: + - class_path: rslearn.models.pooling_decoder.PoolingDecoder + init_args: + in_channels: 768 + out_channels: 8 + - class_path: rslearn.train.tasks.classification.ClassificationHead + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: '{CHECKPOINT_PATH}' + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_lora_kwargs: + gen_hidden: 64 + task_lora_indices: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 10 + - 11 + use_task_lora: true + selector: + - encoder + task_embed_opts: + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt + type: precomputed + lazy_decode: true + task_label_offsets: + crop_type_classification: + num_outputs: 8 + offset: 0 + outputs_key: class + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 50 + eta_min: 0 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + crop_type_classification: + label: targets + tasks: + crop_type_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Coffee + - Trees + - Grassland + - Maize + - Sugarcane + - Tea + - Water + - Built-up + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category +rslp_experiment: placeholder +rslp_project: placeholder +trainer: + accumulate_grad_batches: 2 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: epoch + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + every_n_epochs: 10 + mode: min + monitor: val_loss + save_last: true + save_top_k: 1 + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 0 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 20 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - lora + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 50 + freeze_selectors: [] + unfreeze_lr_factor: 10 + unfreeze_selectors: + - encoder + - head + - lora + - class_path: rslearn.train.callbacks.adapters.ActivateLayers + init_args: + selectors: + - at_epoch: 20 + name: lora + max_epochs: 500 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_scaling/OUT_crop_2.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_scaling/OUT_crop_2.yaml new file mode 100644 index 00000000..5a96511b --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_scaling/OUT_crop_2.yaml @@ -0,0 +1,1201 @@ +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + batch_sizes: + crop_type_classification: 32 + detect_satlas_wind_turbine: 8 + data_modules: + crop_type_classification: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 32 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + sentinel2_0: [] + sentinel2_1: [] + sentinel2_10: [] + sentinel2_11: [] + sentinel2_2: [] + sentinel2_3: [] + sentinel2_4: [] + sentinel2_5: [] + sentinel2_6: [] + sentinel2_7: [] + sentinel2_8: [] + sentinel2_9: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + sentinel1_0: [] + sentinel1_1: [] + sentinel1_10: [] + sentinel1_11: [] + sentinel1_2: [] + sentinel1_3: [] + sentinel1_4: [] + sentinel1_5: [] + sentinel1_6: [] + sentinel1_7: [] + sentinel1_8: [] + sentinel1_9: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.pad.Pad + init_args: + image_selectors: + - sentinel2_l2a + - sentinel1 + mode: center + size: 8 + inputs: + label: + data_type: vector + is_target: true + layers: + - label + sentinel1_0: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + sentinel1_1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + sentinel1_10: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.10 + passthrough: true + sentinel1_11: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.11 + passthrough: true + sentinel1_2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + sentinel1_3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + sentinel1_4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.4 + passthrough: true + sentinel1_5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.5 + passthrough: true + sentinel1_6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.6 + passthrough: true + sentinel1_7: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.7 + passthrough: true + sentinel1_8: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.8 + passthrough: true + sentinel1_9: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.9 + passthrough: true + sentinel2_0: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + sentinel2_1: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + sentinel2_10: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.10 + passthrough: true + sentinel2_11: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.11 + passthrough: true + sentinel2_2: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + sentinel2_3: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + sentinel2_4: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + sentinel2_5: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + sentinel2_6: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.6 + passthrough: true + sentinel2_7: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.7 + passthrough: true + sentinel2_8: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.8 + passthrough: true + sentinel2_9: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.9 + passthrough: true + num_workers: 32 + path: /weka/dfive-default/rslearn-eai/datasets/crop/kenya_nandi/20250625 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + crop_type_classification: + label: targets + tasks: + crop_type_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Coffee + - Trees + - Grassland + - Maize + - Sugarcane + - Tea + - Water + - Built-up + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + test_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: val + train_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: train + val_config: + groups: + - groundtruth_polygon_split_window_32 + - worldcover_window_32 + tags: + split: val + detect_satlas_wind_turbine: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + s25: [] + s26: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + landsat5: [] + landsat6: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + s1a5: [] + s1a6: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + landsat5: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.4 + passthrough: true + landsat6: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.5 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1a5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.4 + passthrough: true + s1a6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.5 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s1d5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.4 + passthrough: true + s1d6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.5 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + s25: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + s26: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/wind_turbine/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_wind_turbine: + targets: targets + tasks: + detect_satlas_wind_turbine: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 65536 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + s25: [] + s26: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + landsat5: [] + landsat6: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + s1a5: [] + s1a6: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_satlas_wind_turbine + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + val_config: + patch_size: 128 + tags: + split: val + num_workers: 16 + refill_batches: true + sample_mode: random_cycle +model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.0002 + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + decoder_to_target: + ClassificationHead: + - crop_type_classification + FasterRCNN: + - detect_satlas_wind_turbine + decoders: + ClassificationHead: + - class_path: rslearn.models.pooling_decoder.PoolingDecoder + init_args: + in_channels: 768 + out_channels: 8 + - class_path: rslearn.train.tasks.classification.ClassificationHead + FasterRCNN: + - class_path: rslearn.models.faster_rcnn.FasterRCNN + init_args: + anchor_sizes: + - - 32 + downsample_factors: + - 8 + num_channels: 768 + num_classes: 3 + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: '{CHECKPOINT_PATH}' + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_lora_kwargs: + gen_hidden: 64 + task_lora_indices: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 10 + - 11 + use_task_lora: true + selector: + - encoder + task_embed_opts: + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt + type: precomputed + lazy_decode: true + task_label_offsets: + crop_type_classification: + num_outputs: 8 + offset: 0 + outputs_key: class + detect_satlas_wind_turbine: + num_outputs: 3 + offset: 0 + outputs_key: labels + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 50 + eta_min: 0 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + crop_type_classification: + label: targets + detect_satlas_wind_turbine: + targets: targets + tasks: + crop_type_classification: + class_path: rslearn.train.tasks.classification.ClassificationTask + init_args: + classes: + - Coffee + - Trees + - Grassland + - Maize + - Sugarcane + - Tea + - Water + - Built-up + enable_f1_metric: true + metric_kwargs: + average: micro + property_name: category + detect_satlas_wind_turbine: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 +rslp_experiment: placeholder +rslp_project: placeholder +trainer: + accumulate_grad_batches: 3 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: epoch + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + every_n_epochs: 10 + mode: min + monitor: val_loss + save_last: true + save_top_k: 1 + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 0 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 20 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - lora + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 50 + freeze_selectors: [] + unfreeze_lr_factor: 10 + unfreeze_selectors: + - encoder + - head + - lora + - class_path: rslearn.train.callbacks.adapters.ActivateLayers + init_args: + selectors: + - at_epoch: 20 + name: lora + max_epochs: 500 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_scaling/OUT_marine_1.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_scaling/OUT_marine_1.yaml new file mode 100644 index 00000000..f8fbce97 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_scaling/OUT_marine_1.yaml @@ -0,0 +1,459 @@ +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + batch_sizes: + detect_sentinel1_vessels: 8 + vessel_detection: 8 + data_modules: + detect_sentinel1_vessels: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/sentinel1_vessels/dataset_v1/20250602/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_sentinel1_vessels: + targets: targets + tasks: + detect_sentinel1_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + image_bands: + - 1 + - 1 + - 1 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.5 + test_config: + groups: + - val_ascending + - val_descending + patch_size: 128 + train_config: + groups: + - train_ascending + - train_descending + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 32768 + replacement: true + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_sentinel1_vessels + image_selectors: + - image + - sentinel1 + val_config: + groups: + - val_ascending + - val_descending + patch_size: 128 + vessel_detection: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/landsat_vessel_detection/detector/dataset_20250624 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + vessel_detection: + targets: targets + tasks: + vessel_detection: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.7 + test_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: val + train_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: train + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + val_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: val + num_workers: 16 + refill_batches: true + sample_mode: random_cycle +model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.0001 + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + decoder_to_target: + FasterRCNN: + - vessel_detection + - detect_sentinel1_vessels + decoders: + FasterRCNN: + - class_path: rslearn.models.faster_rcnn.FasterRCNN + init_args: + anchor_sizes: + - - 32 + downsample_factors: + - 8 + num_channels: 768 + num_classes: 2 + encoder: + - class_path: rslp.helios.model.Helios + init_args: + checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + forward_kwargs: + patch_size: 8 + selector: + - encoder + lazy_decode: true + task_label_offsets: + detect_sentinel1_vessels: + num_outputs: 2 + offset: 0 + outputs_key: labels + vessel_detection: + num_outputs: 2 + offset: 0 + outputs_key: labels + trunk: + class_path: rslearn.models.trunk.DecoderTrunk + init_args: + layers: + - class_path: rslp.helios.moe.MoETransformer + init_args: + dim: 768 + n_heads: 12 + n_layers: 1 + num_experts: 4 + num_slots: 4 + task_embedding: + class_path: rslearn.models.task_embedding.TaskChannelEmbedding + init_args: + add_spatial_embed: true + encoder_embedding_size: 768 + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 100 + eta_min: 0 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_sentinel1_vessels: + targets: targets + vessel_detection: + targets: targets + tasks: + detect_sentinel1_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + image_bands: + - 1 + - 1 + - 1 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.5 + vessel_detection: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.7 +rslp_experiment: placeholder +rslp_project: placeholder +trainer: + accumulate_grad_batches: 2 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: epoch + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + every_n_epochs: 10 + mode: min + monitor: val_loss + save_last: true + save_top_k: 1 + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 0 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - moe + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 20 + freeze_selectors: [] + unfreeze_lr_factor: 10 + unfreeze_selectors: + - encoder + - head + - moe + max_epochs: 500 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_scaling/OUT_marine_2.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_scaling/OUT_marine_2.yaml new file mode 100644 index 00000000..1e2f0ab3 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_scaling/OUT_marine_2.yaml @@ -0,0 +1,1063 @@ +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + batch_sizes: + detect_satlas_wind_turbine: 8 + detect_sentinel1_vessels: 8 + vessel_detection: 8 + data_modules: + detect_satlas_wind_turbine: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + s25: [] + s26: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + landsat5: [] + landsat6: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + s1a5: [] + s1a6: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + landsat5: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.4 + passthrough: true + landsat6: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.5 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1a5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.4 + passthrough: true + s1a6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.5 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s1d5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.4 + passthrough: true + s1d6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.5 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + s25: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + s26: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/wind_turbine/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_wind_turbine: + targets: targets + tasks: + detect_satlas_wind_turbine: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 65536 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + s25: [] + s26: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + landsat5: [] + landsat6: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + s1a5: [] + s1a6: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_satlas_wind_turbine + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + val_config: + patch_size: 128 + tags: + split: val + detect_sentinel1_vessels: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/sentinel1_vessels/dataset_v1/20250602/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_sentinel1_vessels: + targets: targets + tasks: + detect_sentinel1_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + image_bands: + - 1 + - 1 + - 1 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.5 + test_config: + groups: + - val_ascending + - val_descending + patch_size: 128 + train_config: + groups: + - train_ascending + - train_descending + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 32768 + replacement: true + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_sentinel1_vessels + image_selectors: + - image + - sentinel1 + val_config: + groups: + - val_ascending + - val_descending + patch_size: 128 + vessel_detection: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/landsat_vessel_detection/detector/dataset_20250624 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + vessel_detection: + targets: targets + tasks: + vessel_detection: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.7 + test_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: val + train_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: train + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + val_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: val + num_workers: 16 + refill_batches: true + sample_mode: random_cycle +model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.0001 + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + decoder_to_target: + FasterRCNN: + - vessel_detection + - detect_satlas_wind_turbine + - detect_sentinel1_vessels + decoders: + FasterRCNN: + - class_path: rslearn.models.faster_rcnn.FasterRCNN + init_args: + anchor_sizes: + - - 32 + downsample_factors: + - 8 + num_channels: 768 + num_classes: 5 + encoder: + - class_path: rslp.helios.model.Helios + init_args: + checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + forward_kwargs: + patch_size: 8 + selector: + - encoder + lazy_decode: true + task_label_offsets: + detect_satlas_wind_turbine: + num_outputs: 3 + offset: 2 + outputs_key: labels + detect_sentinel1_vessels: + num_outputs: 2 + offset: 0 + outputs_key: labels + vessel_detection: + num_outputs: 2 + offset: 0 + outputs_key: labels + trunk: + class_path: rslearn.models.trunk.DecoderTrunk + init_args: + layers: + - class_path: rslp.helios.moe.MoETransformer + init_args: + dim: 768 + n_heads: 12 + n_layers: 1 + num_experts: 4 + num_slots: 4 + task_embedding: + class_path: rslearn.models.task_embedding.TaskChannelEmbedding + init_args: + add_spatial_embed: true + encoder_embedding_size: 768 + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 100 + eta_min: 0 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_wind_turbine: + targets: targets + detect_sentinel1_vessels: + targets: targets + vessel_detection: + targets: targets + tasks: + detect_satlas_wind_turbine: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + detect_sentinel1_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + image_bands: + - 1 + - 1 + - 1 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.5 + vessel_detection: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.7 +rslp_experiment: placeholder +rslp_project: placeholder +trainer: + accumulate_grad_batches: 3 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: epoch + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + every_n_epochs: 10 + mode: min + monitor: val_loss + save_last: true + save_top_k: 1 + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 0 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - moe + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 20 + freeze_selectors: [] + unfreeze_lr_factor: 10 + unfreeze_selectors: + - encoder + - head + - moe + max_epochs: 500 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_scaling/OUT_marine_3.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_scaling/OUT_marine_3.yaml new file mode 100644 index 00000000..be89e1f9 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_scaling/OUT_marine_3.yaml @@ -0,0 +1,1268 @@ +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + batch_sizes: + detect_satlas_wind_turbine: 8 + detect_sentinel1_vessels: 8 + detect_sentinel2_vessels: 8 + vessel_detection: 8 + data_modules: + detect_satlas_wind_turbine: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + s25: [] + s26: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + landsat5: [] + landsat6: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + s1a5: [] + s1a6: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + landsat5: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.4 + passthrough: true + landsat6: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.5 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1a5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.4 + passthrough: true + s1a6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.5 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s1d5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.4 + passthrough: true + s1d6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.5 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + s25: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + s26: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/wind_turbine/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_wind_turbine: + targets: targets + tasks: + detect_satlas_wind_turbine: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 65536 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + s25: [] + s26: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + landsat5: [] + landsat6: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + s1a5: [] + s1a6: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_satlas_wind_turbine + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + val_config: + patch_size: 128 + tags: + split: val + detect_sentinel1_vessels: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/sentinel1_vessels/dataset_v1/20250602/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_sentinel1_vessels: + targets: targets + tasks: + detect_sentinel1_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + image_bands: + - 1 + - 1 + - 1 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.5 + test_config: + groups: + - val_ascending + - val_descending + patch_size: 128 + train_config: + groups: + - train_ascending + - train_descending + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 32768 + replacement: true + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_sentinel1_vessels + image_selectors: + - image + - sentinel1 + val_config: + groups: + - val_ascending + - val_descending + patch_size: 128 + detect_sentinel2_vessels: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/sentinel2_vessels/dataset_v1/20250213/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_sentinel2_vessels: + targets: targets + tasks: + detect_sentinel2_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + groups: + - sargassum_val + - split1 + - split7 + patch_size: 128 + train_config: + groups: + - sargassum_train + - split2 + - split3 + - split4 + - split5 + - split6 + - train + - train-bg + - train2 + - train3 + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 131072 + replacement: true + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_sentinel2_vessels + image_selectors: + - image + - sentinel2_l2a + val_config: + groups: + - sargassum_val + - split1 + - split7 + patch_size: 128 + vessel_detection: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/landsat_vessel_detection/detector/dataset_20250624 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + vessel_detection: + targets: targets + tasks: + vessel_detection: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.7 + test_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: val + train_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: train + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + val_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: val + num_workers: 16 + refill_batches: true + sample_mode: random_cycle +model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.0001 + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + decoder_to_target: + FasterRCNN: + - vessel_detection + - detect_satlas_wind_turbine + - detect_sentinel1_vessels + - detect_sentinel2_vessels + decoders: + FasterRCNN: + - class_path: rslearn.models.faster_rcnn.FasterRCNN + init_args: + anchor_sizes: + - - 32 + downsample_factors: + - 8 + num_channels: 768 + num_classes: 5 + encoder: + - class_path: rslp.helios.model.Helios + init_args: + checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + forward_kwargs: + patch_size: 8 + selector: + - encoder + lazy_decode: true + task_label_offsets: + detect_satlas_wind_turbine: + num_outputs: 3 + offset: 2 + outputs_key: labels + detect_sentinel1_vessels: + num_outputs: 2 + offset: 0 + outputs_key: labels + detect_sentinel2_vessels: + num_outputs: 2 + offset: 0 + outputs_key: labels + vessel_detection: + num_outputs: 2 + offset: 0 + outputs_key: labels + trunk: + class_path: rslearn.models.trunk.DecoderTrunk + init_args: + layers: + - class_path: rslp.helios.moe.MoETransformer + init_args: + dim: 768 + n_heads: 12 + n_layers: 1 + num_experts: 4 + num_slots: 4 + task_embedding: + class_path: rslearn.models.task_embedding.TaskChannelEmbedding + init_args: + add_spatial_embed: true + encoder_embedding_size: 768 + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 100 + eta_min: 0 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_wind_turbine: + targets: targets + detect_sentinel1_vessels: + targets: targets + detect_sentinel2_vessels: + targets: targets + vessel_detection: + targets: targets + tasks: + detect_satlas_wind_turbine: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + detect_sentinel1_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + image_bands: + - 1 + - 1 + - 1 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.5 + detect_sentinel2_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + vessel_detection: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.7 +rslp_experiment: placeholder +rslp_project: placeholder +trainer: + accumulate_grad_batches: 4 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: epoch + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + every_n_epochs: 10 + mode: min + monitor: val_loss + save_last: true + save_top_k: 1 + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 0 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - moe + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 20 + freeze_selectors: [] + unfreeze_lr_factor: 10 + unfreeze_selectors: + - encoder + - head + - moe + max_epochs: 500 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_scaling/base.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_scaling/base.yaml new file mode 100644 index 00000000..64d29a72 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_scaling/base.yaml @@ -0,0 +1,48 @@ +model: + class_path: rslp.helios.lightning_module.MoELightningModule + init_args: + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + encoder: + - class_path: rslp.helios.model.Helios + init_args: + checkpoint_path: "{CHECKPOINT_PATH}" + selector: ["encoder"] + forward_kwargs: + patch_size: {PATCH_SIZE} + decoders: # Filled in by make_multidataset_config.py + lazy_decode: true + lr: 0.0001 + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 100 + eta_min: 0 + +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + sample_mode: random_cycle + refill_batches: true + num_workers: 16 + data_modules: # Filled in by make_multidataset_config.py + +trainer: + max_epochs: 500 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: "epoch" + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + save_top_k: 1 + save_last: true + monitor: val_loss + mode: min + every_n_epochs: 10 + +rslp_project: placeholder +rslp_experiment: placeholder + +all_dataset_info_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v3_multitask/all_dataset_info.yaml diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_scaling/crop_1.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_scaling/crop_1.yaml new file mode 100644 index 00000000..8fc643f7 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_scaling/crop_1.yaml @@ -0,0 +1,71 @@ +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_scaling/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_scaling/OUT_crop_1.yaml + +dataset_cfgs: + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_nandi_crop_type/finetune_s1_s2_cosinelr.yaml + +substitutions: + patch_size: 8 + encoder_embedding_size: 768 + helios_checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + +global_overrides: + model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.0002 + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 50 + eta_min: 0 + model: + init_args: + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: "{CHECKPOINT_PATH}" + selector: ["encoder"] + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_lora_kwargs: + use_task_lora: true + task_lora_indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] + gen_hidden: 64 + task_embed_opts: + type: "precomputed" + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt + trainer: + accumulate_grad_batches: 2 + callbacks+: + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 0 + freeze_selectors: ["encoder"] + unfreeze_selectors: ["head"] + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 20 + freeze_selectors: ["encoder"] + unfreeze_selectors: ["head", "lora"] + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 50 + freeze_selectors: [] + unfreeze_selectors: ["encoder", "head", "lora"] + unfreeze_lr_factor: 10 + - class_path: rslearn.train.callbacks.adapters.ActivateLayers + init_args: + selectors: + - name: "lora" + at_epoch: 20 + +merge_options: + merge_heads: true + merge_task_labels: true + same_label_groups: diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_scaling/crop_2.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_scaling/crop_2.yaml new file mode 100644 index 00000000..46c1a766 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_scaling/crop_2.yaml @@ -0,0 +1,73 @@ +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_scaling/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_scaling/OUT_crop_2.yaml + +dataset_cfgs: + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_nandi_crop_type/finetune_s1_s2_cosinelr.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_wind_turbine_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_wind_turbine_128/basecfg_helios_mm.yaml + +substitutions: + patch_size: 8 + encoder_embedding_size: 768 + helios_checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + +global_overrides: + model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.0002 + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 50 + eta_min: 0 + model: + init_args: + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: "{CHECKPOINT_PATH}" + selector: ["encoder"] + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_lora_kwargs: + use_task_lora: true + task_lora_indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] + gen_hidden: 64 + task_embed_opts: + type: "precomputed" + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt + trainer: + accumulate_grad_batches: 3 + callbacks+: + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 0 + freeze_selectors: ["encoder"] + unfreeze_selectors: ["head"] + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 20 + freeze_selectors: ["encoder"] + unfreeze_selectors: ["head", "lora"] + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 50 + freeze_selectors: [] + unfreeze_selectors: ["encoder", "head", "lora"] + unfreeze_lr_factor: 10 + - class_path: rslearn.train.callbacks.adapters.ActivateLayers + init_args: + selectors: + - name: "lora" + at_epoch: 20 + +merge_options: + merge_heads: true + merge_task_labels: true + same_label_groups: diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_scaling/exp_id.txt b/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_scaling/exp_id.txt new file mode 100644 index 00000000..643dc70c --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_scaling/exp_id.txt @@ -0,0 +1 @@ +{task} \ No newline at end of file diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_scaling/marine_1.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_scaling/marine_1.yaml new file mode 100644 index 00000000..f25646e1 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_scaling/marine_1.yaml @@ -0,0 +1,58 @@ +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_scaling/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_scaling/OUT_marine_1.yaml + +dataset_cfgs: + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_detector_cosinelr.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_helios.yaml + +substitutions: + patch_size: 8 + encoder_embedding_size: 768 + helios_checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + +global_overrides: + model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + model: + init_args: + trunk: + class_path: rslearn.models.trunk.DecoderTrunk + init_args: + task_embedding: + class_path: rslearn.models.task_embedding.TaskChannelEmbedding + init_args: + encoder_embedding_size: 768 + add_spatial_embed: true + layers: + - class_path: rslp.helios.moe.MoETransformer + init_args: + dim: 768 + n_layers: 1 + n_heads: 12 + num_experts: 4 + num_slots: 4 + trainer: + accumulate_grad_batches: 2 + callbacks+: + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 0 + freeze_selectors: ["encoder"] + unfreeze_selectors: ["head", "moe"] + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 20 + freeze_selectors: [] + unfreeze_selectors: ["encoder", "head", "moe"] + unfreeze_lr_factor: 10 + +merge_options: + merge_heads: true + merge_task_labels: true + same_label_groups: + - [detect_sentinel1_vessels, detect_sentinel2_vessels, vessel_detection] diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_scaling/marine_2.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_scaling/marine_2.yaml new file mode 100644 index 00000000..b3eaaaab --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_scaling/marine_2.yaml @@ -0,0 +1,60 @@ +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_scaling/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_scaling/OUT_marine_2.yaml + +dataset_cfgs: + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_detector_cosinelr.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_wind_turbine_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_wind_turbine_128/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_helios.yaml + +substitutions: + patch_size: 8 + encoder_embedding_size: 768 + helios_checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + +global_overrides: + model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + model: + init_args: + trunk: + class_path: rslearn.models.trunk.DecoderTrunk + init_args: + task_embedding: + class_path: rslearn.models.task_embedding.TaskChannelEmbedding + init_args: + encoder_embedding_size: 768 + add_spatial_embed: true + layers: + - class_path: rslp.helios.moe.MoETransformer + init_args: + dim: 768 + n_layers: 1 + n_heads: 12 + num_experts: 4 + num_slots: 4 + trainer: + accumulate_grad_batches: 3 + callbacks+: + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 0 + freeze_selectors: ["encoder"] + unfreeze_selectors: ["head", "moe"] + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 20 + freeze_selectors: [] + unfreeze_selectors: ["encoder", "head", "moe"] + unfreeze_lr_factor: 10 + +merge_options: + merge_heads: true + merge_task_labels: true + same_label_groups: + - [detect_sentinel1_vessels, detect_sentinel2_vessels, vessel_detection] diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_scaling/marine_3.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_scaling/marine_3.yaml new file mode 100644 index 00000000..419303ce --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_scaling/marine_3.yaml @@ -0,0 +1,62 @@ +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_scaling/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_09_03_scaling/OUT_marine_3.yaml + +dataset_cfgs: + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_detector_cosinelr.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_wind_turbine_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_wind_turbine_128/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_helios.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel2_vessels_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel2_vessels_128/basecfg_helios.yaml + +substitutions: + patch_size: 8 + encoder_embedding_size: 768 + helios_checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + +global_overrides: + model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + model: + init_args: + trunk: + class_path: rslearn.models.trunk.DecoderTrunk + init_args: + task_embedding: + class_path: rslearn.models.task_embedding.TaskChannelEmbedding + init_args: + encoder_embedding_size: 768 + add_spatial_embed: true + layers: + - class_path: rslp.helios.moe.MoETransformer + init_args: + dim: 768 + n_layers: 1 + n_heads: 12 + num_experts: 4 + num_slots: 4 + trainer: + accumulate_grad_batches: 4 + callbacks+: + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 0 + freeze_selectors: ["encoder"] + unfreeze_selectors: ["head", "moe"] + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 20 + freeze_selectors: [] + unfreeze_selectors: ["encoder", "head", "moe"] + unfreeze_lr_factor: 10 + +merge_options: + merge_heads: true + merge_task_labels: true + same_label_groups: + - [detect_sentinel1_vessels, detect_sentinel2_vessels, vessel_detection] diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_28_regression_test/new.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/OUT_no_landsat.yaml similarity index 87% rename from one_off_projects/2025_07_joint_finetune/configs/2025_08_28_regression_test/new.yaml rename to one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/OUT_no_landsat.yaml index 9ca26e4d..683be497 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_08_28_regression_test/new.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/OUT_no_landsat.yaml @@ -6,7 +6,6 @@ data: detect_satlas_wind_turbine: 8 detect_sentinel1_vessels: 8 detect_sentinel2_vessels: 8 - vessel_detection: 8 data_modules: detect_satlas_marine_infra: class_path: rslearn.train.data_module.RslearnDataModule @@ -1324,155 +1323,11 @@ data: - split1 - split7 patch_size: 128 - vessel_detection: - class_path: rslearn.train.data_module.RslearnDataModule - init_args: - batch_size: 8 - default_config: - transforms: - - class_path: rslp.transforms.mask.Mask - - class_path: rslearn.train.transforms.concatenate.Concatenate - init_args: - output_selector: landsat - selections: - image: [] - - class_path: rslp.helios.norm.HeliosNormalize - init_args: - band_names: - landsat: - - B8 - - B1 - - B2 - - B3 - - B4 - - B5 - - B6 - - B7 - - B9 - - B10 - - B11 - config_fname: /opt/helios/data/norm_configs/computed.json - inputs: - image: - bands: - - B8 - - B1 - - B2 - - B3 - - B4 - - B5 - - B6 - - B7 - - B9 - - B10 - - B11 - data_type: raster - dtype: FLOAT32 - layers: - - landsat - passthrough: true - mask: - bands: - - mask - data_type: raster - dtype: INT32 - is_target: true - layers: - - mask - passthrough: true - targets: - data_type: vector - is_target: true - layers: - - label - num_workers: 16 - path: /weka/dfive-default/rslearn-eai/datasets/landsat_vessel_detection/detector/dataset_20250624 - task: - class_path: rslearn.train.tasks.multi_task.MultiTask - init_args: - input_mapping: - vessel_detection: - targets: targets - tasks: - vessel_detection: - class_path: rslearn.train.tasks.detection.DetectionTask - init_args: - box_size: 15 - classes: - - unknown - - vessel - enable_f1_metric: true - enable_map_metric: true - exclude_by_center: true - f1_metric_kwargs: - cmp_mode: distance - cmp_threshold: 15 - flatten_classes: true - f1_metric_thresholds: - - - 0.05 - - 0.1 - - 0.2 - - 0.3 - - 0.4 - - 0.5 - - 0.6 - - 0.7 - - 0.8 - - 0.9 - - 0.95 - property_name: category - remap_values: - - - 0 - - 1 - - - 0 - - 255 - score_threshold: 0.7 - test_config: - groups: - - labels_utm - patch_size: 128 - tags: - split: val - train_config: - groups: - - labels_utm - patch_size: 128 - tags: - split: train - transforms: - - class_path: rslp.transforms.mask.Mask - - class_path: rslearn.train.transforms.concatenate.Concatenate - init_args: - output_selector: landsat - selections: - image: [] - - class_path: rslp.helios.norm.HeliosNormalize - init_args: - band_names: - landsat: - - B8 - - B1 - - B2 - - B3 - - B4 - - B5 - - B6 - - B7 - - B9 - - B10 - - B11 - config_fname: /opt/helios/data/norm_configs/computed.json - val_config: - groups: - - labels_utm - patch_size: 128 - tags: - split: val num_workers: 16 refill_batches: true sample_mode: random_cycle model: - class_path: rslp.helios.lightning_module.MoELightningModule + class_path: rslearn.train.lightning_module.RslearnLightningModule init_args: lr: 0.0001 model: @@ -1480,7 +1335,6 @@ model: init_args: decoder_to_target: FasterRCNN: - - vessel_detection - detect_satlas_marine_infra - detect_satlas_wind_turbine - detect_sentinel1_vessels @@ -1496,13 +1350,34 @@ model: num_channels: 768 num_classes: 8 encoder: - - class_path: rslp.helios.model.Helios + - class_path: rslp.helios.model.TaskConditionedHelios init_args: - checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + checkpoint_path: '{CHECKPOINT_PATH}' forward_kwargs: patch_size: 8 + model_overrides: + encoder_config: + task_lora_kwargs: + gen_hidden: 64 + task_lora_indices: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 10 + - 11 + use_task_lora: true selector: - encoder + task_embed_opts: + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt + type: precomputed lazy_decode: true task_label_offsets: detect_satlas_marine_infra: @@ -1521,10 +1396,6 @@ model: num_outputs: 2 offset: 0 outputs_key: labels - vessel_detection: - num_outputs: 2 - offset: 0 - outputs_key: labels trunk: class_path: rslearn.models.trunk.DecoderTrunk init_args: @@ -1536,14 +1407,11 @@ model: n_layers: 1 num_experts: 4 num_slots: 4 - mlp_dim: 512 - dropout: 0.1 task_embedding: class_path: rslearn.models.task_embedding.TaskChannelEmbedding init_args: - add_spatial_embed: false + add_spatial_embed: true encoder_embedding_size: 768 - default_idx: 0 scheduler: class_path: rslearn.train.scheduler.CosineAnnealingScheduler init_args: @@ -1561,8 +1429,6 @@ model: targets: targets detect_sentinel2_vessels: targets: targets - vessel_detection: - targets: targets tasks: detect_satlas_marine_infra: class_path: rslp.satlas.train.MarineInfraTask @@ -1712,39 +1578,6 @@ model: - 1 - - 0 - 255 - vessel_detection: - class_path: rslearn.train.tasks.detection.DetectionTask - init_args: - box_size: 15 - classes: - - unknown - - vessel - enable_f1_metric: true - enable_map_metric: true - exclude_by_center: true - f1_metric_kwargs: - cmp_mode: distance - cmp_threshold: 15 - flatten_classes: true - f1_metric_thresholds: - - - 0.05 - - 0.1 - - 0.2 - - 0.3 - - 0.4 - - 0.5 - - 0.6 - - 0.7 - - 0.8 - - 0.9 - - 0.95 - property_name: category - remap_values: - - - 0 - - 1 - - - 0 - - 255 - score_threshold: 0.7 rslp_experiment: placeholder rslp_project: placeholder trainer: @@ -1755,17 +1588,44 @@ trainer: logging_interval: epoch - class_path: lightning.pytorch.callbacks.ModelCheckpoint init_args: + every_n_epochs: 10 mode: min monitor: val_loss save_last: true save_top_k: 1 - - class_path: rslearn.train.callbacks.freeze_unfreeze.FreezeUnfreeze + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 0 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - moe + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 20 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - lora + - moe + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 30 + freeze_selectors: [] + unfreeze_lr_factor: 10 + unfreeze_selectors: + - encoder + - head + - lora + - moe + - class_path: rslearn.train.callbacks.adapters.ActivateLayers init_args: - module_selector: - - model - - encoder - - 0 - unfreeze_at_epoch: 20 - unfreeze_lr_factor: 10 - limit_val_batches: 1024 - max_epochs: 200 + selectors: + - at_epoch: 20 + name: lora + max_epochs: 500 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/OUT_no_marine.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/OUT_no_marine.yaml new file mode 100644 index 00000000..1393a29c --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/OUT_no_marine.yaml @@ -0,0 +1,1304 @@ +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + batch_sizes: + detect_satlas_wind_turbine: 8 + detect_sentinel1_vessels: 8 + detect_sentinel2_vessels: 8 + vessel_detection: 8 + data_modules: + detect_satlas_wind_turbine: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + s25: [] + s26: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + landsat5: [] + landsat6: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + s1a5: [] + s1a6: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + landsat5: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.4 + passthrough: true + landsat6: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.5 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1a5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.4 + passthrough: true + s1a6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.5 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s1d5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.4 + passthrough: true + s1d6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.5 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + s25: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + s26: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/wind_turbine/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_wind_turbine: + targets: targets + tasks: + detect_satlas_wind_turbine: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 65536 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + s25: [] + s26: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + landsat5: [] + landsat6: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + s1a5: [] + s1a6: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_satlas_wind_turbine + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + val_config: + patch_size: 128 + tags: + split: val + detect_sentinel1_vessels: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/sentinel1_vessels/dataset_v1/20250602/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_sentinel1_vessels: + targets: targets + tasks: + detect_sentinel1_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + image_bands: + - 1 + - 1 + - 1 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.5 + test_config: + groups: + - val_ascending + - val_descending + patch_size: 128 + train_config: + groups: + - train_ascending + - train_descending + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 32768 + replacement: true + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_sentinel1_vessels + image_selectors: + - image + - sentinel1 + val_config: + groups: + - val_ascending + - val_descending + patch_size: 128 + detect_sentinel2_vessels: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/sentinel2_vessels/dataset_v1/20250213/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_sentinel2_vessels: + targets: targets + tasks: + detect_sentinel2_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + groups: + - sargassum_val + - split1 + - split7 + patch_size: 128 + train_config: + groups: + - sargassum_train + - split2 + - split3 + - split4 + - split5 + - split6 + - train + - train-bg + - train2 + - train3 + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 131072 + replacement: true + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_sentinel2_vessels + image_selectors: + - image + - sentinel2_l2a + val_config: + groups: + - sargassum_val + - split1 + - split7 + patch_size: 128 + vessel_detection: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/landsat_vessel_detection/detector/dataset_20250624 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + vessel_detection: + targets: targets + tasks: + vessel_detection: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.7 + test_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: val + train_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: train + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + val_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: val + num_workers: 16 + refill_batches: true + sample_mode: random_cycle +model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.0001 + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + decoder_to_target: + FasterRCNN: + - vessel_detection + - detect_satlas_wind_turbine + - detect_sentinel1_vessels + - detect_sentinel2_vessels + decoders: + FasterRCNN: + - class_path: rslearn.models.faster_rcnn.FasterRCNN + init_args: + anchor_sizes: + - - 32 + downsample_factors: + - 8 + num_channels: 768 + num_classes: 5 + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: '{CHECKPOINT_PATH}' + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_lora_kwargs: + gen_hidden: 64 + task_lora_indices: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 10 + - 11 + use_task_lora: true + selector: + - encoder + task_embed_opts: + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt + type: precomputed + lazy_decode: true + task_label_offsets: + detect_satlas_wind_turbine: + num_outputs: 3 + offset: 2 + outputs_key: labels + detect_sentinel1_vessels: + num_outputs: 2 + offset: 0 + outputs_key: labels + detect_sentinel2_vessels: + num_outputs: 2 + offset: 0 + outputs_key: labels + vessel_detection: + num_outputs: 2 + offset: 0 + outputs_key: labels + trunk: + class_path: rslearn.models.trunk.DecoderTrunk + init_args: + layers: + - class_path: rslp.helios.moe.MoETransformer + init_args: + dim: 768 + n_heads: 12 + n_layers: 1 + num_experts: 4 + num_slots: 4 + task_embedding: + class_path: rslearn.models.task_embedding.TaskChannelEmbedding + init_args: + add_spatial_embed: true + encoder_embedding_size: 768 + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 100 + eta_min: 0 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_wind_turbine: + targets: targets + detect_sentinel1_vessels: + targets: targets + detect_sentinel2_vessels: + targets: targets + vessel_detection: + targets: targets + tasks: + detect_satlas_wind_turbine: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + detect_sentinel1_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + image_bands: + - 1 + - 1 + - 1 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.5 + detect_sentinel2_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + vessel_detection: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.7 +rslp_experiment: placeholder +rslp_project: placeholder +trainer: + accumulate_grad_batches: 5 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: epoch + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + every_n_epochs: 10 + mode: min + monitor: val_loss + save_last: true + save_top_k: 1 + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 0 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - moe + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 20 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - lora + - moe + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 30 + freeze_selectors: [] + unfreeze_lr_factor: 10 + unfreeze_selectors: + - encoder + - head + - lora + - moe + - class_path: rslearn.train.callbacks.adapters.ActivateLayers + init_args: + selectors: + - at_epoch: 20 + name: lora + max_epochs: 500 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/OUT_no_s1.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/OUT_no_s1.yaml new file mode 100644 index 00000000..4f47594a --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/OUT_no_s1.yaml @@ -0,0 +1,1641 @@ +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + batch_sizes: + detect_satlas_marine_infra: 8 + detect_satlas_wind_turbine: 8 + detect_sentinel2_vessels: 8 + vessel_detection: 8 + data_modules: + detect_satlas_marine_infra: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/marine_infra/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_marine_infra: + targets: targets + tasks: + detect_satlas_marine_infra: + class_path: rslp.satlas.train.MarineInfraTask + init_args: + box_size: 15 + classes: + - unknown + - platform + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + - - 0.1 + - - 0.2 + - - 0.3 + - - 0.4 + - - 0.5 + - - 0.6 + - - 0.7 + - - 0.8 + - - 0.9 + image_bands: + - 2 + - 1 + - 0 + property_name: category + remap_values: + - - 0 + - 0.25 + - - 0 + - 255 + skip_unknown_categories: true + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 65536 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_satlas_marine_infra + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + val_config: + patch_size: 128 + tags: + split: val + detect_satlas_wind_turbine: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + s25: [] + s26: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + landsat5: [] + landsat6: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + s1a5: [] + s1a6: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + landsat5: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.4 + passthrough: true + landsat6: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.5 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1a5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.4 + passthrough: true + s1a6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.5 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s1d5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.4 + passthrough: true + s1d6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.5 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + s25: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + s26: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/wind_turbine/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_wind_turbine: + targets: targets + tasks: + detect_satlas_wind_turbine: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 65536 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + s25: [] + s26: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + landsat5: [] + landsat6: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + s1a5: [] + s1a6: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_satlas_wind_turbine + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + val_config: + patch_size: 128 + tags: + split: val + detect_sentinel2_vessels: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/sentinel2_vessels/dataset_v1/20250213/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_sentinel2_vessels: + targets: targets + tasks: + detect_sentinel2_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + groups: + - sargassum_val + - split1 + - split7 + patch_size: 128 + train_config: + groups: + - sargassum_train + - split2 + - split3 + - split4 + - split5 + - split6 + - train + - train-bg + - train2 + - train3 + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 131072 + replacement: true + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_sentinel2_vessels + image_selectors: + - image + - sentinel2_l2a + val_config: + groups: + - sargassum_val + - split1 + - split7 + patch_size: 128 + vessel_detection: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/landsat_vessel_detection/detector/dataset_20250624 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + vessel_detection: + targets: targets + tasks: + vessel_detection: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.7 + test_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: val + train_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: train + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + val_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: val + num_workers: 16 + refill_batches: true + sample_mode: random_cycle +model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.0001 + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + decoder_to_target: + FasterRCNN: + - vessel_detection + - detect_satlas_marine_infra + - detect_satlas_wind_turbine + - detect_sentinel2_vessels + decoders: + FasterRCNN: + - class_path: rslearn.models.faster_rcnn.FasterRCNN + init_args: + anchor_sizes: + - - 32 + downsample_factors: + - 8 + num_channels: 768 + num_classes: 8 + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: '{CHECKPOINT_PATH}' + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_lora_kwargs: + gen_hidden: 64 + task_lora_indices: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 10 + - 11 + use_task_lora: true + selector: + - encoder + task_embed_opts: + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt + type: precomputed + lazy_decode: true + task_label_offsets: + detect_satlas_marine_infra: + num_outputs: 3 + offset: 2 + outputs_key: labels + detect_satlas_wind_turbine: + num_outputs: 3 + offset: 5 + outputs_key: labels + detect_sentinel2_vessels: + num_outputs: 2 + offset: 0 + outputs_key: labels + vessel_detection: + num_outputs: 2 + offset: 0 + outputs_key: labels + trunk: + class_path: rslearn.models.trunk.DecoderTrunk + init_args: + layers: + - class_path: rslp.helios.moe.MoETransformer + init_args: + dim: 768 + n_heads: 12 + n_layers: 1 + num_experts: 4 + num_slots: 4 + task_embedding: + class_path: rslearn.models.task_embedding.TaskChannelEmbedding + init_args: + add_spatial_embed: true + encoder_embedding_size: 768 + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 100 + eta_min: 0 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_marine_infra: + targets: targets + detect_satlas_wind_turbine: + targets: targets + detect_sentinel2_vessels: + targets: targets + vessel_detection: + targets: targets + tasks: + detect_satlas_marine_infra: + class_path: rslp.satlas.train.MarineInfraTask + init_args: + box_size: 15 + classes: + - unknown + - platform + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + - - 0.1 + - - 0.2 + - - 0.3 + - - 0.4 + - - 0.5 + - - 0.6 + - - 0.7 + - - 0.8 + - - 0.9 + image_bands: + - 2 + - 1 + - 0 + property_name: category + remap_values: + - - 0 + - 0.25 + - - 0 + - 255 + skip_unknown_categories: true + detect_satlas_wind_turbine: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + detect_sentinel2_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + vessel_detection: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.7 +rslp_experiment: placeholder +rslp_project: placeholder +trainer: + accumulate_grad_batches: 5 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: epoch + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + every_n_epochs: 10 + mode: min + monitor: val_loss + save_last: true + save_top_k: 1 + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 0 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - moe + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 20 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - lora + - moe + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 30 + freeze_selectors: [] + unfreeze_lr_factor: 10 + unfreeze_selectors: + - encoder + - head + - lora + - moe + - class_path: rslearn.train.callbacks.adapters.ActivateLayers + init_args: + selectors: + - at_epoch: 20 + name: lora + max_epochs: 500 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/OUT_no_s2.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/OUT_no_s2.yaml new file mode 100644 index 00000000..0b4dd6d8 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/OUT_no_s2.yaml @@ -0,0 +1,1611 @@ +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + batch_sizes: + detect_satlas_marine_infra: 8 + detect_satlas_wind_turbine: 8 + detect_sentinel1_vessels: 8 + vessel_detection: 8 + data_modules: + detect_satlas_marine_infra: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/marine_infra/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_marine_infra: + targets: targets + tasks: + detect_satlas_marine_infra: + class_path: rslp.satlas.train.MarineInfraTask + init_args: + box_size: 15 + classes: + - unknown + - platform + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + - - 0.1 + - - 0.2 + - - 0.3 + - - 0.4 + - - 0.5 + - - 0.6 + - - 0.7 + - - 0.8 + - - 0.9 + image_bands: + - 2 + - 1 + - 0 + property_name: category + remap_values: + - - 0 + - 0.25 + - - 0 + - 255 + skip_unknown_categories: true + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 65536 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_satlas_marine_infra + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + val_config: + patch_size: 128 + tags: + split: val + detect_satlas_wind_turbine: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + s25: [] + s26: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + landsat5: [] + landsat6: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + s1a5: [] + s1a6: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + landsat5: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.4 + passthrough: true + landsat6: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.5 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1a5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.4 + passthrough: true + s1a6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.5 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s1d5: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.4 + passthrough: true + s1d6: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.5 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + s25: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.4 + passthrough: true + s26: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.5 + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/wind_turbine/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_wind_turbine: + targets: targets + tasks: + detect_satlas_wind_turbine: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 65536 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + s25: [] + s26: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + landsat5: [] + landsat6: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + s1a5: [] + s1a6: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_satlas_wind_turbine + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + val_config: + patch_size: 128 + tags: + split: val + detect_sentinel1_vessels: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/sentinel1_vessels/dataset_v1/20250602/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_sentinel1_vessels: + targets: targets + tasks: + detect_sentinel1_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + image_bands: + - 1 + - 1 + - 1 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.5 + test_config: + groups: + - val_ascending + - val_descending + patch_size: 128 + train_config: + groups: + - train_ascending + - train_descending + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 32768 + replacement: true + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_sentinel1_vessels + image_selectors: + - image + - sentinel1 + val_config: + groups: + - val_ascending + - val_descending + patch_size: 128 + vessel_detection: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/landsat_vessel_detection/detector/dataset_20250624 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + vessel_detection: + targets: targets + tasks: + vessel_detection: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.7 + test_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: val + train_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: train + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + val_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: val + num_workers: 16 + refill_batches: true + sample_mode: random_cycle +model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.0001 + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + decoder_to_target: + FasterRCNN: + - vessel_detection + - detect_satlas_marine_infra + - detect_satlas_wind_turbine + - detect_sentinel1_vessels + decoders: + FasterRCNN: + - class_path: rslearn.models.faster_rcnn.FasterRCNN + init_args: + anchor_sizes: + - - 32 + downsample_factors: + - 8 + num_channels: 768 + num_classes: 8 + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: '{CHECKPOINT_PATH}' + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_lora_kwargs: + gen_hidden: 64 + task_lora_indices: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 10 + - 11 + use_task_lora: true + selector: + - encoder + task_embed_opts: + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt + type: precomputed + lazy_decode: true + task_label_offsets: + detect_satlas_marine_infra: + num_outputs: 3 + offset: 2 + outputs_key: labels + detect_satlas_wind_turbine: + num_outputs: 3 + offset: 5 + outputs_key: labels + detect_sentinel1_vessels: + num_outputs: 2 + offset: 0 + outputs_key: labels + vessel_detection: + num_outputs: 2 + offset: 0 + outputs_key: labels + trunk: + class_path: rslearn.models.trunk.DecoderTrunk + init_args: + layers: + - class_path: rslp.helios.moe.MoETransformer + init_args: + dim: 768 + n_heads: 12 + n_layers: 1 + num_experts: 4 + num_slots: 4 + task_embedding: + class_path: rslearn.models.task_embedding.TaskChannelEmbedding + init_args: + add_spatial_embed: true + encoder_embedding_size: 768 + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 100 + eta_min: 0 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_marine_infra: + targets: targets + detect_satlas_wind_turbine: + targets: targets + detect_sentinel1_vessels: + targets: targets + vessel_detection: + targets: targets + tasks: + detect_satlas_marine_infra: + class_path: rslp.satlas.train.MarineInfraTask + init_args: + box_size: 15 + classes: + - unknown + - platform + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + - - 0.1 + - - 0.2 + - - 0.3 + - - 0.4 + - - 0.5 + - - 0.6 + - - 0.7 + - - 0.8 + - - 0.9 + image_bands: + - 2 + - 1 + - 0 + property_name: category + remap_values: + - - 0 + - 0.25 + - - 0 + - 255 + skip_unknown_categories: true + detect_satlas_wind_turbine: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + detect_sentinel1_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + image_bands: + - 1 + - 1 + - 1 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.5 + vessel_detection: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.7 +rslp_experiment: placeholder +rslp_project: placeholder +trainer: + accumulate_grad_batches: 5 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: epoch + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + every_n_epochs: 10 + mode: min + monitor: val_loss + save_last: true + save_top_k: 1 + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 0 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - moe + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 20 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - lora + - moe + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 30 + freeze_selectors: [] + unfreeze_lr_factor: 10 + unfreeze_selectors: + - encoder + - head + - lora + - moe + - class_path: rslearn.train.callbacks.adapters.ActivateLayers + init_args: + selectors: + - at_epoch: 20 + name: lora + max_epochs: 500 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/OUT_no_turbine.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/OUT_no_turbine.yaml new file mode 100644 index 00000000..63f35c13 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/OUT_no_turbine.yaml @@ -0,0 +1,1212 @@ +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + batch_sizes: + detect_satlas_marine_infra: 8 + detect_sentinel1_vessels: 8 + detect_sentinel2_vessels: 8 + vessel_detection: 8 + data_modules: + detect_satlas_marine_infra: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + inputs: + landsat1: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + landsat2: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.1 + passthrough: true + landsat3: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.2 + passthrough: true + landsat4: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat.3 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: FLOAT32 + is_target: true + layers: + - mask + passthrough: true + s1a1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending + passthrough: true + s1a2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.1 + passthrough: true + s1a3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.2 + passthrough: true + s1a4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_ascending.3 + passthrough: true + s1d1: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending + passthrough: true + s1d2: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.1 + passthrough: true + s1d3: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.2 + passthrough: true + s1d4: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1_descending.3 + passthrough: true + s21: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + s22: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.1 + passthrough: true + s23: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.2 + passthrough: true + s24: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2.3 + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/marine_infra/dataset_v1/20250605/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_marine_infra: + targets: targets + tasks: + detect_satlas_marine_infra: + class_path: rslp.satlas.train.MarineInfraTask + init_args: + box_size: 15 + classes: + - unknown + - platform + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + - - 0.1 + - - 0.2 + - - 0.3 + - - 0.4 + - - 0.5 + - - 0.6 + - - 0.7 + - - 0.8 + - - 0.9 + image_bands: + - 2 + - 1 + - 0 + property_name: category + remap_values: + - - 0 + - 0.25 + - - 0 + - 255 + skip_unknown_categories: true + test_config: + patch_size: 128 + tags: + split: val + train_config: + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 65536 + replacement: true + tags: + split: train + transforms: + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + s21: [] + s22: [] + s23: [] + s24: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + landsat1: [] + landsat2: [] + landsat3: [] + landsat4: [] + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + s1a1: [] + s1a2: [] + s1a3: [] + s1a4: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + sentinel1: + - vv + - vh + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslp.transforms.mask.Mask + init_args: + selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_satlas_marine_infra + image_selectors: + - sentinel2_l2a + - landsat + - sentinel1 + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: image + selections: + sentinel2_l2a: [] + val_config: + patch_size: 128 + tags: + split: val + detect_sentinel1_vessels: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - vv + - vh + data_type: raster + dtype: FLOAT32 + layers: + - sentinel1 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/sentinel1_vessels/dataset_v1/20250602/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_sentinel1_vessels: + targets: targets + tasks: + detect_sentinel1_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + image_bands: + - 1 + - 1 + - 1 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.5 + test_config: + groups: + - val_ascending + - val_descending + patch_size: 128 + train_config: + groups: + - train_ascending + - train_descending + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 32768 + replacement: true + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel1 + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel1: + - vv + - vh + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_sentinel1_vessels + image_selectors: + - image + - sentinel1 + val_config: + groups: + - val_ascending + - val_descending + patch_size: 128 + detect_sentinel2_vessels: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + data_type: raster + dtype: FLOAT32 + layers: + - sentinel2 + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/sentinel2_vessels/dataset_v1/20250213/ + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_sentinel2_vessels: + targets: targets + tasks: + detect_sentinel2_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + test_config: + groups: + - sargassum_val + - split1 + - split7 + patch_size: 128 + train_config: + groups: + - sargassum_train + - split2 + - split3 + - split4 + - split5 + - split6 + - train + - train-bg + - train2 + - train3 + patch_size: 128 + sampler: + class_path: rslearn.train.dataset.RandomSamplerFactory + init_args: + num_samples: 131072 + replacement: true + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: sentinel2_l2a + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + sentinel2_l2a: + - B02 + - B03 + - B04 + - B08 + - B05 + - B06 + - B07 + - B8A + - B11 + - B12 + - B01 + - B09 + config_fname: /opt/helios/data/norm_configs/computed.json + - class_path: rslearn.train.transforms.flip.Flip + init_args: + box_selectors: + - target/detect_sentinel2_vessels + image_selectors: + - image + - sentinel2_l2a + val_config: + groups: + - sargassum_val + - split1 + - split7 + patch_size: 128 + vessel_detection: + class_path: rslearn.train.data_module.RslearnDataModule + init_args: + batch_size: 8 + default_config: + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + inputs: + image: + bands: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + data_type: raster + dtype: FLOAT32 + layers: + - landsat + passthrough: true + mask: + bands: + - mask + data_type: raster + dtype: INT32 + is_target: true + layers: + - mask + passthrough: true + targets: + data_type: vector + is_target: true + layers: + - label + num_workers: 16 + path: /weka/dfive-default/rslearn-eai/datasets/landsat_vessel_detection/detector/dataset_20250624 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + vessel_detection: + targets: targets + tasks: + vessel_detection: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.7 + test_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: val + train_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: train + transforms: + - class_path: rslp.transforms.mask.Mask + - class_path: rslearn.train.transforms.concatenate.Concatenate + init_args: + output_selector: landsat + selections: + image: [] + - class_path: rslp.helios.norm.HeliosNormalize + init_args: + band_names: + landsat: + - B8 + - B1 + - B2 + - B3 + - B4 + - B5 + - B6 + - B7 + - B9 + - B10 + - B11 + config_fname: /opt/helios/data/norm_configs/computed.json + val_config: + groups: + - labels_utm + patch_size: 128 + tags: + split: val + num_workers: 16 + refill_batches: true + sample_mode: random_cycle +model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + lr: 0.0001 + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + decoder_to_target: + FasterRCNN: + - vessel_detection + - detect_satlas_marine_infra + - detect_sentinel1_vessels + - detect_sentinel2_vessels + decoders: + FasterRCNN: + - class_path: rslearn.models.faster_rcnn.FasterRCNN + init_args: + anchor_sizes: + - - 32 + downsample_factors: + - 8 + num_channels: 768 + num_classes: 5 + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: '{CHECKPOINT_PATH}' + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_lora_kwargs: + gen_hidden: 64 + task_lora_indices: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 10 + - 11 + use_task_lora: true + selector: + - encoder + task_embed_opts: + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt + type: precomputed + lazy_decode: true + task_label_offsets: + detect_satlas_marine_infra: + num_outputs: 3 + offset: 2 + outputs_key: labels + detect_sentinel1_vessels: + num_outputs: 2 + offset: 0 + outputs_key: labels + detect_sentinel2_vessels: + num_outputs: 2 + offset: 0 + outputs_key: labels + vessel_detection: + num_outputs: 2 + offset: 0 + outputs_key: labels + trunk: + class_path: rslearn.models.trunk.DecoderTrunk + init_args: + layers: + - class_path: rslp.helios.moe.MoETransformer + init_args: + dim: 768 + n_heads: 12 + n_layers: 1 + num_experts: 4 + num_slots: 4 + task_embedding: + class_path: rslearn.models.task_embedding.TaskChannelEmbedding + init_args: + add_spatial_embed: true + encoder_embedding_size: 768 + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 100 + eta_min: 0 + task: + class_path: rslearn.train.tasks.multi_task.MultiTask + init_args: + input_mapping: + detect_satlas_marine_infra: + targets: targets + detect_sentinel1_vessels: + targets: targets + detect_sentinel2_vessels: + targets: targets + vessel_detection: + targets: targets + tasks: + detect_satlas_marine_infra: + class_path: rslp.satlas.train.MarineInfraTask + init_args: + box_size: 15 + classes: + - unknown + - platform + - turbine + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + - - 0.1 + - - 0.2 + - - 0.3 + - - 0.4 + - - 0.5 + - - 0.6 + - - 0.7 + - - 0.8 + - - 0.9 + image_bands: + - 2 + - 1 + - 0 + property_name: category + remap_values: + - - 0 + - 0.25 + - - 0 + - 255 + skip_unknown_categories: true + detect_sentinel1_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + image_bands: + - 1 + - 1 + - 1 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.5 + detect_sentinel2_vessels: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + vessel_detection: + class_path: rslearn.train.tasks.detection.DetectionTask + init_args: + box_size: 15 + classes: + - unknown + - vessel + enable_f1_metric: true + enable_map_metric: true + exclude_by_center: true + f1_metric_kwargs: + cmp_mode: distance + cmp_threshold: 15 + flatten_classes: true + f1_metric_thresholds: + - - 0.05 + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 0.95 + property_name: category + remap_values: + - - 0 + - 1 + - - 0 + - 255 + score_threshold: 0.7 +rslp_experiment: placeholder +rslp_project: placeholder +trainer: + accumulate_grad_batches: 5 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: epoch + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + every_n_epochs: 10 + mode: min + monitor: val_loss + save_last: true + save_top_k: 1 + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 0 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - moe + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 20 + freeze_selectors: + - encoder + unfreeze_selectors: + - head + - lora + - moe + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 30 + freeze_selectors: [] + unfreeze_lr_factor: 10 + unfreeze_selectors: + - encoder + - head + - lora + - moe + - class_path: rslearn.train.callbacks.adapters.ActivateLayers + init_args: + selectors: + - at_epoch: 20 + name: lora + max_epochs: 500 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/base.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/base.yaml new file mode 100644 index 00000000..64d29a72 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/base.yaml @@ -0,0 +1,48 @@ +model: + class_path: rslp.helios.lightning_module.MoELightningModule + init_args: + model: + class_path: rslearn.models.multitask.MultiTaskMergedModel + init_args: + encoder: + - class_path: rslp.helios.model.Helios + init_args: + checkpoint_path: "{CHECKPOINT_PATH}" + selector: ["encoder"] + forward_kwargs: + patch_size: {PATCH_SIZE} + decoders: # Filled in by make_multidataset_config.py + lazy_decode: true + lr: 0.0001 + scheduler: + class_path: rslearn.train.scheduler.CosineAnnealingScheduler + init_args: + T_max: 100 + eta_min: 0 + +data: + class_path: rslearn.train.data_module.MultiDatasetDataModule + init_args: + sample_mode: random_cycle + refill_batches: true + num_workers: 16 + data_modules: # Filled in by make_multidataset_config.py + +trainer: + max_epochs: 500 + callbacks: + - class_path: lightning.pytorch.callbacks.LearningRateMonitor + init_args: + logging_interval: "epoch" + - class_path: lightning.pytorch.callbacks.ModelCheckpoint + init_args: + save_top_k: 1 + save_last: true + monitor: val_loss + mode: min + every_n_epochs: 10 + +rslp_project: placeholder +rslp_experiment: placeholder + +all_dataset_info_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v3_multitask/all_dataset_info.yaml diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/exp_id.txt b/one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/exp_id.txt new file mode 100644 index 00000000..643dc70c --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/exp_id.txt @@ -0,0 +1 @@ +{task} \ No newline at end of file diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/no_landsat.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/no_landsat.yaml new file mode 100644 index 00000000..5f56d89a --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/no_landsat.yaml @@ -0,0 +1,89 @@ +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/OUT_no_landsat.yaml + +dataset_cfgs: + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_marine_infra_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_marine_infra_128/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_wind_turbine_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_wind_turbine_128/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_helios.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel2_vessels_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel2_vessels_128/basecfg_helios.yaml + +substitutions: + patch_size: 8 + encoder_embedding_size: 768 + helios_checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + +global_overrides: + model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + model: + init_args: + trunk: + class_path: rslearn.models.trunk.DecoderTrunk + init_args: + task_embedding: + class_path: rslearn.models.task_embedding.TaskChannelEmbedding + init_args: + encoder_embedding_size: 768 + add_spatial_embed: true + layers: + - class_path: rslp.helios.moe.MoETransformer + init_args: + dim: 768 + n_layers: 1 + n_heads: 12 + num_experts: 4 + num_slots: 4 + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: "{CHECKPOINT_PATH}" + selector: ["encoder"] + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_lora_kwargs: + use_task_lora: true + task_lora_indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] + gen_hidden: 64 + task_embed_opts: + type: "precomputed" + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt + trainer: + accumulate_grad_batches: 5 + callbacks+: + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 0 + freeze_selectors: ["encoder"] + unfreeze_selectors: ["head", "moe"] + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 20 + freeze_selectors: ["encoder"] + unfreeze_selectors: ["head", "lora", "moe"] + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 30 + freeze_selectors: [] + unfreeze_selectors: ["encoder", "head", "lora", "moe"] + unfreeze_lr_factor: 10 + - class_path: rslearn.train.callbacks.adapters.ActivateLayers + init_args: + selectors: + - name: "lora" + at_epoch: 20 + +merge_options: + merge_heads: true + merge_task_labels: true + same_label_groups: + - [detect_sentinel1_vessels, detect_sentinel2_vessels] diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/no_marine.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/no_marine.yaml new file mode 100644 index 00000000..31a1d81d --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/no_marine.yaml @@ -0,0 +1,88 @@ +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/OUT_no_marine.yaml + +dataset_cfgs: + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_detector_cosinelr.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_wind_turbine_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_wind_turbine_128/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_helios.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel2_vessels_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel2_vessels_128/basecfg_helios.yaml + +substitutions: + patch_size: 8 + encoder_embedding_size: 768 + helios_checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + +global_overrides: + model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + model: + init_args: + trunk: + class_path: rslearn.models.trunk.DecoderTrunk + init_args: + task_embedding: + class_path: rslearn.models.task_embedding.TaskChannelEmbedding + init_args: + encoder_embedding_size: 768 + add_spatial_embed: true + layers: + - class_path: rslp.helios.moe.MoETransformer + init_args: + dim: 768 + n_layers: 1 + n_heads: 12 + num_experts: 4 + num_slots: 4 + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: "{CHECKPOINT_PATH}" + selector: ["encoder"] + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_lora_kwargs: + use_task_lora: true + task_lora_indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] + gen_hidden: 64 + task_embed_opts: + type: "precomputed" + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt + trainer: + accumulate_grad_batches: 5 + callbacks+: + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 0 + freeze_selectors: ["encoder"] + unfreeze_selectors: ["head", "moe"] + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 20 + freeze_selectors: ["encoder"] + unfreeze_selectors: ["head", "lora", "moe"] + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 30 + freeze_selectors: [] + unfreeze_selectors: ["encoder", "head", "lora", "moe"] + unfreeze_lr_factor: 10 + - class_path: rslearn.train.callbacks.adapters.ActivateLayers + init_args: + selectors: + - name: "lora" + at_epoch: 20 + +merge_options: + merge_heads: true + merge_task_labels: true + same_label_groups: + - [detect_sentinel1_vessels, detect_sentinel2_vessels, vessel_detection] diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/no_s1.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/no_s1.yaml new file mode 100644 index 00000000..c70e0534 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/no_s1.yaml @@ -0,0 +1,88 @@ +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/OUT_no_s1.yaml + +dataset_cfgs: + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_detector_cosinelr.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_marine_infra_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_marine_infra_128/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_wind_turbine_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_wind_turbine_128/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel2_vessels_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel2_vessels_128/basecfg_helios.yaml + +substitutions: + patch_size: 8 + encoder_embedding_size: 768 + helios_checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + +global_overrides: + model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + model: + init_args: + trunk: + class_path: rslearn.models.trunk.DecoderTrunk + init_args: + task_embedding: + class_path: rslearn.models.task_embedding.TaskChannelEmbedding + init_args: + encoder_embedding_size: 768 + add_spatial_embed: true + layers: + - class_path: rslp.helios.moe.MoETransformer + init_args: + dim: 768 + n_layers: 1 + n_heads: 12 + num_experts: 4 + num_slots: 4 + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: "{CHECKPOINT_PATH}" + selector: ["encoder"] + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_lora_kwargs: + use_task_lora: true + task_lora_indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] + gen_hidden: 64 + task_embed_opts: + type: "precomputed" + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt + trainer: + accumulate_grad_batches: 5 + callbacks+: + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 0 + freeze_selectors: ["encoder"] + unfreeze_selectors: ["head", "moe"] + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 20 + freeze_selectors: ["encoder"] + unfreeze_selectors: ["head", "lora", "moe"] + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 30 + freeze_selectors: [] + unfreeze_selectors: ["encoder", "head", "lora", "moe"] + unfreeze_lr_factor: 10 + - class_path: rslearn.train.callbacks.adapters.ActivateLayers + init_args: + selectors: + - name: "lora" + at_epoch: 20 + +merge_options: + merge_heads: true + merge_task_labels: true + same_label_groups: + - [detect_sentinel2_vessels, vessel_detection] diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/no_s2.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/no_s2.yaml new file mode 100644 index 00000000..3e8e19d9 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/no_s2.yaml @@ -0,0 +1,88 @@ +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/OUT_no_s2.yaml + +dataset_cfgs: + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_detector_cosinelr.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_marine_infra_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_marine_infra_128/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_wind_turbine_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_wind_turbine_128/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_helios.yaml + +substitutions: + patch_size: 8 + encoder_embedding_size: 768 + helios_checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + +global_overrides: + model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + model: + init_args: + trunk: + class_path: rslearn.models.trunk.DecoderTrunk + init_args: + task_embedding: + class_path: rslearn.models.task_embedding.TaskChannelEmbedding + init_args: + encoder_embedding_size: 768 + add_spatial_embed: true + layers: + - class_path: rslp.helios.moe.MoETransformer + init_args: + dim: 768 + n_layers: 1 + n_heads: 12 + num_experts: 4 + num_slots: 4 + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: "{CHECKPOINT_PATH}" + selector: ["encoder"] + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_lora_kwargs: + use_task_lora: true + task_lora_indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] + gen_hidden: 64 + task_embed_opts: + type: "precomputed" + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt + trainer: + accumulate_grad_batches: 5 + callbacks+: + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 0 + freeze_selectors: ["encoder"] + unfreeze_selectors: ["head", "moe"] + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 20 + freeze_selectors: ["encoder"] + unfreeze_selectors: ["head", "lora", "moe"] + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 30 + freeze_selectors: [] + unfreeze_selectors: ["encoder", "head", "lora", "moe"] + unfreeze_lr_factor: 10 + - class_path: rslearn.train.callbacks.adapters.ActivateLayers + init_args: + selectors: + - name: "lora" + at_epoch: 20 + +merge_options: + merge_heads: true + merge_task_labels: true + same_label_groups: + - [detect_sentinel1_vessels, vessel_detection] diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/no_turbine.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/no_turbine.yaml new file mode 100644 index 00000000..4d4ec1e7 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/no_turbine.yaml @@ -0,0 +1,88 @@ +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/base.yaml +output_path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/OUT_no_turbine.yaml + +dataset_cfgs: + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_detector_cosinelr.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_marine_infra_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_marine_infra_128/basecfg_helios_mm.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_helios.yaml + - - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel2_vessels_128/basecfg_cosinelr.yaml + - /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel2_vessels_128/basecfg_helios.yaml + +substitutions: + patch_size: 8 + encoder_embedding_size: 768 + helios_checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + +global_overrides: + model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + model: + init_args: + trunk: + class_path: rslearn.models.trunk.DecoderTrunk + init_args: + task_embedding: + class_path: rslearn.models.task_embedding.TaskChannelEmbedding + init_args: + encoder_embedding_size: 768 + add_spatial_embed: true + layers: + - class_path: rslp.helios.moe.MoETransformer + init_args: + dim: 768 + n_layers: 1 + n_heads: 12 + num_experts: 4 + num_slots: 4 + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: "{CHECKPOINT_PATH}" + selector: ["encoder"] + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_lora_kwargs: + use_task_lora: true + task_lora_indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] + gen_hidden: 64 + task_embed_opts: + type: "precomputed" + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt + trainer: + accumulate_grad_batches: 5 + callbacks+: + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 0 + freeze_selectors: ["encoder"] + unfreeze_selectors: ["head", "moe"] + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 20 + freeze_selectors: ["encoder"] + unfreeze_selectors: ["head", "lora", "moe"] + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 30 + freeze_selectors: [] + unfreeze_selectors: ["encoder", "head", "lora", "moe"] + unfreeze_lr_factor: 10 + - class_path: rslearn.train.callbacks.adapters.ActivateLayers + init_args: + selectors: + - name: "lora" + at_epoch: 20 + +merge_options: + merge_heads: true + merge_task_labels: true + same_label_groups: + - [detect_sentinel1_vessels, detect_sentinel2_vessels, vessel_detection] diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/template.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/template.yaml new file mode 100644 index 00000000..2b4db019 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/template.yaml @@ -0,0 +1,88 @@ +base_cfg: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/base.yaml +output_path: + +dataset_cfgs: + +substitutions: + patch_size: 8 + encoder_embedding_size: 768 + helios_checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + +global_overrides: + model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + restore_config: + class_path: rslearn.train.lightning_module.RestoreConfig + init_args: + restore_path: + selector: ["state_dict"] + remap_prefixes: + - ["model.", ""] + ignore_prefixes: + - "model.decoders.FasterRCNN.0.roi_heads.box_predictor.bbox_pred.bias" + - "model.decoders.FasterRCNN.0.roi_heads.box_predictor.cls_score.bias" + - "model.decoders.FasterRCNN.0.roi_heads.box_predictor.bbox_pred.weight" + - "model.decoders.FasterRCNN.0.roi_heads.box_predictor.cls_score.weight" + - "model.trunk.task_embedding.embed.weight" + model: + init_args: + trunk: + class_path: rslearn.models.trunk.DecoderTrunk + init_args: + task_embedding: + class_path: rslearn.models.task_embedding.TaskChannelEmbedding + init_args: + encoder_embedding_size: 768 + add_spatial_embed: true + layers: + - class_path: rslp.helios.moe.MoETransformer + init_args: + dim: 768 + n_layers: 1 + n_heads: 12 + num_experts: 4 + num_slots: 4 + encoder: + - class_path: rslp.helios.model.TaskConditionedHelios + init_args: + checkpoint_path: /weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000 + selector: ["encoder"] + forward_kwargs: + patch_size: 8 + model_overrides: + encoder_config: + task_lora_kwargs: + use_task_lora: true + task_lora_indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] + gen_hidden: 64 + task_embed_opts: + type: "precomputed" + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt + trainer: + callbacks+: + - class_path: rslearn.train.callbacks.freeze_unfreeze.MultiStageFineTuning + init_args: + stages: + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 0 + freeze_selectors: ["encoder"] + unfreeze_selectors: ["head", "moe"] + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 20 + freeze_selectors: ["encoder"] + unfreeze_selectors: ["head", "lora", "moe"] + unfreeze_lr_factor: 10 + - class_path: rslearn.train.callbacks.freeze_unfreeze.FTStage + init_args: + at_epoch: 30 + freeze_selectors: [] + unfreeze_selectors: ["head", "lora", "moe", "encoder"] + unfreeze_lr_factor: 10 + +merge_options: + merge_heads: true + merge_task_labels: true + same_label_groups: diff --git a/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_cosinelr.yaml b/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_cosinelr.yaml index 24e056ce..85e4e07b 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_cosinelr.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_cosinelr.yaml @@ -69,7 +69,7 @@ data: - val_ascending - val_descending trainer: - max_epochs: 500 + max_epochs: 200 limit_val_batches: 256 callbacks: - class_path: lightning.pytorch.callbacks.LearningRateMonitor diff --git a/one_off_projects/2025_07_joint_finetune/configs/v3_singletask/freeze.yaml b/one_off_projects/2025_07_joint_finetune/configs/v3_singletask/freeze.yaml new file mode 100644 index 00000000..a70e8f09 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/v3_singletask/freeze.yaml @@ -0,0 +1,7 @@ +trainer: + callbacks+: + - class_path: rslearn.train.callbacks.freeze_unfreeze.FreezeUnfreeze + init_args: + module_selector: ["model", "encoder", 0] + unfreeze_at_epoch: 2 + unfreeze_lr_factor: 1 diff --git a/one_off_projects/2025_07_joint_finetune/scripts/do_eval_merged.py b/one_off_projects/2025_07_joint_finetune/scripts/do_eval_merged.py index 9cf092dd..91e401d6 100644 --- a/one_off_projects/2025_07_joint_finetune/scripts/do_eval_merged.py +++ b/one_off_projects/2025_07_joint_finetune/scripts/do_eval_merged.py @@ -13,13 +13,16 @@ import torch -def load_yaml_config(config_path, substitutions=None): +def load_yaml_config(config_path, substitutions=None, raw_substitutions=None): with open(config_path, 'r') as f: config_str = f.read() if substitutions: - for key, value in substitutions.items(): + for key, value in (substitutions or {}).items(): if value is not None: config_str = config_str.replace(f"{{{key}}}", str(value)) + for key, value in (raw_substitutions or {}).items(): + if value is not None: + config_str = config_str.replace(key, str(value)) return yaml.safe_load(config_str) @@ -86,9 +89,16 @@ def replace_key(d, key, value): "256/PATCH_SIZE": 256 // 8, "128/PATCH_SIZE": 128 // 8, } + raw_substitutions = { + "rslearn.models.trunk.MoETransformer": "rslp.helios.moe.MoETransformer", + } with tempfile.NamedTemporaryFile(mode="w") as f: - cfg = load_yaml_config(ckpt_cfg_path, substitutions=substitutions) + cfg = load_yaml_config( + ckpt_cfg_path, + substitutions=substitutions, + raw_substitutions=raw_substitutions + ) # Get the task label offsets and link tasks old_cfg_style = True diff --git a/one_off_projects/2025_07_joint_finetune/scripts/do_eval_sft.py b/one_off_projects/2025_07_joint_finetune/scripts/do_eval_sft.py index eda08141..5b66e291 100644 --- a/one_off_projects/2025_07_joint_finetune/scripts/do_eval_sft.py +++ b/one_off_projects/2025_07_joint_finetune/scripts/do_eval_sft.py @@ -26,13 +26,17 @@ parser = argparse.ArgumentParser() parser.add_argument("ckpt_path", type=str, help="Path to the checkpoint") -parser.add_argument("task", type=str, help="Task to evaluate") parser.add_argument("old_or_new", type=str, help="old or new helios checkpoint") +parser.add_argument("--task", type=str, help="Task to evaluate", default=None) parser.add_argument("--full", action="store_true", help="Run eval on all patches") parser.add_argument("--save_eval_path", type=str, help="Path to save eval results") args = parser.parse_args() -ckpt_cfg_paths = all_cfgs[args.task] +if args.task is not None: + ckpt_cfg_paths = all_cfgs[args.task] +else: + ckpt_cfg_paths = [os.path.join(os.path.dirname(args.ckpt_path), "config.yaml")] +print(f"using ckpt cfg paths {ckpt_cfg_paths}") if args.old_or_new.lower() == "old": helios_path = "/weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000" else: @@ -63,14 +67,20 @@ "128/PATCH_SIZE": 128 // 8, } -def load_yaml_config(config_path, substitutions=None): +def load_yaml_config(config_path, substitutions=None, delete=None): + delete = delete or [] with open(config_path, 'r') as f: config_str = f.read() if substitutions: for key, value in substitutions.items(): if value is not None: config_str = config_str.replace(f"{{{key}}}", str(value)) - return yaml.safe_load(config_str) + d = yaml.safe_load(config_str) + for k in delete: + if k in d: + print("pop key", k) + d.pop(k) + return d def deep_merge(base, override): for k, v in override.items(): @@ -96,7 +106,10 @@ def deep_merge(base, override): cfg = {} for ckpt_cfg_path in ckpt_cfg_paths: - cfg = deep_merge(cfg, load_yaml_config(ckpt_cfg_path, substitutions)) + delete = [] + if args.task is None: + delete = ['trainer'] + cfg = deep_merge(cfg, load_yaml_config(ckpt_cfg_path, substitutions, delete=delete)) if args.full: cfg["data"]["init_args"]["use_in_memory_all_patches_dataset"] = True @@ -105,10 +118,26 @@ def deep_merge(base, override): cfg["data"]["init_args"][f"{split}_config"]["patch_size"] = substitutions["PATCH_SIZE"] print("patched config to have in_memory_all_patches_dataset=True") + + # just in case, load the model portion from the ckpt config + ckpt_cfg = load_yaml_config( + os.path.join(os.path.dirname(args.ckpt_path), "config.yaml"), + substitutions + ) + ref = ckpt_cfg["model"]["init_args"]["model"]["init_args"] + base = cfg["model"]["init_args"]["model"]["init_args"] + for k in base: + if k in ref: + print("overriding base config with ckpt config for model.model, key", k) + base[k] = ref[k].copy() + + print(cfg) + yaml.dump(cfg, f) f.flush() - print(f"Evaluating {args.task} with checkpoint {args.ckpt_path}") + task = args.task or "" + print(f"Evaluating {task} with checkpoint {args.ckpt_path}") print() print("=" * 80) print(" ".join(cmd)) diff --git a/one_off_projects/2025_07_joint_finetune/scripts/do_eval_unmerged.py b/one_off_projects/2025_07_joint_finetune/scripts/do_eval_unmerged.py index 178db69b..136b18e9 100644 --- a/one_off_projects/2025_07_joint_finetune/scripts/do_eval_unmerged.py +++ b/one_off_projects/2025_07_joint_finetune/scripts/do_eval_unmerged.py @@ -14,13 +14,16 @@ import torch import json -def load_yaml_config(config_path, substitutions=None): +def load_yaml_config(config_path, substitutions=None, raw_substitutions=None): with open(config_path, 'r') as f: config_str = f.read() if substitutions: - for key, value in substitutions.items(): + for key, value in (substitutions or {}).items(): if value is not None: config_str = config_str.replace(f"{{{key}}}", str(value)) + for key, value in (raw_substitutions or {}).items(): + if value is not None: + config_str = config_str.replace(key, str(value)) return yaml.safe_load(config_str) @@ -73,6 +76,9 @@ def load_yaml_config(config_path, substitutions=None): "256/PATCH_SIZE": 256 // 8, "128/PATCH_SIZE": 128 // 8, } + raw_substitutions = { + "rslearn.models.trunk.MoETransformer": "rslp.helios.moe.MoETransformer", + } cmd = [ "python", "-m", "rslp.main", "helios", "launch_finetune", "--helios_checkpoint_path", "/weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000", @@ -108,7 +114,11 @@ def load_yaml_config(config_path, substitutions=None): with tempfile.NamedTemporaryFile(mode="w") as cfg_file: for i, ckpt_cfg_path in enumerate(ckpt_cfg_paths): if i == 0: - cfg = load_yaml_config(ckpt_cfg_path, substitutions=substitutions) + cfg = load_yaml_config( + ckpt_cfg_path, + substitutions=substitutions, + raw_substitutions=raw_substitutions + ) cfg["trainer"]["limit_val_batches"] = max_batches cfg["model"]["init_args"]["model"]["init_args"]["trunk"] = trunk_cfg cfg["model"]["init_args"]["restore_config"] = { diff --git a/one_off_projects/2025_07_joint_finetune/scripts/measure_throughput.py b/one_off_projects/2025_07_joint_finetune/scripts/measure_throughput.py new file mode 100644 index 00000000..dbdcd4ea --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/scripts/measure_throughput.py @@ -0,0 +1,429 @@ +"""Measure model throughput for rslearn-trained Helios checkpoints. + +This script loads a Helios model from a run directory and measures its inference throughput +with configurable batch sizes, image sizes, and modality configurations. +""" + +import os +import argparse +import json +import yaml +import importlib +import time +import torch +import numpy as np +from typing import Dict, List, Tuple, Any +from contextlib import contextmanager + +from rslearn.train.lightning_module import RestoreConfig + + +class ThroughputMeasurer: + """Configurable throughput measurement for Helios models.""" + + def __init__( + self, + run_dir: str, + project: str = "2025_08_29_finetune_benchmarks", + base_dir: str = "/weka/dfive-default/rslearn-eai/projects", + device: str = "cuda", + warmup_runs: int = 5, + measurement_runs: int = 20, + batch_sizes: List[int] = [1, 4, 8, 16], + image_sizes: List[int] = [224, 448, 672], + modalities: List[str] = ["sentinel2_l2a"], + dtype: torch.dtype = torch.float16, + compile_model: bool = False, + dataset_source: str = "sentinel2_l2a", + ): + self.run_dir = run_dir + self.project = project + self.base_dir = base_dir + self.device = device + self.warmup_runs = warmup_runs + self.measurement_runs = measurement_runs + self.batch_sizes = batch_sizes + self.image_sizes = image_sizes + self.modalities = modalities + self.dtype = dtype + self.compile_model = compile_model + self.dataset_source = dataset_source + + self.model = None + self.model_config = None + self.results = {} + + # Modality-specific configurations based on Helios constants + self.modality_configs = { + "sentinel2_l2a": {"num_bands": 12, "band_sets": 3, "is_multitemporal": True}, + "sentinel1": {"num_bands": 2, "band_sets": 1, "is_multitemporal": True}, + "worldcover": {"num_bands": 1, "band_sets": 1, "is_multitemporal": False}, + "openstreetmap_raster": {"num_bands": 30, "band_sets": 1, "is_multitemporal": False}, + "landsat": {"num_bands": 11, "band_sets": 2, "is_multitemporal": True}, + } + + # Default sequence length for multitemporal data + self.max_sequence_length = 12 + + def load_model(self) -> None: + """Load the model from the run directory.""" + print("Loading model...") + + # Load the finetune config + finetune_config_path = os.path.join(self.base_dir, self.project, self.run_dir, "checkpoints", "config.yaml") + if not os.path.exists(finetune_config_path): + raise FileNotFoundError(f"Config file not found: {finetune_config_path}") + + with open(finetune_config_path, "r") as f: + finetune_config = yaml.safe_load(f) + + # Extract model configuration + enc = finetune_config["model"]["init_args"]["model"]["init_args"]["encoder"][0] + self.model_config = enc["init_args"] + base_class = self._resolve_class_path(enc["class_path"]) + + print(f"Model class: {base_class}") + print(f"Model config: {json.dumps(self.model_config, indent=2)}") + + # Load checkpoint + ckpt_path = os.path.join(self.base_dir, self.project, self.run_dir, "checkpoints", "last.ckpt") + if not os.path.exists(ckpt_path): + raise FileNotFoundError(f"Checkpoint not found: {ckpt_path}") + + restore_config = RestoreConfig( + ckpt_path, + selector=["state_dict"], + ignore_prefixes=["model.decoders"], + remap_prefixes=[("model.encoder.0.model.", "model.encoder.")] + ) + state_dict = restore_config.get_state_dict() + + # Initialize model + self.model = base_class(**self.model_config) + self.model.load_state_dict(state_dict, strict=False) + self.model = self.model.to(self.device).to(self.dtype) + self.model.eval() + + # Check if this is a TaskConditionedHelios model and get available tasks + if hasattr(self.model, 'tasks'): + available_tasks = self.model.tasks + print(f"Available tasks: {available_tasks}") + + # Update dataset_source to use the first available task if current one is not available + if self.dataset_source not in available_tasks: + self.dataset_source = available_tasks[0] + print(f"Updated dataset_source to: {self.dataset_source}") + else: + print("Model is not task-conditioned, using provided dataset_source") + + # Try to determine what modalities the model was trained with + # by checking the model config or trying a simple forward pass + print(f"Using modalities: {self.modalities}") + print(f"Dataset source: {self.dataset_source}") + + # Compile model if requested + if self.compile_model and hasattr(torch, 'compile'): + print("Compiling model...") + self.model = torch.compile(self.model) + + print("Model loaded successfully!") + + # Count model parameters + self._count_parameters() + + def _count_parameters(self) -> None: + """Count and display model parameters.""" + total_params = sum(p.numel() for p in self.model.parameters()) + trainable_params = sum(p.numel() for p in self.model.parameters() if p.requires_grad) + + print(f"Model Parameters:") + print(f" Total parameters: {total_params:,}") + print(f" Trainable parameters: {trainable_params:,}") + print(f" Non-trainable parameters: {total_params - trainable_params:,}") + + # Store parameter counts in results + self.total_params = total_params + self.trainable_params = trainable_params + + def _resolve_class_path(self, class_path: str): + """Resolve class from string path.""" + module_path, class_name = class_path.rsplit(".", 1) + module = importlib.import_module(module_path) + return getattr(module, class_name) + + @contextmanager + def _timer(self): + """Context manager for timing operations.""" + if self.device == "cuda": + torch.cuda.synchronize() + start = time.time() + try: + yield + finally: + if self.device == "cuda": + torch.cuda.synchronize() + end = time.time() + return end - start + + def _generate_inputs(self, batch_size: int, image_size: int) -> List[Dict[str, Any]]: + """Generate random Helios-compatible input data for testing.""" + inputs = [] + + for _ in range(batch_size): + sample = {"dataset_source": self.dataset_source} + + # Always provide all modalities that the model might expect + # This ensures the model doesn't fail when looking for specific modalities + all_modalities = ["sentinel2_l2a", "sentinel1", "worldcover", "openstreetmap_raster", "landsat"] + + for modality in all_modalities: + if modality in self.modality_configs: + config = self.modality_configs[modality] + num_bands = config["num_bands"] + is_multitemporal = config["is_multitemporal"] + + if is_multitemporal: + # For multitemporal data: (timesteps * num_bands, height, width) + # Use max_sequence_length timesteps + modality_data = torch.randn( + self.max_sequence_length * num_bands, image_size, image_size, + device=self.device, + dtype=self.dtype + ) + else: + # For static data: (num_bands, height, width) + modality_data = torch.randn( + num_bands, image_size, image_size, + device=self.device, + dtype=self.dtype + ) + + sample[modality] = modality_data + + inputs.append(sample) + + return inputs + + def _measure_forward_pass(self, batch_size: int, image_size: int) -> Tuple[float, float]: + """Measure a single forward pass.""" + inputs = self._generate_inputs(batch_size, image_size) + + # Warmup + with torch.no_grad(): + for i in range(self.warmup_runs): + try: + output = self.model(inputs) + if output is None: + raise ValueError("Model returned None during warmup") + if i == 0: # Print debug info only for first warmup + print(f" Model output type: {type(output)}") + if isinstance(output, list): + print(f" Output list length: {len(output)}") + for j, item in enumerate(output): + print(f" Output[{j}] type: {type(item)}, shape: {item.shape if hasattr(item, 'shape') else 'N/A'}") + except Exception as e: + raise ValueError(f"Error during warmup: {e}") + + # Actual measurement + times = [] + with torch.no_grad(): + for i in range(self.measurement_runs): + try: + # Simple timing without context manager + if self.device == "cuda": + torch.cuda.synchronize() + start = time.time() + + output = self.model(inputs) + + if self.device == "cuda": + torch.cuda.synchronize() + end = time.time() + + elapsed = end - start + + if output is None: + raise ValueError("Model returned None during measurement") + # Additional validation + if isinstance(output, list) and len(output) > 0: + if output[0] is None: + raise ValueError("Model output[0] is None") + elif output is None: + raise ValueError("Model output is None") + + times.append(elapsed) + except Exception as e: + print(f" Error in measurement run {i+1}: {e}") + print(f" Error type: {type(e)}") + import traceback + traceback.print_exc() + raise ValueError(f"Error during measurement: {e}") + + mean_time = np.mean(times) + std_time = np.std(times) + + return mean_time, std_time + + def measure_throughput(self) -> Dict: + """Measure throughput across different configurations.""" + if self.model is None: + raise RuntimeError("Model not loaded. Call load_model() first.") + + print("Starting throughput measurements...") + self.results = { + "run_dir": self.run_dir, + "project": self.project, + "device": self.device, + "dtype": str(self.dtype), + "compile_model": self.compile_model, + "modalities": self.modalities, + "dataset_source": self.dataset_source, + "total_parameters": getattr(self, 'total_params', 0), + "trainable_parameters": getattr(self, 'trainable_params', 0), + "measurements": {} + } + + total_configs = len(self.batch_sizes) * len(self.image_sizes) + current_config = 0 + + for batch_size in self.batch_sizes: + for image_size in self.image_sizes: + current_config += 1 + print(f"Measuring [{current_config}/{total_configs}] - Batch: {batch_size}, ImageSize: {image_size}x{image_size}") + + try: + mean_time, std_time = self._measure_forward_pass(batch_size, image_size) + + # Calculate throughput metrics + pixels_per_second = (batch_size * image_size * image_size) / mean_time + samples_per_second = batch_size / mean_time + + # Calculate efficiency metrics + total_params = self.results.get('total_parameters', 0) + params_per_second = total_params / mean_time if total_params > 0 else 0 + flops_per_param = (batch_size * image_size * image_size) / total_params if total_params > 0 else 0 + + config_key = f"batch_{batch_size}_img_{image_size}" + self.results["measurements"][config_key] = { + "batch_size": batch_size, + "image_size": image_size, + "mean_time_ms": mean_time * 1000, + "std_time_ms": std_time * 1000, + "pixels_per_second": pixels_per_second, + "samples_per_second": samples_per_second, + "params_per_second": params_per_second, + "flops_per_param": flops_per_param, + "memory_allocated_gb": torch.cuda.memory_allocated() / 1e9 if self.device == "cuda" else 0, + "memory_reserved_gb": torch.cuda.memory_reserved() / 1e9 if self.device == "cuda" else 0, + } + + print(f" Time: {mean_time*1000:.2f}±{std_time*1000:.2f} ms") + print(f" Throughput: {pixels_per_second:.0f} pixels/s, {samples_per_second:.2f} samples/s") + + except Exception as e: + print(f" Error: {e}") + config_key = f"batch_{batch_size}_img_{image_size}" + self.results["measurements"][config_key] = { + "batch_size": batch_size, + "image_size": image_size, + "error": str(e) + } + + return self.results + + def save_results(self, output_path: str) -> None: + """Save results to JSON file.""" + os.makedirs(os.path.dirname(output_path), exist_ok=True) + with open(output_path, "w") as f: + json.dump(self.results, f, indent=2) + print(f"Results saved to: {output_path}") + + def print_summary(self) -> None: + """Print a summary of the results.""" + print("\n" + "="*80) + print("THROUGHPUT MEASUREMENT SUMMARY") + print("="*80) + print(f"Run Directory: {self.run_dir}") + print(f"Project: {self.project}") + print(f"Device: {self.device}") + print(f"Data Type: {self.dtype}") + print(f"Compiled: {self.compile_model}") + print(f"Total Parameters: {self.results.get('total_parameters', 0):,}") + print(f"Trainable Parameters: {self.results.get('trainable_parameters', 0):,}") + print("-"*80) + + if "measurements" in self.results: + print(f"{'Configuration':20} | {'Pixels/s':>10} | {'Samples/s':>8} | {'Time(ms)':>8} | {'Params/s':>12}") + print("-" * 80) + for config_key, data in self.results["measurements"].items(): + if "error" not in data: + print(f"{config_key:20} | {data['pixels_per_second']:10.0f} | {data['samples_per_second']:8.2f} | {data['mean_time_ms']:8.1f} | {data['params_per_second']:12.0f}") + else: + print(f"{config_key:20} | ERROR: {data['error']}") + + print("="*80) + + +def main(): + parser = argparse.ArgumentParser(description="Measure model throughput") + parser.add_argument("--run", type=str, required=True, help="Run directory name") + parser.add_argument("--project", type=str, default="2025_08_29_finetune_benchmarks", help="Project name") + parser.add_argument("--base_dir", type=str, default="/weka/dfive-default/rslearn-eai/projects", help="Base directory for projects") + parser.add_argument("--output", type=str, help="Output file for results") + + # Measurement parameters + parser.add_argument("--device", type=str, default="cuda", choices=["cuda", "cpu"], help="Device to run on") + parser.add_argument("--dtype", type=str, default="float16", choices=["float16", "float32", "bfloat16"], help="Data type") + parser.add_argument("--warmup_runs", type=int, default=5, help="Number of warmup runs") + parser.add_argument("--measurement_runs", type=int, default=20, help="Number of measurement runs") + parser.add_argument("--batch_sizes", type=int, nargs="+", default=[1, 8, 16], help="Batch sizes to test") + parser.add_argument("--image_sizes", type=int, nargs="+", default=[128, 224], help="Image sizes to test") + parser.add_argument("--modalities", type=str, nargs="+", default=["sentinel2_l2a", "sentinel1", "worldcover"], help="Modalities to include") + parser.add_argument("--dataset_source", type=str, default="sentinel2_l2a", help="Dataset source for task conditioning") + parser.add_argument("--compile", action="store_true", help="Compile model with torch.compile") + + args = parser.parse_args() + + # Convert dtype string to torch dtype + dtype_map = { + "float16": torch.float16, + "float32": torch.float32, + "bfloat16": torch.bfloat16, + } + dtype = dtype_map[args.dtype] + + # Initialize measurer + measurer = ThroughputMeasurer( + run_dir=args.run, + project=args.project, + base_dir=args.base_dir, + device=args.device, + warmup_runs=args.warmup_runs, + measurement_runs=args.measurement_runs, + batch_sizes=args.batch_sizes, + image_sizes=args.image_sizes, + modalities=args.modalities, + dataset_source=args.dataset_source, + dtype=dtype, + compile_model=args.compile, + ) + + try: + # Load model and measure throughput + measurer.load_model() + results = measurer.measure_throughput() + + # Save and display results + if args.output is not None: + measurer.save_results(args.output) + measurer.print_summary() + + except Exception as e: + print(f"Error: {e}") + return 1 + + return 0 + + +if __name__ == "__main__": + exit(main()) diff --git a/one_off_projects/2025_07_joint_finetune/scripts/multiple_eval_sft.py b/one_off_projects/2025_07_joint_finetune/scripts/multiple_eval_sft.py index e301d648..914f7f5f 100644 --- a/one_off_projects/2025_07_joint_finetune/scripts/multiple_eval_sft.py +++ b/one_off_projects/2025_07_joint_finetune/scripts/multiple_eval_sft.py @@ -39,11 +39,15 @@ task = tasks[d.replace("_" + args.version, "")] except KeyError: continue - cmd = f"python do_eval_sft.py {ckpt_path} {task} {old_or_new}" + cmd = f"python do_eval_sft.py {ckpt_path} {old_or_new} --task {task}" if args.full: cmd += " --full" if args.save_dir: - cmd += f" --save_eval_path {os.path.join(args.save_dir, d + '.json')}" + save_path = os.path.join(args.save_dir, d + '.json') + cmd += f" --save_eval_path {save_path}" + if os.path.exists(save_path): + print("skipping existing eval for", d) + continue print(cmd) os.system(cmd) print() diff --git a/one_off_projects/2025_07_joint_finetune/scripts/run.py b/one_off_projects/2025_07_joint_finetune/scripts/run.py index cee1dc65..ec2fee75 100644 --- a/one_off_projects/2025_07_joint_finetune/scripts/run.py +++ b/one_off_projects/2025_07_joint_finetune/scripts/run.py @@ -52,6 +52,21 @@ ] for cfg in cfgs: cmd.append("--config_paths+=" + cfg) +elif args.cfg == "turbine": + cfgs = [ + '/weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_wind_turbine_128/basecfg_cosinelr.yaml', + '/weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_wind_turbine_128/basecfg_helios_mm.yaml', + '/weka/dfive-default/ryanp/rslearn_projects/data/helios/v2_shared/helios_freeze_then_lowlr.yaml' + ] + for cfg in cfgs: + cmd.append("--config_paths+=" + cfg) +elif args.cfg == "solar": + cfgs = [ + '/weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_solar_farm_128/basecfg_cosinelr.yaml', + '/weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_satlas_solar_farm_128/basecfg_helios_mm.yaml' + ] + for cfg in cfgs: + cmd.append("--config_paths+=" + cfg) elif args.cfg == "lora": args.cfg = "/weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_embeds/OUT_classify_plain.yaml" args.exp_id = "debug_task_lora_classify" diff --git a/one_off_projects/2025_07_joint_finetune/scripts/run_all.py b/one_off_projects/2025_07_joint_finetune/scripts/run_all.py index 56a86225..37eef731 100644 --- a/one_off_projects/2025_07_joint_finetune/scripts/run_all.py +++ b/one_off_projects/2025_07_joint_finetune/scripts/run_all.py @@ -15,15 +15,16 @@ def find_dir(base_dir, postfix_dir): parser = argparse.ArgumentParser() parser.add_argument("--dirs", type=str, required=True, nargs="+") -parser.add_argument("--tasks", type=str, nargs="*", default=["classify", "segment", "detect", "all"]) +parser.add_argument("--tasks", type=str, nargs="*") parser.add_argument("--base_dir", type=str, default="/weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs") parser.add_argument("--project", type=str, default="2025_08_12_task_embeds") parser.add_argument("--clusters", type=str, nargs="*", default=["saturn", "ceres", "titan"]) parser.add_argument("--ckpt_path", type=str, default=ckpt_paths["v1"]) parser.add_argument("--dry", action="store_true") +parser.add_argument("--gpu", type=int, default=4) args = parser.parse_args() -template = "python3 run.py --cfg {cfg} --exp_id {exp} --gpu 4 --image dev --project {project} --clusters {clusters} --ckpt_path {ckpt_path}" +template = "python3 run.py --cfg {cfg} --exp_id {exp} --gpu {gpu} --image dev --project {project} --clusters {clusters} --ckpt_path {ckpt_path}" if args.ckpt_path in ckpt_paths: args.ckpt_path = ckpt_paths[args.ckpt_path] @@ -33,7 +34,8 @@ def find_dir(base_dir, postfix_dir): base_exp_id = f.read().strip() for f in os.listdir(os.path.join(args.base_dir, d)): go = False - for task in args.tasks: + tasks = args.tasks or os.listdir(os.path.join(args.base_dir, d)) + for task in tasks: if task in f: go = True break @@ -47,6 +49,7 @@ def find_dir(base_dir, postfix_dir): project=args.project, clusters=" ".join(args.clusters), ckpt_path=args.ckpt_path, + gpu=args.gpu ) print(cmd) if not args.dry: diff --git a/one_off_projects/2025_07_joint_finetune/scripts/submit_base_finetune.py b/one_off_projects/2025_07_joint_finetune/scripts/submit_base_finetune.py index a47f1784..8a3c3eec 100644 --- a/one_off_projects/2025_07_joint_finetune/scripts/submit_base_finetune.py +++ b/one_off_projects/2025_07_joint_finetune/scripts/submit_base_finetune.py @@ -8,17 +8,14 @@ RUN = True DEBUG = False -#PROJECT_NAME = "helios-debug" if DEBUG else "2025_07_29_helios_finetune" #"2025_07_29_helios_joint_finetune_debug" -# PROJECT_NAME = "helios_finetune_cosinelr"#"2025_07_30_joint_finetune_sweep" -PROJECT_NAME = "2025_08_25_multitask" -# CKPT_PATH = "/weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000" -CKPT_PATH = "/weka/dfive-default/helios/checkpoints/yawenzzzz/latent_mim_cross_random_per_modality_patchdisc_add_contrastive_0.1_1/step400000" -IMAGE_NAME = "henryh/rslp_multidataset_dev_0.05w" if "joint_finetune_debug" in PROJECT_NAME else "henryh/rslp_multidataset_dev" +PROJECT_NAME = "2025_08_29_finetune_benchmarks" +CKPT_PATH = "/weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000" +# CKPT_PATH = "/weka/dfive-default/helios/checkpoints/yawenzzzz/latent_mim_cross_random_per_modality_patchdisc_add_contrastive_0.1_1/step400000" +IMAGE_NAME = "henryh/rslp_multidataset_dev" def submit_job(task_dir: str, task_name: str, cfgs: list[str]) -> bool: """Submit a single helios finetune job.""" - # exp_id = task_name + "_0.05w" if "joint_finetune_debug" in PROJECT_NAME else task_name + "__fewbatcheval" exp_id = task_name cmd = [ "python", "-m", "rslp.main", "helios", "launch_finetune", diff --git a/one_off_projects/2025_07_joint_finetune/scripts/submit_data_percent_finetune.py b/one_off_projects/2025_07_joint_finetune/scripts/submit_data_percent_finetune.py index 2d702f7c..bfcdd4d2 100644 --- a/one_off_projects/2025_07_joint_finetune/scripts/submit_data_percent_finetune.py +++ b/one_off_projects/2025_07_joint_finetune/scripts/submit_data_percent_finetune.py @@ -154,7 +154,7 @@ def main(): # Define checkpoint paths ckpt_paths = { - "base": { + "v2_base": { "helios": "/weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000", "sft": None, }, @@ -162,10 +162,10 @@ def main(): # "helios": "/weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000", # "sft": "/weka/dfive-default/rslearn-eai/projects/helios_finetune_cosine_lr/classify_all_v2__unmerged__vessel_classification" # }, - "detect_v2": { - "helios": "/weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000", - "sft": "/weka/dfive-default/rslearn-eai/projects/helios_finetune_cosine_lr/detect_all_v2__unmerged__vessel_detection" - }, + # "detect_v2": { + # "helios": "/weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000", + # "sft": "/weka/dfive-default/rslearn-eai/projects/helios_finetune_cosine_lr/detect_all_v2__unmerged__vessel_detection" + # }, # "segment_v2": { # "helios": "/weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000", # "sft": "/weka/dfive-default/rslearn-eai/projects/helios_finetune_cosine_lr/segment_all_v2__unmerged__segment" @@ -174,24 +174,49 @@ def main(): # Define experiments experiments = [ - # { - # "name": "vessel_detection", - # "config_paths": [ - # configs_dir / "v2_landsat_vessels" / "finetune_detector_cosinelr.yaml", - # "/weka/dfive-default/ryanp/rslearn_projects/data/helios/v2_shared/helios_freeze_then_lowlr.yaml" - # ], - # }, + #{ + # "name": "vessel_detection", + # "config_paths": [ + # configs_dir / "v2_landsat_vessels" / "finetune_detector_cosinelr.yaml", + # #"/weka/dfive-default/ryanp/rslearn_projects/data/helios/v2_shared/helios_freeze_then_lowlr.yaml" + # "/weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v3_singletask/freeze.yaml" + # ], + #}, + #{ + # "name": "cropland_classification", + # "config_paths": [ + # configs_dir / "v2_worldcereal_cropland" / "finetune_s1_s2_cosinelr.yaml", + # "/weka/dfive-default/ryanp/rslearn_projects/data/helios/v2_shared/helios_freeze_then_lowlr.yaml" + # ], + #}, + #{ + # "name": "nandi_crop_type", + # "config_paths": [ + # configs_dir / "v2_nandi_crop_type" / "finetune_s1_s2_cosinelr.yaml", + # #"/weka/dfive-default/ryanp/rslearn_projects/data/helios/v2_shared/helios_freeze_then_lowlr.yaml" + # "/weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v3_singletask/freeze.yaml" + # ], + #}, { - "name": "cropland_classification", + "name": "marine_infra", "config_paths": [ - configs_dir / "v2_worldcereal_cropland" / "finetune_s1_s2_cosinelr.yaml", - "/weka/dfive-default/ryanp/rslearn_projects/data/helios/v2_shared/helios_freeze_then_lowlr.yaml" - ], + configs_dir / "v2_satlas_marine_infra_128" / "basecfg_cosinelr.yaml", + configs_dir / "v2_satlas_marine_infra_128" / "basecfg_helios_mm.yaml", + "/weka/dfive-default/ryanp/rslearn_projects/data/helios/v2_shared/helios_freeze_then_lowlr.yaml", + ] }, + #{ + # "name": "sentinel1_vessels", + # "config_paths": [ + # configs_dir / "v2_sentinel1_vessels_128" / "basecfg_cosinelr.yaml", + # configs_dir / "v2_sentinel1_vessels_128" / "basecfg_helios.yaml", + # "/weka/dfive-default/ryanp/rslearn_projects/data/helios/v2_shared/helios_freeze_then_lowlr.yaml", + # ] + #}, ] # Dataset percentages to test - limit_train_batches_values = [0.01, 0.1, 0.2, 0.5, 1.0] + limit_train_batches_values = [0.01, 0.1, 0.2, 0.5, 0.7, 0.9] # Create substitutions dictionary substitutions = { diff --git a/one_off_projects/2025_07_joint_finetune/scripts/submit_isolate_finetune.py b/one_off_projects/2025_07_joint_finetune/scripts/submit_isolate_finetune.py index 89c3ae1d..d0126af7 100644 --- a/one_off_projects/2025_07_joint_finetune/scripts/submit_isolate_finetune.py +++ b/one_off_projects/2025_07_joint_finetune/scripts/submit_isolate_finetune.py @@ -4,7 +4,7 @@ roi head weights for detection tasks. Use a small lr since these models are not changed at all from the previous sft phase, -so it's quite easy to overfit very quickly. No need to do freezeing, probably. +so it's quite easy to overfit very quickly. No need to do freezing, probably. Uses so far =========== @@ -12,121 +12,201 @@ Experiments to run ================== -1. SFT on task-matched models with no freezing (ie classify->classify__moe) - - python3 submit_isolate_finetune.py classify__moe_v2 segment__moe_v2 detect__moe_v2 - +1. SFT on task-matched models with no freezing (ie classify->classify__moe) [OUTDATED] + - python3 submit_isolate_finetune.py --models classify__moe_v2 segment__moe_v2 detect__moe_v2 +2. LOO experiments (for final presentation) + - python3 submit_isolate_finetune.py --loo --models no_landsat no_s1 no_s2 no_turbine no_marine + - python3 submit_isolate_finetune.py --loo --models no_marine --percents 0.01 0.1 0.5 +3. OOD experiments (for final presentation) + - python3 submit_isolate_finetune.py --models segment_v3 detect --ckpt_project 2025_08_29_finetune_benchmarks + - python3 submit_isolate_finetune.py --models segment_v3 detect --ckpt_project 2025_08_29_finetune_benchmarks --tasks crop_type_classification --percents 0.01 0.1 0.5 1.0 """ import os import tempfile import subprocess import yaml -import sys - -rslp_prefix = "/weka/dfive-default/rslearn-eai" -rslp_project = "2025_08_07_helios_moe_finetune" -experiment_id = "{model}__{task}__isolate" -debug = (rslp_project == "helios-debug") +import argparse + +parser = argparse.ArgumentParser() +parser.add_argument("--models", nargs="*", help="Models to finetune") +parser.add_argument("--ckpt_project", default="2025_09_04_loo", help="Project directory with checkpoints") +parser.add_argument("--project", default="2025_09_08_loo_evals", help="Output project directory") +parser.add_argument("--exp_id", default="{model}__{task}__{percent}__v3", help="Experiment ID template") +parser.add_argument("--loo", action="store_true", help="Run LOO experiments") +parser.add_argument("--debug", action="store_true", help="Run in debug mode") +parser.add_argument("--percents", type=float, nargs="*", default=[1.0], help="Percentages of dataset to sweep over") +parser.add_argument("--ckpt", default="last.ckpt", help="Checkpoint name to finetune from") +parser.add_argument("--tasks", nargs="*", help="Override the predefined tasks and finetune on these for all models") +parser.add_argument( + "--template_cfg_path", + default="/weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/template.yaml", + help="Template config path" +) +parser.add_argument( + "--freeze_cfg_path", + default="/weka/dfive-default/ryanp/rslearn_projects/data/helios/v2_shared/helios_freeze_then_lowlr.yaml", + help="Freeze config path" +) +parser.add_argument( + "--helios_ckpt_path", + default="/weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000", + help="Helios checkpoint path" +) +args = parser.parse_args() grouped_tasks = { - "detect": [ - "detect_sentinel1_vessels", - "detect_sentinel2_vessels", - "vessel_detection", - "detect_satlas_marine_infra", - "detect_satlas_wind_turbine", - ], - "classify": [ - "crop_type_classification", - "cropland_classification", - "vessel_classification", - ], - "segment": [ - "segment_satlas_solar_farm", - "segment", - ], + "detect": ["crop_type_classification", "cropland_classification", "segment"], + "classify": ["vessel_detection", "segment", "detect_satlas_marine_infra"], + "segment": ["vessel_classification", "detect_satlas_wind_turbine", "cropland_classification", "crop_type_classification"], +} +# grouped_tasks = { +# "detect": [ +# "detect_sentinel1_vessels", +# "detect_sentinel2_vessels", +# "vessel_detection", +# "detect_satlas_marine_infra", +# "detect_satlas_wind_turbine", +# ], +# "classify": [ +# "crop_type_classification", +# "cropland_classification", +# "vessel_classification", +# ], +# "segment": [ +# "segment_satlas_solar_farm", +# "segment", +# ], +# } + +task2ckpt = { + "vessel_detection": "v2_landsat_vessels", + "detect_sentinel1_vessels": "v2_sentinel1_vessels_128", + "detect_sentinel2_vessels": "v2_sentinel2_vessels_128", + "detect_satlas_wind_turbine": "v2_satlas_wind_turbine_128", + "detect_satlas_marine_infra": "v2_satlas_marine_infra_128", + "crop_type_classification": "v2_nandi_crop_type", + "cropland_classification": "v2_worldcereal_cropland", + "vessel_classification": "v2_landsat_vessels", + "segment_satlas_solar_farm": "v2_satlas_solar_farm_128", + "segment": "v2_pastis", +} +dir2cfg = { + "vessel_detection": ["finetune_detector_cosinelr.yaml"], + "vessel_classification": ["finetune_classifier_cosinelr.yaml"], } -freeze_cfg_path = ( - "/weka/dfive-default/ryanp/rslearn_projects/one_off_projects" \ - "/2025_07_joint_finetune/configs/2025_08_07_freeze/none.yaml" -) +loo_tasks = { + "no_landsat": ["vessel_detection"], + "no_s1": ["detect_sentinel1_vessels"], + "no_s2": ["detect_sentinel2_vessels"], + "no_turbine": ["detect_satlas_wind_turbine"], + "no_marine": ["detect_satlas_marine_infra"], +} + +max_epochs = { + "vessel_detection": 100, + "vessel_classification": 100, + "segment_satlas_solar_farm": 500, + "segment": 500, + "detect_sentinel1_vessels": 200, + "detect_sentinel2_vessels": 100, + "detect_satlas_wind_turbine": 100, + "detect_satlas_marine_infra": 100, + "crop_type_classification": 100, + "cropland_classification": 100, +} -helios_ckpt_path = ( - "/weka/dfive-default/helios/checkpoints" \ - "/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000" +ckpt_scratch_dir = "/weka/dfive-default/ryanp/scratch/__tmp_ckpts" +base_cfg_dir = "/weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs" +base_project_dir = os.path.join( + "/weka/dfive-default/rslearn-eai/projects", + args.ckpt_project ) -for base_model in sys.argv[1:]: - model_name = base_model.split("__")[0] - tasks = grouped_tasks[model_name] - cfg_template_path = ( - "/weka/dfive-default/ryanp/rslearn_projects/one_off_projects" \ - f"/2025_07_joint_finetune/configs/2025_08_06_isolate_sft/{model_name}.yaml" - ) - ckpt_path = ( - f"/weka/dfive-default/rslearn-eai/projects/" \ - f"helios_finetune_cosine_lr/{base_model}" - ) +if args.debug: + args.project = "helios-debug" + +for base_model in args.models: + if args.tasks: + tasks = args.tasks + elif args.loo: + tasks = loo_tasks[base_model] + else: + tasks = grouped_tasks[base_model.split("_")[0]] + ckpt_path = os.path.join(base_project_dir, base_model) + cfg_path = os.path.join(ckpt_path, "checkpoints/config.yaml") cmd = [ "python", "-m", "rslp.main", "helios", "launch_finetune", - "--helios_checkpoint_path", helios_ckpt_path, + "--helios_checkpoint_path", args.helios_ckpt_path, "--patch_size", "8", "--encoder_embedding_size", "768", - "--image_name", "henryh/rslp_multidataset_dev_moe", + "--image_name", "henryh/rslp_multidataset_dev", "--cluster+=ai2/titan-cirrascale", "--cluster+=ai2/saturn-cirrascale", "--cluster+=ai2/ceres-cirrascale", - "--rslp_project", rslp_project, - "--ckpt_path", os.path.join(ckpt_path, "checkpoints/last.ckpt"), + "--rslp_project", args.project, ] wd = "/weka/dfive-default/ryanp/rslearn_projects/" env = os.environ.copy() - env["RSLP_PREFIX"] = rslp_prefix + env["RSLP_PREFIX"] = "/weka/dfive-default/rslearn-eai" - for task in tasks: - with tempfile.NamedTemporaryFile(mode="w") as maker_cfg_file: + for percent in args.percents: + for task in tasks: with tempfile.NamedTemporaryFile(mode="w") as run_cfg_file: - with open(cfg_template_path, "r") as f: - cfg = yaml.safe_load(f) - disabled = [other for other in tasks if other != task] - cfg["global_overrides"]["data"] = { - "init_args": { - "disabled_datasets": disabled - } - } - cfg["output_path"] = run_cfg_file.name - yaml.dump(cfg, maker_cfg_file) - - maker_cfg_file.flush() - print("\nMaking run config from maker config...") - - make_cmd = [ - "python", "make_multidataset_config.py", - "--cfg", maker_cfg_file.name, - ] - print(" ".join(make_cmd)) - subprocess.run(make_cmd, check=True, env=env) - print() - - exp_id = experiment_id.format(model=base_model, task=task) - print(f"Experiment ID: {rslp_project}/{exp_id}") - - cmd_copy = cmd.copy() - cmd_copy.append(f"--config_paths+={run_cfg_file.name}") - cmd_copy.append(f"--config_paths+={freeze_cfg_path}") - cmd_copy.append(f"--experiment_id={exp_id}") - if debug: - cmd_copy.extend(["--local", "true"]) - - print("*" * 30 + " RUN COMMAND " + "*" * 30) - print(" ".join(cmd_copy)) - print("*" * 80) - print() - - subprocess.run(cmd_copy, check=True, env=env, cwd=wd) - print() - - if debug: - break + with tempfile.NamedTemporaryFile(mode="w") as maker_cfg_file: + with open(args.template_cfg_path, "r") as f: + template = yaml.safe_load(f) + + template["output_path"] = run_cfg_file.name + all_cfg_files = sorted(os.listdir(os.path.join(base_cfg_dir, task2ckpt[task]))) + template["dataset_cfgs"] = [[ + os.path.join(base_cfg_dir, task2ckpt[task], cfg) + for cfg in dir2cfg.get(task, all_cfg_files) + if cfg.endswith(".yaml") + ]] + restore_cfg = template["global_overrides"]["model"]["init_args"]["restore_config"]["init_args"] + restore_cfg["restore_path"] = os.path.join(ckpt_path, "checkpoints", args.ckpt) + + trainer = template["global_overrides"].get("trainer", {}) + trainer['limit_train_batches'] = percent + trainer['max_epochs'] = max_epochs[task] + if 'max_epochs' in trainer: + original_epochs = trainer['max_epochs'] + adjusted_epochs = int(original_epochs / percent) + trainer['max_epochs'] = adjusted_epochs + print(f"adjusted epochs: {original_epochs} -> {adjusted_epochs} (factor: {1/percent:.2f})") + + yaml.dump(template, maker_cfg_file) + + maker_cfg_file.flush() + print("\nMaking run config from maker config...") + + make_cmd = [ + "python", "make_multidataset_config.py", + "--cfg", maker_cfg_file.name, + ] + print(" ".join(make_cmd)) + subprocess.run(make_cmd, check=True, env=env) + print() + + exp_id = args.exp_id.format(model=base_model, task=task, percent=percent) + print(f"Experiment ID: {args.project}/{exp_id}") + + cmd_copy = cmd.copy() + cmd_copy.append(f"--config_paths+={run_cfg_file.name}") + cmd_copy.append(f"--experiment_id={exp_id}") + if args.debug: + cmd_copy.extend(["--local", "true"]) + + print("*" * 30 + " RUN COMMAND " + "*" * 30) + print(" ".join(cmd_copy)) + print("*" * 80) + print() + + subprocess.run(cmd_copy, check=True, env=env, cwd=wd) + print() + + if args.debug: + break diff --git a/one_off_projects/2025_07_joint_finetune/scripts/submit_joint_finetune.py b/one_off_projects/2025_07_joint_finetune/scripts/submit_joint_finetune.py index 4a55afe2..edff322f 100644 --- a/one_off_projects/2025_07_joint_finetune/scripts/submit_joint_finetune.py +++ b/one_off_projects/2025_07_joint_finetune/scripts/submit_joint_finetune.py @@ -6,10 +6,9 @@ image_name = "henryh/rslp_multidataset_dev"#_0.05w" -project_name = "2025_07_30_joint_finetune_sweep"#"2025_07_29_helios_joint_finetune_debug" -# project_name = "2025_07_29_helios_joint_finetune_debug" +project_name = "2025_09_04_loo_evals" #"2025_08_29_finetune_scaling_laws" template = { - "base_cfg": "/weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_07_29_debug/base.yaml", + "base_cfg": "/weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_09_02_scaling/base.yaml", "substitutions": { "patch_size": 8, "encoder_embedding_size": 768, @@ -24,10 +23,26 @@ "pastis": [ "/weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_pastis/basecfg_cosinelr.yaml", "/weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_pastis/basecfg_helios_mm.yaml", + ], + "sentinel1": [ + "/weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_cosinelr.yaml", + "/weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel1_vessels_128/basecfg_helios.yaml" + ], + "sentinel2": [ + "/weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel2_vessels_128/basecfg_cosinelr.yaml", + "/weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_sentinel2_vessels_128/basecfg_helios.yaml" ] } combos = [ # adding new tokens - what happens? + ["cropland", "croptype"], + ["cropland", "croptype", "pastis"], + ["cropland", "croptype", "pastis", "vessel_detect"], + ["cropland", "croptype", "pastis", "vessel_detect", "sentinel1"], + ["sentinel1", "vessel_detect"], + ["sentinel1", "vessel_detect", "sentinel2"], + ["sentinel1", "vessel_detect", "sentinel2", "pastis"], + ["sentinel1", "vessel_detect", "sentinel2", "pastis", "cropland"], # ["vessel_detect", "cropland"], # ["vessel_detect", "cropland", "croptype"], # ["vessel_detect", "cropland", "croptype", "vessel_classify"], @@ -39,19 +54,71 @@ # ["vessel_detect", "pastis", "vessel_classify", "croptype"], ] +def extra_cfg(length): + return {"global_overrides": { + "model": { + "class_path": "rslearn.train.lightning_module.RslearnLightningModule", + "init_args": { + "model": { + "init_args": { + "trunk": { + "class_path": "rslearn.models.trunk.DecoderTrunk", + "init_args": { + "task_embedding": { + "class_path": "rslearn.models.task_embedding.TaskChannelEmbedding", + "init_args": { + "encoder_embedding_size": 768, + "add_spatial_embed": True, + }, + }, + "layers": [ + { + "class_path": "rslp.helios.moe.MoETransformer", + "init_args": { + "dim": 768, + "n_layers": 1, + "n_heads": 12, + "num_experts": 4, + "num_slots": 4, + }, + } + ], + }, + } + } + } + }, + }, + "trainer": { + "accumulate_grad_batches": length, + }, + }, + "merge_options": { + "merge_heads": True, + "merge_task_labels": True, + "same_label_groups": [ + ["detect_sentinel1_vessels", "detect_sentinel2_vessels", "vessel_detection"] + ], + }, + } + + +""" all_tasks = ["vessel_detect", "cropland", "croptype", "vessel_classify", "pastis"] all_combos = list(itertools.combinations(all_tasks, 2)) for combo in list(all_combos): if list(combo) in combos: all_combos.remove(combo) combos += all_combos +""" for combo in combos: with tempfile.NamedTemporaryFile(mode="w") as maker: with tempfile.NamedTemporaryFile(mode="w") as cfg: template["dataset_cfgs"] = [dataset_cfgs[cfg] for cfg in combo] template["output_path"] = cfg.name - exp_id = "_".join(combo) + "_norefill" # + "_0.05w_norefill" + template.update(extra_cfg(len(combo))) + exp_id = "_".join(combo) yaml.dump(template, maker) maker.flush() diff --git a/one_off_projects/2025_07_joint_finetune/scripts/unmerge_singletask_model.py b/one_off_projects/2025_07_joint_finetune/scripts/unmerge_singletask_model.py index eba5a56d..0d5fe76e 100644 --- a/one_off_projects/2025_07_joint_finetune/scripts/unmerge_singletask_model.py +++ b/one_off_projects/2025_07_joint_finetune/scripts/unmerge_singletask_model.py @@ -216,13 +216,17 @@ def main() -> None: ) parser.add_argument( "--project_dir", - default="/weka/dfive-default/rslearn-eai/projects/helios_finetune_cosine_lr", + default="2025_09_04_loo", help="rslp project name" ) args = parser.parse_args() + base_project_dir = "/weka/dfive-default/rslearn-eai/projects/" + key = "task_label_offsets" - cfg_path = os.path.join(args.project_dir, args.model, "checkpoints","config.yaml") + cfg_path = os.path.join( + base_project_dir, args.project_dir, args.model, "checkpoints","config.yaml" + ) with open(cfg_path, "r") as f: cfg = yaml.safe_load(f) task_offsets = recursive_find_key(cfg, key) @@ -247,7 +251,9 @@ def main() -> None: task_offsets[tasks[max_offset_index]]["offset"] + task_offsets[tasks[max_offset_index]]["num_outputs"] ) - src_path = os.path.join(args.project_dir, args.model, "checkpoints", args.ckpt_path) + src_path = os.path.join( + base_project_dir, args.project_dir, args.model, "checkpoints", args.ckpt_path + ) pretrained_cfg_src_path = ( "/weka/dfive-default/helios/checkpoints/favyen" @@ -276,6 +282,7 @@ def main() -> None: # 3) save per-task checkpoint and config.yaml out_dir = os.path.join( + base_project_dir, args.project_dir, args.out_dir.format(model=args.model, task=task) ) diff --git a/rslp/helios/checkpoint.py b/rslp/helios/checkpoint.py index 19c520b6..0b928be1 100644 --- a/rslp/helios/checkpoint.py +++ b/rslp/helios/checkpoint.py @@ -94,7 +94,7 @@ def load_model_and_optim_state( if key_mapping is not None: swap_param_keys(state_dict, key_mapping, metadata=metadata) - dist_cp.load( + dist_cp.load( # nosec state_dict, checkpoint_id=dir, storage_reader=reader, diff --git a/rslp/helios/model.py b/rslp/helios/model.py index cfa6386a..c56dec82 100644 --- a/rslp/helios/model.py +++ b/rslp/helios/model.py @@ -382,7 +382,7 @@ def load_pretrained_embeds(self, drop: tuple[str] = ("code_hash",)) -> None: Args: drop: list of keys to drop from the dict. """ - obj = torch.load(self.task_embed_path, map_location="cpu") + obj = torch.load(self.task_embed_path, map_location="cpu") # nosec obj = {k: v for k, v in obj.items() if k not in drop} self.tasks = list(obj.keys()) From f4169af35fa697594daf6ee30952255b820ede33 Mon Sep 17 00:00:00 2001 From: ryanp Date: Wed, 10 Sep 2025 16:49:16 +0000 Subject: [PATCH 12/16] Fix wandb key, linter --- rslp/helios/model.py | 4 +++- rslp/utils/beaker.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/rslp/helios/model.py b/rslp/helios/model.py index 621737f3..e9ac1ca9 100644 --- a/rslp/helios/model.py +++ b/rslp/helios/model.py @@ -131,7 +131,9 @@ def load_model( if not random_initialization: train_module_dir = checkpoint_path / "model_and_optim" if os.path.exists(train_module_dir): - load_model_and_optim_state(str(train_module_dir), model, planner=planner) + load_model_and_optim_state( + str(train_module_dir), model, planner=planner + ) logger.info(f"loaded helios encoder from {train_module_dir}") else: logger.info(f"could not find helios encoder at {train_module_dir}") diff --git a/rslp/utils/beaker.py b/rslp/utils/beaker.py index f6878c75..fe5ce52b 100644 --- a/rslp/utils/beaker.py +++ b/rslp/utils/beaker.py @@ -38,7 +38,7 @@ def get_base_env_vars(use_weka_prefix: bool = False) -> list[BeakerEnvVar]: env_vars = [ BeakerEnvVar( name="WANDB_API_KEY", # nosec - secret="ryanp_WANDB_API_KEY", # nosec + secret="RSLEARN_WANDB_API_KEY", # nosec ), BeakerEnvVar( name="GOOGLE_APPLICATION_CREDENTIALS", # nosec From 7d41f6ff64c82a71f21de3380546ea5a9c895084 Mon Sep 17 00:00:00 2001 From: ryanp Date: Wed, 10 Sep 2025 16:50:42 +0000 Subject: [PATCH 13/16] Use UPath instead of os --- rslp/helios/model.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rslp/helios/model.py b/rslp/helios/model.py index e9ac1ca9..a0046fb6 100644 --- a/rslp/helios/model.py +++ b/rslp/helios/model.py @@ -1,7 +1,6 @@ """Helios model wrapper for fine-tuning in rslearn.""" import json -import os import re from contextlib import nullcontext from typing import Any @@ -130,7 +129,7 @@ def load_model( # Load the checkpoint. if not random_initialization: train_module_dir = checkpoint_path / "model_and_optim" - if os.path.exists(train_module_dir): + if train_module_dir.exists(): load_model_and_optim_state( str(train_module_dir), model, planner=planner ) From 9706bfe7f09ed958cb41823ccd2a391630423aa8 Mon Sep 17 00:00:00 2001 From: ryanp Date: Wed, 10 Sep 2025 17:13:17 +0000 Subject: [PATCH 14/16] Skip helios test --- tests/integration/helios/test_task_embeds.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/integration/helios/test_task_embeds.py b/tests/integration/helios/test_task_embeds.py index 6f5a998f..6921ec42 100644 --- a/tests/integration/helios/test_task_embeds.py +++ b/tests/integration/helios/test_task_embeds.py @@ -1,4 +1,8 @@ -"""Testing task-conditioned Helios model.""" +"""Testing task-conditioned Helios model. + +These tests are skipped in the CI to avoid pulling helios in as a dependency, +but should pass locally. +""" from pathlib import Path from typing import Any @@ -6,7 +10,8 @@ import pytest import torch -from rslp.helios.model import Helios, TaskConditionedHelios +pytest.importorskip("helios") +from rslp.helios.model import Helios, TaskConditionedHelios # noqa: E402 @pytest.fixture From 2adb80e624df8ef906838046bd8f8fe2f6ce504e Mon Sep 17 00:00:00 2001 From: ryanp Date: Wed, 10 Sep 2025 21:43:48 +0000 Subject: [PATCH 15/16] Add docs --- .../2025_07_joint_finetune/README.md | 128 ++++++++++++++++++ .../configs/v3_multitask/README.md | 4 +- 2 files changed, 131 insertions(+), 1 deletion(-) create mode 100644 one_off_projects/2025_07_joint_finetune/README.md diff --git a/one_off_projects/2025_07_joint_finetune/README.md b/one_off_projects/2025_07_joint_finetune/README.md new file mode 100644 index 00000000..9329e7c5 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/README.md @@ -0,0 +1,128 @@ +# Multitask learning with Helios + +This project contains the configs and scripts necessary to run multitask training on top of pretrained Helios models. + +The general approach to multitask learning is to create "maker configs" (which specify finetuning options like +datasets, architecture, hyperparameters, etc.) that get processed into "run configs" (which are standard `rslearn` configs) +which define finetuning jobs. From there, finetuning runs as normal via `rslearn` infrastructure, and the resulting models +can be loaded/tested with the scripts here. + +## Creating multidataset configurations + +Single-dataset finetuning configs are found in `configs/v2_*`. They are used as the building blocks for multitask maker +configurations. To use them to create multitask run configs, you must provide a maker config (the basic structure of which is outlined below): + + Key | Description | +|-----|-------------| +| `base_path` | Path to the base config. | +| `output_path` | Path to the output. | +| `dataset_cfgs` | List of paths to the dataset configs. These are found in `configs/v2_*`. If you want to specify multiple configs within a single dataset, use a nested list. | +| `global_overrides` | Override global settings, like batch sizes across all datasets, or the number of workers, or actual trainer settings. Takes precedence over options from `base_path`. | +| `local_overrides` | Local overrides for the dataset configs, like batch size for a single dataset. These will be collated and applied to the final config, but are lower in preference than global_overrides. For example,if you specify a local override batch size, it will be overriden if there is a global batch size override. | +| `substitutions` | String substitutions for the base config, usually tied to a specific `helios` model, e.g. patch size, encoder embedding size, etc. Specify these here instead of when calling the finetuning script.| +| `merge_options` | Options for label merging. See below.| + +Note that the base config is a way to share architecture/training parameters across different multitask runs (i.e., the `trainer`, `model`, etc. keys). Anything that goes in the base config can also just be moved to the `global_overrides` key. + +Note that you must set `model.init_args.model.init_args.lazy_decode=true`, and use `rslearn.models.multitask.MultiTaskMergedModel` or `rslearn.models.multitask.MultiTaskModel` and `rslearn.train.data_module.MultiDatasetDataModule` instead of `MultiTask` and `RslearnDataModule`. + +Once you've constructed a maker config, you can generate a `rslearn`-readable run config via `scripts/make_multidataset_config.py`. + +Note that the `dataset_cfgs` list specifies which single-dataset configs to bring into the multitask run config. **Since `dataset_cfgs` expects a list, the names of the resulting classes/decoders correspond exactly to the names of the final decoders from the single-dataset configs.** This means two things: 1) only one subtask per single-dataset config is supported, 2) whenever "dataset names" are mentioned here, these refer to these decoder names derived from the single-dataset configs. + +For example, suppose we specify `dataset_cfgs: [taskA.yaml]`. If `taskA.yaml` specifies a decoder structure with layers `[trunk, taskADecoder]`, then you should refer to the corresponding dataset as `taskADecoder` everywhere else in the maker config (e.g. if you want to merge task labels or something). + +It's probably easiest to start from an example maker config and then edit hte config from there: see `configs/2025_09_02_final/detect.yaml` for one. + +### Label merging + +The `merge_options` key allows you to merge labels, i.e. if we have two classification tasks with `N` and `M` classes each, use a single output softmax layer with `N + M` classes. To enable this option, use the following options: + +```yaml +merge_options: + merge_heads: true + merge_task_labels: true + same_label_groups: +``` + +* `merge_heads` will merge head weights (i.e., FasterRCNN ROI, segmentation UNet, etc. +* `merge_task_labels` will merge softmax labels, boudning box prediction labels, etc. +* `same_label_groups` allows you to specify a list of dataset names that have the same label classes, so they don't get stacked and duplicated unnecessarily. + +If you set `merge_task_labels` to `true`, use `rslearn.models.multitask.MultiTaskMergedModel` as the model class. I have not tested `merge_task_labels: false` in a while, so it may not work. Generally, it seems `merge_task_labels: true` works well, I would recommend using this as default. + +### Task conditioning + +One feature of multitask learning in `rslearn` and `helios` is the ability to condition on task embeddings, generated by feeding natural language descriptions of tasks through a text embedding model. You can find the script to do this at `scripts/make_task_embeds.py`. The recommended usage is currently as follows: + +> `python make_task_embeds.py --anchor --instruct --truncate 256 --from_yaml /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/tasks.yaml` + +Once these are generated, you must use `rslp.helios.model.TaskConditionedHelios` as the encoder in the model config. This class permits a `model_overrides` and `task_embed_opts` argument, which should be used as following: + +```yaml +model_overrides: + encoder_config: + task_lora_kwargs: + use_task_lora: true + task_lora_indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] + gen_hidden: 64 +task_embed_opts: + type: "precomputed" + path: /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/task_embeds___Qwen3-Embedding-8B__256d__anchor__instruct__from_yaml.pt +``` + +### Decoder trunk + +This is not explicitly tied to multitask learning but is often useful. Decoder trunks allow for shared, randomly-initialized layers like MoE transformer layers that are conditioned on learned task embeddings (not fixed as previously). Below is an example of how to use it: + +```yaml +model: + class_path: rslearn.train.lightning_module.RslearnLightningModule + init_args: + model: + init_args: + trunk: + class_path: rslearn.models.trunk.DecoderTrunk + init_args: + task_embedding: + class_path: rslearn.models.task_embedding.TaskChannelEmbedding + init_args: + encoder_embedding_size: 768 + add_spatial_embed: true + layers: + - class_path: rslp.helios.moe.MoETransformer + init_args: + dim: 768 + n_layers: 1 + n_heads: 12 + num_experts: 4 + num_slots: 4 +``` + +## Running jobs + +Once you create a `rslearn` run config, run it normally with `launch_finetune` or something similar. + +## Evaluating and using multitask models + +Since multitask models are trained on multiple datasets, they must be modified to be used out of the box. + +### Trimming label-merged multitask models + +One simple way to do this is to chop off any weights associated with irrelevant tasks (e.g. if a multitask model is trained on tasks `A, B, C` and you want to trim it for task `C` only, then you can chop off the output weights that create predictions for `A` and `B` classes). To do this, use `scripts/unmerge_singletask_model.py`. + +Once you do this, you can use the script `scripts/do_eval_unmerged.py` to run evals on the trimmed model. However, this script is not very configurable and may be out of date. Also, especially for detection tasks where objects will be registered depending on an absolute probability threshold, a trimmed model will make predictions that aren't equivalent to the untrimmed model's predictions. It's recommended to do evals on the merged model without merging, as described in the next section. + +### Working with unmerged multitask models + +Evaluate these models with `scripts/do_eval_merged.py`, and compare them to single-dataset runs with `scripts/do_eval_sft.py`. If you want to run finetuning on a new dataset, use `scripts/submit_isolate_finetune.py`. + +Note that if you finetune a multitask model with fixed NLP task embeddings on a new dataset, there will be an error unless the new dataset has a fixed task embedding already registered in the task embedding file. If you are using learnable task embeddings (via `TaskChannelEmbedding` in the decoder trunk), the first embedding in the lookup table from multitask learning is used to initailize the new task embedding. You can control this via the `default_idx` in the `askChannelEmbedding` initializtaion. + +### Pretraining evals + +Use `scripts/ckpt_to_distributed.py` to convert a `rslearn` finetuned checkpoint to a distributed `helios` style checkpoint. This can be used for non-multitask models as well. Then, use the eval harness in `helios` (or write a new one), the generated checkpoint folder should work plug-in-play. + +### Measuring throughput + +Use `scripts/measure_throughput.py`. I will admit that this script was written mostly by ChatGPT so it might have some issues, it looks okay on a quick glance through. \ No newline at end of file diff --git a/one_off_projects/2025_07_joint_finetune/configs/v3_multitask/README.md b/one_off_projects/2025_07_joint_finetune/configs/v3_multitask/README.md index a855dfb7..506dec05 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/v3_multitask/README.md +++ b/one_off_projects/2025_07_joint_finetune/configs/v3_multitask/README.md @@ -1,6 +1,8 @@ ## Finetuning on concatenated datasets -**Only one task per dataset is supported at the moment.** +**NOTE: these docs are outdated, please see `2025_07_joint_finetune/README.md` instead**. + +Only one task per dataset is supported at the moment. There are two stages to running a multi-dataset job: constructing a run configuration, and actually running the job. From 1d2065bb0f60c5c931f335b09790464facf567c5 Mon Sep 17 00:00:00 2001 From: ryanp Date: Wed, 10 Sep 2025 21:53:38 +0000 Subject: [PATCH 16/16] Update readme --- one_off_projects/2025_07_joint_finetune/README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/one_off_projects/2025_07_joint_finetune/README.md b/one_off_projects/2025_07_joint_finetune/README.md index 9329e7c5..fae4fc1a 100644 --- a/one_off_projects/2025_07_joint_finetune/README.md +++ b/one_off_projects/2025_07_joint_finetune/README.md @@ -7,6 +7,8 @@ datasets, architecture, hyperparameters, etc.) that get processed into "run conf which define finetuning jobs. From there, finetuning runs as normal via `rslearn` infrastructure, and the resulting models can be loaded/tested with the scripts here. +**Note**: many scripts are hardcoded to use the `ryanp` home directory, they need to be modified if other people use this. + ## Creating multidataset configurations Single-dataset finetuning configs are found in `configs/v2_*`. They are used as the building blocks for multitask maker @@ -57,6 +59,9 @@ One feature of multitask learning in `rslearn` and `helios` is the ability to co > `python make_task_embeds.py --anchor --instruct --truncate 256 --from_yaml /weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/data/tasks.yaml` +If the above yaml file got deleted, use `/weka/dfive-default/rslearn-eai/data/task_descriptions.yaml` (it's a copy). In general, if the `ryanp` home directory is gone, there will be scripts that fail. They can be easily +fixed. + Once these are generated, you must use `rslp.helios.model.TaskConditionedHelios` as the encoder in the model config. This class permits a `model_overrides` and `task_embed_opts` argument, which should be used as following: ```yaml