diff --git a/.gitignore b/.gitignore index cebd8ef6..206762dd 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,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/README.md b/one_off_projects/2025_07_joint_finetune/README.md new file mode 100644 index 00000000..fae4fc1a --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/README.md @@ -0,0 +1,133 @@ +# 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. + +**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 +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` + +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 +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/2025_07_31_moe/OUT_classify.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_07_31_moe/OUT_classify.yaml index 8a1165e1..24833e0f 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_07_31_moe/OUT_classify.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_07_31_moe/OUT_classify.yaml @@ -1029,7 +1029,7 @@ model: class_path: rslearn.models.trunk.DecoderTrunk init_args: layers: - - class_path: rslearn.models.trunk.MoETransformer + - class_path: rslp.helios.moe.MoETransformer init_args: dim: 768 expert_mult: 2 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..1b39631a 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 @@ -1529,14 +1529,13 @@ model: class_path: rslearn.models.trunk.DecoderTrunk init_args: layers: - - class_path: rslearn.models.trunk.MoETransformer + - class_path: rslp.helios.moe.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: @@ -1765,5 +1764,4 @@ trainer: - 0 unfreeze_at_epoch: 20 unfreeze_lr_factor: 10 - limit_val_batches: 1024 max_epochs: 200 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_07_31_moe/OUT_segment.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_07_31_moe/OUT_segment.yaml index 38970b7e..57e3dc43 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_07_31_moe/OUT_segment.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_07_31_moe/OUT_segment.yaml @@ -1217,7 +1217,7 @@ model: class_path: rslearn.models.trunk.DecoderTrunk init_args: layers: - - class_path: rslearn.models.trunk.MoETransformer + - class_path: rslp.helios.moe.MoETransformer init_args: dim: 768 expert_mult: 2 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_07_31_moe/classify.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_07_31_moe/classify.yaml index def6ef6e..62ddd970 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_07_31_moe/classify.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_07_31_moe/classify.yaml @@ -25,7 +25,7 @@ global_overrides: encoder_embedding_size: 768 add_spatial_embed: true layers: - - class_path: rslearn.models.trunk.MoETransformer + - class_path: rslp.helios.moe.MoETransformer init_args: dim: 768 n_layers: 2 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..5f1db399 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 @@ -31,16 +31,14 @@ global_overrides: encoder_embedding_size: 768 add_spatial_embed: true layers: - - class_path: rslearn.models.trunk.MoETransformer + - class_path: rslp.helios.moe.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_07_31_moe/segment.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_07_31_moe/segment.yaml index 4cd234d6..93ed7fd8 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_07_31_moe/segment.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_07_31_moe/segment.yaml @@ -24,7 +24,7 @@ global_overrides: encoder_embedding_size: 768 add_spatial_embed: true layers: - - class_path: rslearn.models.trunk.MoETransformer + - class_path: rslp.helios.moe.MoETransformer init_args: dim: 768 n_layers: 2 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_06_isolate_sft/classify.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_06_isolate_sft/classify.yaml index 33a3d81d..4e1b25aa 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_08_06_isolate_sft/classify.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_06_isolate_sft/classify.yaml @@ -24,7 +24,7 @@ global_overrides: encoder_embedding_size: 768 add_spatial_embed: true layers: - - class_path: rslearn.models.trunk.MoETransformer + - class_path: rslp.helios.moe.MoETransformer init_args: dim: 768 n_layers: 1 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_06_isolate_sft/detect.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_06_isolate_sft/detect.yaml index aa8c20d2..5f2fab61 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_08_06_isolate_sft/detect.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_06_isolate_sft/detect.yaml @@ -30,7 +30,7 @@ global_overrides: encoder_embedding_size: 768 add_spatial_embed: true layers: - - class_path: rslearn.models.trunk.MoETransformer + - class_path: rslp.helios.moe.MoETransformer init_args: dim: 768 n_layers: 1 diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_06_isolate_sft/segment.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_06_isolate_sft/segment.yaml index 2914aea5..0e87469f 100644 --- a/one_off_projects/2025_07_joint_finetune/configs/2025_08_06_isolate_sft/segment.yaml +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_06_isolate_sft/segment.yaml @@ -25,7 +25,7 @@ global_overrides: encoder_embedding_size: 768 add_spatial_embed: true layers: - - class_path: rslearn.models.trunk.MoETransformer + - class_path: rslp.helios.moe.MoETransformer init_args: dim: 768 n_layers: 1 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..d164af26 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/OUT_all.yaml @@ -0,0 +1,3303 @@ +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.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_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: 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_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: + - 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_12_task_lora/OUT_classify.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/OUT_classify.yaml new file mode 100644 index 00000000..6c3817c5 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/OUT_classify.yaml @@ -0,0 +1,1140 @@ +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/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: + 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: + - 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_12_task_lora/OUT_detect.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/OUT_detect.yaml new file mode 100644 index 00000000..7b7c0128 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/OUT_detect.yaml @@ -0,0 +1,1787 @@ +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/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: + 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: + - 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_12_task_lora/OUT_segment.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/OUT_segment.yaml new file mode 100644 index 00000000..e7793574 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/OUT_segment.yaml @@ -0,0 +1,1324 @@ +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: + - 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_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_task_lora/base.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/base.yaml new file mode 100644 index 00000000..13901aca --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/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_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: + - 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 + +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_12_task_lora/classify.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/classify.yaml new file mode 100644 index 00000000..2ac43c09 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_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_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 + - /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_12_task_lora/detect.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/detect.yaml new file mode 100644 index 00000000..ffe67a94 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_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_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 + - - /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_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..7a4378bb --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/exp_id.txt @@ -0,0 +1 @@ +{task}_lora_large_cyclic_fixed \ No newline at end of file diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/segment.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_lora/segment.yaml new file mode 100644 index 00000000..92288ede --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_12_task_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_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..3389d952 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/OUT_all.yaml @@ -0,0 +1,4051 @@ +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: + - 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 + 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 new file mode 100644 index 00000000..b09e1388 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/OUT_classify.yaml @@ -0,0 +1,1132 @@ +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/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 + 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: + - 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 + max_epochs: 500 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 new file mode 100644 index 00000000..27ae9126 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/OUT_detect.yaml @@ -0,0 +1,1779 @@ +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/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: + 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: + - 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 + max_epochs: 500 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 new file mode 100644 index 00000000..406dcf69 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/OUT_segment.yaml @@ -0,0 +1,1316 @@ +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.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: + - 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 + max_epochs: 500 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 new file mode 100644 index 00000000..a0c16497 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/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_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.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: + - 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"] + +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_task_moe/classify.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/classify.yaml new file mode 100644 index 00000000..30cfb36a --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_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_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 + - /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_task_moe/detect.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/detect.yaml new file mode 100644 index 00000000..0983bb22 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_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_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 + - - /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_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..e4aa02e3 --- /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_slot_cyclic_fixed \ No newline at end of file diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/segment.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_moe/segment.yaml new file mode 100644 index 00000000..3999f768 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_15_task_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_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..e1a3b9b3 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/OUT_all.yaml @@ -0,0 +1,4067 @@ +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_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: + - 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 + 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 new file mode 100644 index 00000000..6f9d35a4 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/OUT_classify.yaml @@ -0,0 +1,1148 @@ +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/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__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: + - 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 + 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 new file mode 100644 index 00000000..95792d3a --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/OUT_detect.yaml @@ -0,0 +1,1795 @@ +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/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__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: + - 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 + 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 new file mode 100644 index 00000000..82e89b48 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/OUT_segment.yaml @@ -0,0 +1,1332 @@ +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__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: + - 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 + 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 new file mode 100644 index 00000000..e6402fbe --- /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: 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_18_task_all/base.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/base.yaml new file mode 100644 index 00000000..e4a6e05c --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/base.yaml @@ -0,0 +1,78 @@ +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: + - 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"] + +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_all/classify.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/classify.yaml new file mode 100644 index 00000000..d1730fbd --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/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_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 + - /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_all/detect.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/detect.yaml new file mode 100644 index 00000000..9343fea8 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/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_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 + - - /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_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..0da1ab72 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/exp_id.txt @@ -0,0 +1 @@ +{task}_alltricks_cyclic_fixed \ No newline at end of file diff --git a/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/segment.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/segment.yaml new file mode 100644 index 00000000..64c6fa1d --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_18_task_all/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/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..499e5fbf --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_lora/OUT_all.yaml @@ -0,0 +1,4054 @@ +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: + - 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 + 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..111e12e2 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_lora/OUT_classify.yaml @@ -0,0 +1,1135 @@ +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: + - 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 + 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..d198b722 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_lora/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.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: + - 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 + 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..9330fbd3 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_lora/base.yaml @@ -0,0 +1,69 @@ +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: + - 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"] + +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..15dc01a4 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_moe/OUT_all.yaml @@ -0,0 +1,4051 @@ +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: + - 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 + 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..2ad4a355 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_moe/OUT_classify.yaml @@ -0,0 +1,1132 @@ +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: + - 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 + 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..3da739b9 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_moe/OUT_detect.yaml @@ -0,0 +1,1779 @@ +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: + - 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 + 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..f85a568f --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_moe/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_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: + - 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"] + +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..6e3bf207 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/OUT_all.yaml @@ -0,0 +1,4074 @@ +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.gradients.MiniPCGrad + init_args: + only_monitor: false + selectors: + - moe + - lora + - head + - 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 + 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..09750a5a --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/OUT_classify.yaml @@ -0,0 +1,1155 @@ +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.gradients.MiniPCGrad + init_args: + only_monitor: false + selectors: + - moe + - lora + - head + - 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 + 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..609a1a27 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/OUT_detect.yaml @@ -0,0 +1,1802 @@ +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.gradients.MiniPCGrad + init_args: + only_monitor: false + selectors: + - moe + - lora + - head + - 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 + 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..38a341ae --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_08_21_new_task/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: 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.gradients.MiniPCGrad + init_args: + selectors: ["moe", "lora", "head"] + only_monitor: false + - 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"] + +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..c3ad9b62 --- /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_pcgrad \ 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/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_09_02_final/OUT_detect.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_02_final/OUT_detect.yaml new file mode 100644 index 00000000..ca4948bf --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_02_final/OUT_detect.yaml @@ -0,0 +1,1795 @@ +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.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 + 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 + 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: + 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_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_09_04_loo/OUT_no_landsat.yaml b/one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/OUT_no_landsat.yaml new file mode 100644 index 00000000..683be497 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/configs/2025_09_04_loo/OUT_no_landsat.yaml @@ -0,0 +1,1631 @@ +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 + 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 + 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 + - 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: '{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 + 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 + 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 +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_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_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. 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/ckpt_to_distributed.py b/one_off_projects/2025_07_joint_finetune/scripts/ckpt_to_distributed.py new file mode 100644 index 00000000..ffd3032e --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/scripts/ckpt_to_distributed.py @@ -0,0 +1,133 @@ +"""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 + os.makedirs(os.path.join(args.save_dir, args.run), exist_ok=True) + 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.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) + + # 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/do_eval_merged.py b/one_off_projects/2025_07_joint_finetune/scripts/do_eval_merged.py index c6bd46d4..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) @@ -51,11 +54,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") @@ -84,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 @@ -102,8 +114,15 @@ 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 and use the map-style all patches dataset + if full: + for data_module in cfg["data"]["init_args"]["data_modules"].values(): + data_module["init_args"]["use_in_memory_all_patches_dataset"] = True + data_module["init_args"]["val_config"]["init_args"]["load_all_patches"] = True + data_module["init_args"]["test_config"]["init_args"]["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: @@ -137,7 +156,7 @@ def replace_key(d, key, value): "task_embedding": trunk_args.pop("task_embedding"), "layers": [ { - "class_path": "rslearn.models.trunk.MoETransformer", + "class_path": "rslp.helios.moe.MoETransformer", "init_args": trunk_args } ] 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..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 @@ -1,15 +1,17 @@ import os import json import argparse +import tempfile +import yaml 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"] = [ @@ -24,13 +26,27 @@ 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] -cmd = [ +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: + 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_template = [ + "RSLP_PREFIX=/weka/dfive-default/rslearn-eai", "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", @@ -44,16 +60,89 @@ "--allow_missing_weights", "true" ] -cmd.append(f"--ckpt_path={args.ckpt_path}") -for ckpt_cfg_path in ckpt_cfg_paths: - cmd.append(f"--config_paths+={ckpt_cfg_path}") +substitutions = { + "PATCH_SIZE": 8, + "ENCODER_EMBEDDING_SIZE": 768, + "256/PATCH_SIZE": 256 // 8, + "128/PATCH_SIZE": 128 // 8, +} -print(f"Evaluating {args.task} with checkpoint {args.ckpt_path}") -print() -print("=" * 80) -print(" ".join(cmd)) -print("=" * 80) -print() +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)) + 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(): + 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 + +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]) + + cfg = {} + for ckpt_cfg_path in ckpt_cfg_paths: + 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 + 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"] + + 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() + + task = args.task or "" + print(f"Evaluating {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)) + os.chdir("/weka/dfive-default/ryanp/rslearn_projects/") + os.system(" ".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 2080f495..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", @@ -96,7 +102,7 @@ def load_yaml_config(config_path, substitutions=None): "task_embedding": trunk_layer_init_args.pop("task_embedding"), "layers": [ { - "class_path": "rslearn.models.trunk.MoETransformer", + "class_path": "rslp.helios.moe.MoETransformer", "init_args": trunk_layer_init_args } ] @@ -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/make_all_configs.py b/one_off_projects/2025_07_joint_finetune/scripts/make_all_configs.py new file mode 100644 index 00000000..91d1a7c6 --- /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") 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)) + +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 new file mode 100644 index 00000000..b0828c18 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/scripts/make_task_embeds.py @@ -0,0 +1,542 @@ +"""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. + +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. Since qwen supports MLR, just truncating is fine. + +Current commands +================ +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 +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 = """ +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. +""" + + +# ---------------- 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], skip_extract: bool = False) -> 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. + """ + 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 [] + 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 + + +# ---------------- Color helpers ---------------- + +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)] + "…" + + +# ---------------- 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/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/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("--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.") + 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() + keys: List[str] = [] + 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: + assert len(ds["tasks"]) == 1, f"Got {len(ds['tasks'])} tasks for {ds_name}" + tasks.append(ds_name) + keys.append(list(ds["tasks"].keys())[0]) + summaries.append(summary) + + 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: + 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") + + 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)) + 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) + + # 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] + + # 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" + if args.anchor: + 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}") + if args.from_yaml: + print(f"Datasets YAML: {args.from_yaml}") + 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 + 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 + if args.anchor: + if not args.from_yaml: + anchor_text = build_anchor_summary() + + fmt_anchor_text = anchor_text + if args.instruct: + 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] + + # 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.format(info=info)) + + # Optional: dump texts + 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") + if args.instruct: + f.write(json.dumps({"prompt": args.prompt}) + "\n") + + # Cosine similarity matrix + warnings.filterwarnings("ignore", category=DeprecationWarning) + print(f"=== Cosine similarity matrix ===") + + 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] + + 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) + 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 + 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]) + 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}") + + 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.format(info=info)}") + + +if __name__ == "__main__": + main() 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 fb3d9107..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 @@ -1,15 +1,53 @@ import os +import argparse -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/" +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() + +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" -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 d in os.listdir(ckpt_dir): + if d.endswith("_v1") and args.version == "v1": + old_or_new = "old" + elif d.endswith("_v2") and args.version == "v2": + old_or_new = "new" + elif args.version == "cosine": + old_or_new = "old" -for task, ckpt_path in jobs.items(): - os.system(f"python do_eval_sft.py {ckpt_path} {task}") + ckpt_path = os.path.join(ckpt_dir, d, ckpt) + try: + task = tasks[d.replace("_" + args.version, "")] + except KeyError: + continue + cmd = f"python do_eval_sft.py {ckpt_path} {old_or_new} --task {task}" + if args.full: + cmd += " --full" + if args.save_dir: + 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 fed3df2e..ec2fee75 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", @@ -8,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", ] @@ -22,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"]) @@ -37,7 +39,10 @@ if args.project_name == "helios-debug": args.project_name = "helios_finetune_cosine_lr" -if args.cfg == "detect": +if args.cfg == "vessel": + args.cfg = "/weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/v2_landsat_vessels/finetune_detector_cosinelr.yaml" + cmd.append("--config_paths+=" + args.cfg) +elif args.cfg == "detect": args.cfg = "/weka/dfive-default/ryanp/rslearn_projects/one_off_projects/2025_07_joint_finetune/configs/2025_07_31_moe/OUT_detect.yaml" cmd.append("--config_paths+=" + args.cfg) elif args.cfg == "pastis": @@ -47,9 +52,37 @@ ] 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" + cmd.append("--config_paths+=" + args.cfg) +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/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..37eef731 --- /dev/null +++ b/one_off_projects/2025_07_joint_finetune/scripts/run_all.py @@ -0,0 +1,58 @@ +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="*") +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 {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] + +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 + tasks = args.tasks or os.listdir(os.path.join(args.base_dir, d)) + for task in 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), + ckpt_path=args.ckpt_path, + gpu=args.gpu + ) + print(cmd) + if not args.dry: + os.system(cmd) + print("-" * 100) + print() 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..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,15 +8,15 @@ 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_29_finetune_benchmarks" CKPT_PATH = "/weka/dfive-default/helios/checkpoints/favyen/v0.2_base_latent_mim_128_alldata_random_fixed_modality_0.5/step320000" -IMAGE_NAME = "henryh/rslp_multidataset_dev_0.05w" if "joint_finetune_debug" in PROJECT_NAME else "henryh/rslp_multidataset_dev" +# 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", "--helios_checkpoint_path", CKPT_PATH, @@ -57,17 +57,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/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/submit_singletask_finetune.py b/one_off_projects/2025_07_joint_finetune/scripts/submit_singletask_finetune.py index 2a919dc1..2afa101e 100644 --- a/one_off_projects/2025_07_joint_finetune/scripts/submit_singletask_finetune.py +++ b/one_off_projects/2025_07_joint_finetune/scripts/submit_singletask_finetune.py @@ -143,7 +143,7 @@ def submit_job( "task_embedding": trunk_layer_init_args.pop("task_embedding"), "layers": [ { - "class_path": "rslearn.models.trunk.MoETransformer", + "class_path": "rslp.helios.moe.MoETransformer", "init_args": trunk_layer_init_args } ] 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 new file mode 100644 index 00000000..0b928be1 --- /dev/null +++ b/rslp/helios/checkpoint.py @@ -0,0 +1,122 @@ +"""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. +""" + +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.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: torch.optim.Optimizer | None = None, + *, + process_group: dist.ProcessGroup | None = None, + key_mapping: dict[str, str] | None = None, + pre_download: bool = False, + work_dir: PathOrStr | None = None, + strict: bool = True, + flatten_optimizer_state: bool = False, + 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). + + .. 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( # nosec + 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/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/helios/model.py b/rslp/helios/model.py index 7d545cf4..a0046fb6 100644 --- a/rslp/helios/model.py +++ b/rslp/helios/model.py @@ -1,6 +1,7 @@ """Helios model wrapper for fine-tuning in rslearn.""" import json +import re from contextlib import nullcontext from typing import Any @@ -10,9 +11,10 @@ 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 torch.distributed.checkpoint import DefaultLoadPlanner from upath import UPath +from rslp.helios.checkpoint import load_model_and_optim_state from rslp.log_utils import get_logger logger = get_logger(__name__) @@ -32,6 +34,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.""" @@ -63,7 +83,6 @@ def __init__( autocast_dtype: which dtype to use for autocasting, or set None to disable. """ super().__init__() - _checkpoint_path = UPath(checkpoint_path) self.forward_kwargs = forward_kwargs self.embedding_size = embedding_size self.patch_size = patch_size @@ -73,20 +92,47 @@ def __init__( else: self.autocast_dtype = None + self.load_model(UPath(checkpoint_path), selector, random_initialization) + + def load_model( + self, + checkpoint_path: UPath, + selector: list[str | int] = [], + random_initialization: bool = False, + model_overrides: dict[str, Any] = {}, + planner: DefaultLoadPlanner | None = None, + ) -> 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. + 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 # olmo_core. - with (_checkpoint_path / "config.json").open() as f: + with (checkpoint_path / "config.json").open() 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() # Load the checkpoint. if not random_initialization: - train_module_dir = _checkpoint_path / "model_and_optim" + train_module_dir = checkpoint_path / "model_and_optim" if train_module_dir.exists(): - load_model_and_optim_state(str(train_module_dir), model) + 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}") @@ -191,3 +237,202 @@ 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 via embeddings for each task.""" + + 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, + ) -> 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. + 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 or {}) + + if model_overrides is None: + model_overrides = {} + + if "encoder_config" not in model_overrides: + 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, + random_initialization, + model_overrides, + planner=DefaultLoadPlanner(allow_partial_load=True), + ) + + 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: 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]. + + Args: + drop: list of keys to drop from the dict. + """ + 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()) + 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: + """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. + """ + 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 embedding 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/rslp/helios/moe.py b/rslp/helios/moe.py new file mode 100644 index 00000000..d94d3940 --- /dev/null +++ b/rslp/helios/moe.py @@ -0,0 +1,150 @@ +"""MoE transformer for decoder trunk.""" + +from typing import Any + +import torch +from helios.nn.moe.soft import SoftMoE +from rslearn.models.trunk import DecoderTrunkLayer + + +class MoETransformer(DecoderTrunkLayer): + """Transformer for decoder trunk.""" + + def __init__( + self, + dim: int, + n_layers: int, + n_heads: int, + mlp_dim: int = 512, + dropout: float = 0.1, + task_moe: bool = False, + disable_moe: bool = False, + num_experts: int = 16, + num_slots: int = 256, + expert_mult: int = 4, + load_balance_loss_weight: float = 0.0, + ): + """Standard ViT-style transformer, with soft MoE. + + Since the point of the MoE layers is to deal with task-specific and task-shared + features (and not to route specific tokens), it's probably best to use max_seq_len + as the number of slots, and have at least one expert per task (probably more). + + Args: + dim: dimension of the input and output + n_layers: number of transformer blocks + n_heads: number of attention heads + mlp_dim: dimension of the MLP + dropout: dropout rate + task_moe: if specified, compute dispatch weights given the task embedding + only, and not the token + disable_moe: if True, disable MoE + num_experts: number of experts in soft MoE + num_slots: number of slots in soft MoE + expert_mult: factor by which to multiply mlp_dim in the hidden layer of experts + load_balance_loss_weight: weight of the load balance loss + """ + super().__init__() + self.disable_moe = disable_moe + self.num_experts = num_experts + self.num_slots = num_slots + self.task_moe = task_moe + self.load_balance_loss_weight = load_balance_loss_weight + self.norm = torch.nn.LayerNorm(dim) + self.layers = torch.nn.ModuleList([]) + for _ in range(n_layers): + mha = torch.nn.MultiheadAttention( + dim, n_heads, dropout=dropout, batch_first=True + ) + if not disable_moe: + ffn = SoftMoE( + dim=dim, + num_experts=num_experts, + num_slots=num_slots, + dropout=dropout, + expert_mult=expert_mult, + ) + else: + ffn = torch.nn.Sequential( + torch.nn.LayerNorm(dim), + torch.nn.Linear(dim, mlp_dim), + torch.nn.GELU(), + torch.nn.Linear(mlp_dim, dim), + ) + drop = torch.nn.Dropout(dropout) + self.layers.append(torch.nn.ModuleList([mha, ffn, drop])) + + def forward( + self, x: torch.Tensor, task_embedding: torch.Tensor | None = None + ) -> dict[str, torch.Tensor]: + """Forward pass. + + Args: + x: input tensor of shape (batch_size, seq_len, dim) + task_embedding: task embedding tensor of shape (batch_size, dim) + + Returns: + dict with key "outputs" (output tensor of shape (batch_size, seq_len, dim)) + and optionally "load_balance_loss", "dispatch_weights", and "combine_weights". + """ + # Forward pass through the transformer + infos: list[dict[str, Any]] = [] + for mha, ffn, drop in self.layers: + x = mha(x, x, x)[0] + x + if not self.disable_moe: + outs = ffn(x, weight_key=task_embedding if self.task_moe else None) + x_ffn = outs.pop("outputs") + infos.append(outs) + x = drop(x_ffn + x) + else: + x = drop(ffn(x) + x) + x = self.norm(x) + outputs = {"outputs": x} + + # If using MoE, collect expert weights and auxiliary losses + # Don't call detach because we will use this later on in the loss collation + if not self.disable_moe: + collated: dict[str, list[torch.Tensor]] = { + "load_balance_loss": [], + "dispatch_weights": [], + "combine_weights": [], + } + for info in infos: + for k, v in info.items(): + if k == "dispatch_weights": + # each weight is [batch, seq_len, num_experts, num_slots] + # compute avg weight per token across slot/batch/expert + # NOTE: this is probably about the same across all tokens, + # assuming all tokens get looked at by a few experts + collated["dispatch_weights"].append(v.mean((0, 2, 3))) + + elif k == "combine_weights": + # each weight is [batch, seq_len, num_experts * num_slots] + # compute avg weight per expert (slot group) across batch/seq + v = v.unflatten(-1, (self.num_experts, self.num_slots)) + v = v.sum(-1) # [batch, seq_len, num_experts (softmax)] + collated["combine_weights"].append(v.mean((0, 1))) + + elif k == "load_balance_loss": + # each load balance loss per layer is a scalar + collated["load_balance_loss"].append(v) + outputs.update(collated) + + return outputs + + def apply_auxiliary_losses( + self, trunk_out: dict[str, Any], outs: dict[str, Any] + ) -> None: + """Apply auxiliary losses in-place. + + Just move the load balance loss to the loss dict, where it will eventually be summed. + + Args: + trunk_out: The output of the trunk. + outs: The output of the decoders, with key "loss_dict" containing the losses. + """ + if "load_balance_loss" in trunk_out and self.load_balance_loss_weight > 0.0: + total_aux_loss = torch.stack(trunk_out["load_balance_loss"]).mean() + outs["loss_dict"]["load_balance_loss"] = ( + self.load_balance_loss_weight * total_aux_loss + ) diff --git a/rslp/lightning_cli.py b/rslp/lightning_cli.py index b9a12303..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 @@ -349,6 +355,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 diff --git a/tests/integration/helios/test_task_embeds.py b/tests/integration/helios/test_task_embeds.py new file mode 100644 index 00000000..6921ec42 --- /dev/null +++ b/tests/integration/helios/test_task_embeds.py @@ -0,0 +1,181 @@ +"""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 + +import pytest +import torch + +pytest.importorskip("helios") +from rslp.helios.model import Helios, TaskConditionedHelios # noqa: E402 + + +@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: 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 + + monkeypatch.setattr(Helios, "load_model", fake_load_model, raising=True) + + +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) + } + + +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: Any, inputs: list[torch.tensor]) -> list[torch.tensor]: + 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: Any, inputs: list[torch.tensor]) -> list[torch.tensor]: + 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), + }, + )