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,
)
| 72 | |
| 73 | |
| 74 | def 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 | |
| 97 | def register_custom_omegaconf_resolvers(): |
no test coverage detected