MCPcopy Create free account
hub / github.com/BioinfoMachineLearning/FlowDock / resolve_method_output_dir

Function resolve_method_output_dir

flowdock/__init__.py:74–94  ·  view source on GitHub ↗

Resolve the output directory for a given method. :param method: The method name. :param dataset: The dataset name. :param repeat_index: The repeat index for the method. :return: The output directory for the given method.

(
    method: str,
    dataset: str,
    repeat_index: int,
)

Source from the content-addressed store, hash-verified

72
73
74def resolve_method_output_dir(
75 method: str,
76 dataset: str,
77 repeat_index: int,
78) -> str:
79 """Resolve the output directory for a given method.
80
81 :param method: The method name.
82 :param dataset: The dataset name.
83 :param repeat_index: The repeat index for the method.
84 :return: The output directory for the given method.
85 """
86 if method in STANDARDIZED_DIR_METHODS or method in ["flowdock", "neuralplexer"]:
87 return os.path.join(
88 "forks",
89 METHOD_TITLE_MAPPING.get(method, method),
90 "inference",
91 f"{method}_{dataset}_output{'s' if method in ['flowdock', 'neuralplexer'] else ''}_{repeat_index}",
92 )
93 else:
94 raise ValueError(f"Invalid method: {method}")
95
96
97def register_custom_omegaconf_resolvers():

Callers 1

Calls 2

joinMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected