Skip to content

Commit 5145796

Browse files
committed
Support single-seq methods in complex alignment
1 parent 7a4b9fc commit 5145796

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

posebench/analysis/complex_alignment.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# Following code curated for PoseBench: (https://github.com/BioinfoMachineLearning/PoseBench)
33
# -------------------------------------------------------------------------------------------------------------------------------------
44

5+
import copy
56
import logging
67
import os
78
from pathlib import Path
@@ -11,7 +12,7 @@
1112
import numpy as np
1213
import rootutils
1314
from beartype.typing import Literal
14-
from omegaconf import DictConfig
15+
from omegaconf import DictConfig, open_dict
1516
from tqdm import tqdm
1617

1718
rootutils.setup_root(__file__, indicator=".project-root", pythonpath=True)
@@ -297,6 +298,12 @@ def main(cfg: DictConfig):
297298
298299
:param cfg: Configuration dictionary from the hydra YAML file.
299300
"""
301+
with open_dict(cfg):
302+
# NOTE: besides their output directories, single-sequence baselines are treated like their multi-sequence counterparts
303+
output_dir = copy.deepcopy(cfg.output_dir)
304+
cfg.method = cfg.method.removesuffix("_ss")
305+
cfg.output_dir = output_dir
306+
300307
input_data_dir = Path(cfg.input_data_dir)
301308
for config in ["", "_relaxed"]:
302309
output_dir = Path(cfg.output_dir + config)

0 commit comments

Comments
 (0)