my updated config 
multuilabel_circle_net.yaml


slug: b5_unet_s2
activation: silu
num_channels: ${dataset.num_channels}
num_extra_blocks: 0


model:
  _target_: xview3.centernet.models.centernet_unet.model_factory.create_centernet_unet_model
  model_name: b5_unet_s2     # Example: resnet50
  weights: IMAGENET1K_V1
  pretrained: True
  output_stride: 32
  decoder:
    _target_: xview3.centernet.models.custom_encoder.DebugUNetDecoder
    encoder_channels: [32, 24, 40, 112, 320]  
    decoder_channels: [512, 384, 256, 128, 64]
    unet_block:
      _target_: xview3.centernet.models.unet_blocks.UnetBlock
      _partial_: true
    upsample_block:
      _target_: torch.nn.Upsample
      scale_factor: 2
      mode: bilinear
  nas:
    enabled: true
    search_space:
      num_layers: [2, 5]         
      num_filters: [64, 128, 256] 
      kernel_size: [3, 5]       
      activation: [relu, leaky_relu]  
      dropout_rate_max: 0.5      
    num_trials: 50              
  num_channels: 2
  num_classes: 2
  anchors: [[10, 13], [16, 30], [33, 23]]
  input_upsample_factor: 1
  neck_out_channels: 256

  box_coder:
    _target_: xview3.centernet.MultilabelCircleNetCoder
    image_size:
      - 1024
      - 1024
    max_objects: 512
    heatmap_encoding: umich
    labels_encoding: circle
    ignore_value:
      _target_: xview3.ignore_value
    fixed_radius: 3
    labels_radius: 1
    ignore_low_confidence_detections: ${dataset.ignore_low_confidence_detections}

  heads:
    - _target_: xview3.centernet.models.heads.DecoupledHeadGroupNormLateShuffle
      channels: 256
      classifier_dim: 128
      objectness_dim: 128
      size_dim: 128
      offset_dim: 16
      dropout_rate: 0.1
      activation: silu
      num_blocks: 3
    - _target_: xview3.centernet.models.heads.yolo_head.YOLOHead
      num_classes: 2
      anchors: [[10, 13], [16, 30], [33, 23]]
      input_image_size: [640, 640]
      stride: 32

transformer:
  enabled: true
  loss_weight: 1.0

yolo:
  enabled: true
  loss_weight: 1.0

# Training Configuration
train:
  slug: default_training 
  epochs: 4
  output_stride: 32
  early_stopping:
    enabled: true
    patience: 2
    mode: "min"  # Options: 'min' for loss-based, 'max' for accuracy-based
    metric: "loss"  # The metric to monitor for early stopping

# Torch Configuration
torch:
  amp:
    enabled: false  
  cudnn:
    allow_tf32: True
  cuda_allow_tf32: True
  detect_anomaly: False
  deterministic: False
  benchmark: True

  # Inference and Training Enhancements
  activation_after: "after_model"
  tta: "d4"
  with_offset: True
  yolo_decoders: [] 

# Hydra Configuration
hydra:
  output_subdir: null
  run:
    dir: .
  sweep:
    dir: .
    subdir: .

# Data Augmentation Configuration
augs:
  spatial:
    - albumentations.HorizontalFlip
    - albumentations.VerticalFlip
  individual:
    vv0:
      _target_: xview3.augmentations.unclipped_random_brightness.UnclippedRandomBrightnessContrast
      always_apply: false
      p: 0.5
  slug: flips_light 

# Per-Channel Normalization
normalization:
  channels:
    vv:
      _target_: xview3.SigmoidNormalization
      midpoint: -20.0
      temperature: 0.18
    vh:
      _target_: xview3.SigmoidNormalization
      midpoint: -20.0
      temperature: 0.18
    bathymetry:
      _target_: xview3.CubicRootNormalization
    wind_direction:
      _target_: albumentations.NoOp
    wind_speed:
      _target_: albumentations.NoOp
    mask:
      _target_: albumentations.NoOp

# Dataset Configuration
dataset:
  _target_: xview3.centernet.multilabel_dataset.MultilabelCircleNetDataModule
  data_dir: full_4fold
  normalization:
    mean: [0.485, 0.456, 0.406]
    std: [0.229, 0.224, 0.225]
  slug: full_4fold 
  splitter: full_4fold
  fold: 0
  num_folds: 4
  # Added the following parameters to address references in box_coder
  ignore_low_confidence_detections: true
  ignore_low_confidence_labels: false

# Input Channels Configuration
input_channels:
  - vh
  - vv

# DDP Stuff
local_rank: ${oc.env:LOCAL_RANK, 0}
world_size: ${oc.env:WORLD_SIZE, 0}


experiment: null

seed: 42

deterministic: False
detect_anomaly: False
find_unused: False

transfer: null
checkpoint: null



###but get this error I think related to train_multilabel.py
valid_loader = DataLoader(
            valid_dataset,
            batch_size=config.valid.get('batch_size', config.train.batch_size),
            num_workers=config.valid.get('num_workers', config.train.num_workers),
            pin_memory=True,
            shuffle=False
        )


###here's the error
(sam3) samerkharboush@Samers-MBP SAR-MPS-OptunaNasFbnYoloTransformers % HYDRA_FULL_ERROR=1 python train_multilabel.py
DEBUG:git.cmd:Popen(['git', 'version'], cwd=/Users/samerkharboush/Downloads/SAR-MPS-OptunaNasFbnYoloTransformers, stdin=None, shell=False, universal_newlines=False)
DEBUG:git.cmd:Popen(['git', 'version'], cwd=/Users/samerkharboush/Downloads/SAR-MPS-OptunaNasFbnYoloTransformers, stdin=None, shell=False, universal_newlines=False)
DEBUG:hydra.core.utils:Setting JobRuntime:name=UNKNOWN_NAME
DEBUG:hydra.core.utils:Setting JobRuntime:name=train_multilabel
Error executing job with overrides: []
Traceback (most recent call last):
  File "/Users/samerkharboush/Downloads/SAR-MPS-OptunaNasFbnYoloTransformers/train_multilabel.py", line 499, in <module>
    main()
  File "/opt/anaconda3/envs/sam3/lib/python3.9/site-packages/hydra/main.py", line 94, in decorated_main
    _run_hydra(
  File "/opt/anaconda3/envs/sam3/lib/python3.9/site-packages/hydra/_internal/utils.py", line 394, in _run_hydra
    _run_app(
  File "/opt/anaconda3/envs/sam3/lib/python3.9/site-packages/hydra/_internal/utils.py", line 457, in _run_app
    run_and_report(
  File "/opt/anaconda3/envs/sam3/lib/python3.9/site-packages/hydra/_internal/utils.py", line 223, in run_and_report
    raise ex
  File "/opt/anaconda3/envs/sam3/lib/python3.9/site-packages/hydra/_internal/utils.py", line 220, in run_and_report
    return func()
  File "/opt/anaconda3/envs/sam3/lib/python3.9/site-packages/hydra/_internal/utils.py", line 458, in <lambda>
    lambda: hydra.run(
  File "/opt/anaconda3/envs/sam3/lib/python3.9/site-packages/hydra/_internal/hydra.py", line 132, in run
    _ = ret.return_value
  File "/opt/anaconda3/envs/sam3/lib/python3.9/site-packages/hydra/core/utils.py", line 260, in return_value
    raise self._return_value
  File "/opt/anaconda3/envs/sam3/lib/python3.9/site-packages/hydra/core/utils.py", line 186, in run_job
    ret.return_value = task_function(task_cfg)
  File "/Users/samerkharboush/Downloads/SAR-MPS-OptunaNasFbnYoloTransformers/train_multilabel.py", line 495, in main
    pipeline.train()
  File "/Users/samerkharboush/Downloads/SAR-MPS-OptunaNasFbnYoloTransformers/train_multilabel.py", line 395, in train
    train_loader, valid_loader, _, dataset_callbacks = self.build_datasets(config)
  File "/Users/samerkharboush/Downloads/SAR-MPS-OptunaNasFbnYoloTransformers/train_multilabel.py", line 95, in build_datasets
    valid_image_size = config.valid.image_size if 'image_size' in config.valid else [2048, 2048]
  File "/opt/anaconda3/envs/sam3/lib/python3.9/site-packages/omegaconf/dictconfig.py", line 359, in __getattr__
    self._format_and_raise(key=key, value=None, cause=e)
  File "/opt/anaconda3/envs/sam3/lib/python3.9/site-packages/omegaconf/base.py", line 231, in _format_and_raise
    format_and_raise(
  File "/opt/anaconda3/envs/sam3/lib/python3.9/site-packages/omegaconf/_utils.py", line 819, in format_and_raise
    _raise(ex, cause)
  File "/opt/anaconda3/envs/sam3/lib/python3.9/site-packages/omegaconf/_utils.py", line 797, in _raise
    raise ex.with_traceback(sys.exc_info()[2])  # set env var OC_CAUSE=1 for full trace
  File "/opt/anaconda3/envs/sam3/lib/python3.9/site-packages/omegaconf/dictconfig.py", line 351, in __getattr__
    return self._get_impl(
  File "/opt/anaconda3/envs/sam3/lib/python3.9/site-packages/omegaconf/dictconfig.py", line 442, in _get_impl
    node = self._get_child(
  File "/opt/anaconda3/envs/sam3/lib/python3.9/site-packages/omegaconf/basecontainer.py", line 73, in _get_child
    child = self._get_node(
  File "/opt/anaconda3/envs/sam3/lib/python3.9/site-packages/omegaconf/dictconfig.py", line 475, in _get_node
    self._validate_get(key)
  File "/opt/anaconda3/envs/sam3/lib/python3.9/site-packages/omegaconf/dictconfig.py", line 164, in _validate_get
    self._format_and_raise(
  File "/opt/anaconda3/envs/sam3/lib/python3.9/site-packages/omegaconf/base.py", line 231, in _format_and_raise
    format_and_raise(
  File "/opt/anaconda3/envs/sam3/lib/python3.9/site-packages/omegaconf/_utils.py", line 899, in format_and_raise
    _raise(ex, cause)
  File "/opt/anaconda3/envs/sam3/lib/python3.9/site-packages/omegaconf/_utils.py", line 797, in _raise
    raise ex.with_traceback(sys.exc_info()[2])  # set env var OC_CAUSE=1 for full trace
omegaconf.errors.ConfigAttributeError: Key 'valid' is not in struct
    full_key: valid
    object_type=dict
(sam3) samerkharboush@Samers-MBP SAR-MPS-OptunaNasFbnYoloTransformers % 

##my config multilabel_circle_net.py
slug: b5_unet_s2
activation: silu
num_channels: ${dataset.num_channels}
num_extra_blocks: 0


model:
  _target_: xview3.centernet.models.centernet_unet.model_factory.create_centernet_unet_model
  model_name: b5_unet_s2     # Example: resnet50
  weights: IMAGENET1K_V1
  pretrained: True
  output_stride: 32
  decoder:
    _target_: xview3.centernet.models.custom_encoder.DebugUNetDecoder
    encoder_channels: [32, 24, 40, 112, 320]  
    decoder_channels: [512, 384, 256, 128, 64]
    unet_block:
      _target_: xview3.centernet.models.unet_blocks.UnetBlock
      _partial_: true
    upsample_block:
      _target_: torch.nn.Upsample
      scale_factor: 2
      mode: bilinear
  nas:
    enabled: true
    search_space:
      num_layers: [2, 5]         
      num_filters: [64, 128, 256] 
      kernel_size: [3, 5]       
      activation: [relu, leaky_relu]  
      dropout_rate_max: 0.5      
    num_trials: 50              
  num_channels: 2
  num_classes: 2
  anchors: [[10, 13], [16, 30], [33, 23]]
  input_upsample_factor: 1
  neck_out_channels: 256

  box_coder:
    _target_: xview3.centernet.MultilabelCircleNetCoder
    image_size:
      - 1024
      - 1024
    max_objects: 512
    heatmap_encoding: umich
    labels_encoding: circle
    ignore_value:
      _target_: xview3.ignore_value
    fixed_radius: 3
    labels_radius: 1
    ignore_low_confidence_detections: ${dataset.ignore_low_confidence_detections}

  heads:
    - _target_: xview3.centernet.models.heads.DecoupledHeadGroupNormLateShuffle
      channels: 256
      classifier_dim: 128
      objectness_dim: 128
      size_dim: 128
      offset_dim: 16
      dropout_rate: 0.1
      activation: silu
      num_blocks: 3
    - _target_: xview3.centernet.models.heads.yolo_head.YOLOHead
      num_classes: 2
      anchors: [[10, 13], [16, 30], [33, 23]]
      input_image_size: [640, 640]
      stride: 32

transformer:
  enabled: true
  loss_weight: 1.0

yolo:
  enabled: true
  loss_weight: 1.0

# Training Configuration
train:
  slug: default_training 
  epochs: 4
  output_stride: 32
  early_stopping:
    enabled: true
    patience: 2
    mode: "min"  # Options: 'min' for loss-based, 'max' for accuracy-based
    metric: "loss"  # The metric to monitor for early stopping

# Torch Configuration
torch:
  amp:
    enabled: false  
  cudnn:
    allow_tf32: True
  cuda_allow_tf32: True
  detect_anomaly: False
  deterministic: False
  benchmark: True

  # Inference and Training Enhancements
  activation_after: "after_model"
  tta: "d4"
  with_offset: True
  yolo_decoders: [] 

# Hydra Configuration
hydra:
  output_subdir: null
  run:
    dir: .
  sweep:
    dir: .
    subdir: .

# Data Augmentation Configuration
augs:
  spatial:
    - albumentations.HorizontalFlip
    - albumentations.VerticalFlip
  individual:
    vv0:
      _target_: xview3.augmentations.unclipped_random_brightness.UnclippedRandomBrightnessContrast
      always_apply: false
      p: 0.5
  slug: flips_light 

# Per-Channel Normalization
normalization:
  channels:
    vv:
      _target_: xview3.SigmoidNormalization
      midpoint: -20.0
      temperature: 0.18
    vh:
      _target_: xview3.SigmoidNormalization
      midpoint: -20.0
      temperature: 0.18
    bathymetry:
      _target_: xview3.CubicRootNormalization
    wind_direction:
      _target_: albumentations.NoOp
    wind_speed:
      _target_: albumentations.NoOp
    mask:
      _target_: albumentations.NoOp

# Dataset Configuration
dataset:
  _target_: xview3.centernet.multilabel_dataset.MultilabelCircleNetDataModule
  data_dir: full_4fold
  normalization:
    mean: [0.485, 0.456, 0.406]
    std: [0.229, 0.224, 0.225]
  slug: full_4fold 
  splitter: full_4fold
  fold: 0
  num_folds: 4
  # Added the following parameters to address references in box_coder
  ignore_low_confidence_detections: true
  ignore_low_confidence_labels: false

# Input Channels Configuration
input_channels:
  - vh
  - vv

# DDP Stuff
local_rank: ${oc.env:LOCAL_RANK, 0}
world_size: ${oc.env:WORLD_SIZE, 0}


experiment: null

seed: 42

deterministic: False
detect_anomaly: False
find_unused: False

transfer: null
checkpoint: null



###I think in the train file method cause this error
this
 def build_datasets(self, config: DictConfig) -> Tuple[DataLoader, DataLoader, Optional[DataLoader], List[Callback]]:
        """
        Builds and returns DataLoaders for training and validation datasets.
        """
        dataset_module = MultilabelCircleNetDataModule(config=config)

        train_image_size = config.train.image_size if 'image_size' in config.train else [512, 512]
        valid_image_size = config.valid.image_size if 'image_size' in config.valid else [2048, 2048]

        train_df, valid_df, _, shore_root = dataset_module.train_val_split(
            splitter=config.dataset.splitter,
            fold=config.dataset.fold,
            num_folds=config.dataset.num_folds,
        )
##or this method
valid_loader = DataLoader(
            valid_dataset,
            batch_size=config.valid.get('batch_size', config.train.batch_size),
            num_workers=config.valid.get('num_workers', config.train.num_workers),
            pin_memory=True,
            shuffle=False
        )