talmolab / dreem

DREEM Relates Every Entities' Motion (DREEM). Global Tracking Transformers for biological multi-object tracking.
https://dreem.sleap.ai
BSD 3-Clause "New" or "Revised" License
7 stars 1 forks source link

dreem-track ConfigTypeError: DictConfig in struct mode does not support pop #93

Closed YiLin-Zhou closed 1 month ago

YiLin-Zhou commented 1 month ago

Bug description

Running 'dreem-track' on sleap data produces a DictConfig errors: omegaconf.errors.ConfigTypeError: DictConfig in struct mode does not support pop

Terminal error logs

Error executing job with overrides: []
Traceback (most recent call last):
  File "C:\Users\ylzhou\dreem\dreem\inference\track.py", line 135, in run
    labels_files, vid_files = pred_cfg.get_data_paths(pred_cfg.cfg.dataset.test_dataset)
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\ylzhou\dreem\dreem\io\config.py", line 180, in get_data_paths
    dir_cfg = data_cfg.pop("dir", None)
              ^^^^^^^^^^^^^^^^^^^^^^^^^
omegaconf.errors.ConfigTypeError: DictConfig in struct mode does not support pop
    full_key: dataset.test_dataset.dir
    object_type=dict

Inference yaml file

ckpt_path: "/Users/ylzhou/Documents/DREEM/...ckpt"
out_dir: "/Users/ylzhou/Documents/DREEM/results"
tracker:
  overlap_thresh: 0.01
  decay_time: 0.9
  iou: "max"
  max_center_dist: 0.01

dataset:
  test_dataset:
    slp_files: ["/Users/ylzhou/Documents/DREEM/inference/CC4.slp"]
    video_files: ["/Users/ylzhou/Documents/DREEM/inference/CC4.avi"]
    chunk: false

dataloader:
  test_dataloader:
    shuffle: False
    num_workers: 0
shaikh58 commented 1 month ago

Hi Yi, should be fixed with the latest patch. Could you pull the latest changes and confirm if this works now

YiLin-Zhou commented 1 month ago

Worked as of PR #94