Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion configs/satbird/satbird_ctran_base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ comet:
model:
name: "CTranModel"
input_dim: 27
hidden_dim: 256
hidden_dim: 128
backbone: "SimpleMLPBackbone"
n_backbone_layers: 2
n_attention_layers: 3
Expand Down
10 changes: 5 additions & 5 deletions configs/satbirdxsatbutterfly/satbird_ctran_birdbutterfly.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#where to save checkpoints
save_path: "/network/projects/ecosystem-embeddings/SDMPartialLabels/CTran_clean_meli/birdxbutterflies_256hdim_2layers_binning"
save_path: "/network/projects/ecosystem-embeddings/SDMPartialLabels/CTran_clean_meli/birdxbutterflies_final"

# load existing checkpoint for inference. If passing experiment folder instead (for multiple seeds), it will evaluate all of them.
load_ckpt_path: ""
save_preds_path: "" #"/network/scratch/h/hager.radi/ecosystem-embedding/baseline_resnet18_RGBNIR_ENV/preds_path"

comet:
project_name: "SDMPartialLabels"
tags: ["rtran", "removebinning", "172butterfly_species", "satbird+ satbutterflyv1 + satbutterflyv2"]
tags: ["rtran", "172butterfly_species", "satbird+ satbutterflyv1 + satbutterflyv2"]
experiment_name: "CTran_binning" # specify for training, or use to report test results, TODO: also use to resume training
experiment_key: "" # use to report test results,

Expand All @@ -17,7 +17,7 @@ dataloader_to_use: "SDMEnvMaskedDataset"
model:
name: "CTranModel"
input_dim: 27
hidden_dim: 256
hidden_dim: 128
backbone: "SimpleMLPBackbone"
n_backbone_layers: 2
n_attention_layers: 3
Expand All @@ -35,7 +35,7 @@ partial_labels:
# mask known labels out of the loss (true or false)
masked_loss: False
# quantized mask (1 if all positives to 1, > 1 to indicate bins)
quantized_mask_bins:
quantized_mask_bins: 4
# max ratio of unknown labels during training
train_known_ratio: 0.75
# what known ratios do we4 consider when testing
Expand All @@ -61,7 +61,7 @@ data:
files:
base: "/network/projects/ecosystem-embeddings/"
train: ["SatBirdButterfly/train_split_fillna.csv"]
val: ["SatBirdButterfly/valid_split_fillna.csv"]
val: ["SatBirdButterfly/valid_split_fillna_colocated_only.csv"] #"SatBirdButterfly/valid_split_fillna.csv"]
test: ["SatBirdButterfly/test_split_fillna.csv"]

targets_file: ["SatBird_data_v2/USA_summer/satbird_usa_summer_targets.pkl","SatButterfly_dataset/SatButterfly_v1/USA/butterfly_all_targets_v1.2.pkl","SatButterfly_dataset/SatButterfly_v2/USA/butterfly_all_targets_v1.2.pkl"]
Expand Down
6 changes: 3 additions & 3 deletions src/dataloaders/dataloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,9 +392,9 @@ def get_songbird_indices():
targets=torch.tensor(test_targets, dtype=torch.float32),
hotspots=test_hotspots,
species_list_masked=get_songbird_indices(),
data_base_dir=os.path.join(
self.data_base_dir, self.config.data.files.satbird_species_indices_path
),
#data_base_dir=os.path.join(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't need this parameter anymore? if not, remove instead of uncomment

# self.data_base_dir, self.config.data.files.satbird_species_indices_path
#),
mode="test",
maximum_known_labels_ratio=self.config.partial_labels.eval_known_ratio,
num_species=self.num_species,
Expand Down
2 changes: 1 addition & 1 deletion src/trainers/sdm_partial_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from src.dataloaders.dataloader import *
from src.losses import BCE, CustomCrossEntropyLoss, CustomFocalLoss, RMSLELoss
from src.models.baselines import SimpleMLPMasked
#from src.models.baselines import SimpleMLPMasked_v0 as SimpleMLPMasked
from src.models.ctran import CTranModel
from src.trainers.base import BaseTrainer
from src.utils import eval_species_split
Expand Down