diff --git a/brats/algorithms.py b/brats/algorithms.py index 14defac..ad54cd9 100644 --- a/brats/algorithms.py +++ b/brats/algorithms.py @@ -151,12 +151,13 @@ def infer_batch( data_folder = Path(data_folder) output_folder = Path(output_folder) + output_folder.mkdir(parents=True, exist_ok=True) temp_data_folder = Path(tempfile.mkdtemp()) temp_output_folder = Path(tempfile.mkdtemp()) if log_file: inference_log_file = logger.add(log_file, level="INFO", catch=True) - logger.info(f"Logging to: {log_file.absolute()}") + logger.info(f"Logging to: {Path(log_file).absolute()}") try: self._log_algorithm_info() # find subjects diff --git a/brats/docker.py b/brats/docker.py index 5d36af5..6e9f809 100644 --- a/brats/docker.py +++ b/brats/docker.py @@ -239,19 +239,21 @@ def run_docker( additional_files_path=additional_files_path, output_path=output_path, ) - - logger.info(f"{'Starting inference'}") + logger.debug(f"Volume mappings: {volume_mappings}") command_args, extra_args = _build_args( algorithm=algorithm, additional_files_path=additional_files_path ) + logger.debug(f"Command args: {command_args}, Extra args: {extra_args}") # device setup device_requests = _handle_device_requests( algorithm=algorithm, cuda_devices=cuda_devices, force_cpu=force_cpu ) + logger.debug(f"Device requests: {device_requests}") # Run the container + logger.info(f"{'Starting inference'}") container = client.containers.run( image=algorithm.run_args.docker_image, volumes=volume_mappings,