From 75e0a5db20c97d58e7b4194c43e6067696e28994 Mon Sep 17 00:00:00 2001 From: PythonFZ Date: Thu, 4 Jan 2024 11:35:40 +0100 Subject: [PATCH] resolve merge conflict --- ipsuite/models/apax.py | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/ipsuite/models/apax.py b/ipsuite/models/apax.py index 8fa77a7b..454f13cb 100644 --- a/ipsuite/models/apax.py +++ b/ipsuite/models/apax.py @@ -82,23 +82,23 @@ def _handle_parameter_file(self): with self.state.use_tmp_path(): self._parameter = yaml.safe_load(pathlib.Path(self.config).read_text()) - custom_parameters = { - "directory": self.model_directory.as_posix(), - "experiment": "", - "train_data_path": self.train_data_file.as_posix(), - "val_data_path": self.validation_data_file.as_posix(), - } - - if self.model is not None: - param_files = self.model._parameter["data"]["directory"] - base_path = {"base_model_checkpoint": param_files} - try: - self._parameter["checkpoints"].update(base_path) - except KeyError: - self._parameter["checkpoints"] = base_path - - check_duplicate_keys(custom_parameters, self._parameter["data"], log) - self._parameter["data"].update(custom_parameters) + custom_parameters = { + "directory": self.model_directory.resolve().as_posix(), + "experiment": "", + "train_data_path": self.train_data_file.as_posix(), + "val_data_path": self.validation_data_file.as_posix(), + } + + if self.model is not None: + param_files = self.model._parameter["data"]["directory"] + base_path = {"base_model_checkpoint": param_files} + try: + self._parameter["checkpoints"].update(base_path) + except KeyError: + self._parameter["checkpoints"] = base_path + + check_duplicate_keys(custom_parameters, self._parameter["data"], log) + self._parameter["data"].update(custom_parameters) def train_model(self): """Train the model using `apax.train.run`"""