[{"id":30141,"web_url":"https://patchwork.libcamera.org/comment/30141/","msgid":"<20240629000112.GO30900@pendragon.ideasonboard.com>","date":"2024-06-29T00:01:12","subject":"Re: [PATCH v2 17/25] libtuning: Only warn if processing returns None","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Stefan,\n\nThank you for the patch.\n\nOn Fri, Jun 28, 2024 at 12:47:10PM +0200, Stefan Klug wrote:\n> There are valid cases where a module returns None. E.g no images were\n> provided for lsc calibration. We should however define proper semantics\n> there. Continue with a warning for now.\n\nWe should really differentiate between these cases. It doesn't have to\nbe done in this patch, but could you add it to your todo list to design\nproper semantics ?\n\n> Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> ---\n>  utils/tuning/libtuning/generators/yaml_output.py | 3 +++\n>  utils/tuning/libtuning/libtuning.py              | 4 ++--\n>  2 files changed, 5 insertions(+), 2 deletions(-)\n> \n> diff --git a/utils/tuning/libtuning/generators/yaml_output.py b/utils/tuning/libtuning/generators/yaml_output.py\n> index 31e265df4ea7..c490081d7de7 100644\n> --- a/utils/tuning/libtuning/generators/yaml_output.py\n> +++ b/utils/tuning/libtuning/generators/yaml_output.py\n> @@ -107,6 +107,9 @@ class YamlOutput(Generator):\n>          ]\n>  \n>          for module in output_order:\n> +            if module not in output_dict:\n> +                continue\n> +\n>              out_lines.append(f'  - {module.out_name}:')\n>  \n>              if len(output_dict[module]) == 0:\n> diff --git a/utils/tuning/libtuning/libtuning.py b/utils/tuning/libtuning/libtuning.py\n> index 5342e5d6daaa..e7c63535fefd 100644\n> --- a/utils/tuning/libtuning/libtuning.py\n> +++ b/utils/tuning/libtuning/libtuning.py\n> @@ -200,8 +200,8 @@ class Tuner(object):\n>          for module in self.modules:\n>              out = module.process(self.config, images, self.output)\n>              if out is None:\n> -                logger.error(f'Module {module.hr_name} failed to process...')\n> -                break\n> +                logger.warning(f'Module {module.hr_name} failed to process...')\n> +                continue\n>              self.output[module] = out\n>  \n>          self.generator.write(args.output, self.output, self.output_order)","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 10E79BDB1D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat, 29 Jun 2024 00:01:36 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 51E9362C99;\n\tSat, 29 Jun 2024 02:01:35 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4FC3E619E8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 29 Jun 2024 02:01:34 +0200 (CEST)","from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 22C1B63B;\n\tSat, 29 Jun 2024 02:01:09 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"m252uiL1\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1719619269;\n\tbh=rtnZnPpHmcC+Tdos7XuHu66OfPF7I0H9d6HTO6GN+sM=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=m252uiL1F5ffKYjob8Uu8KVCMLw/O6aeub1J6dNrV4MM7xyyzWs+xThg5psP8TK6G\n\toR1yvi2rrWLKQh3+8DlbFDlsDLNveoxWzs4kJR3sGaJjRZ/O+TNKpBy3OHhGOq/jzL\n\tQFIzGRb/SMmNRDz99yp+jEj5lU75WlvERfq0p7Ng=","Date":"Sat, 29 Jun 2024 03:01:12 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Stefan Klug <stefan.klug@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v2 17/25] libtuning: Only warn if processing returns None","Message-ID":"<20240629000112.GO30900@pendragon.ideasonboard.com>","References":"<20240628104828.2928109-1-stefan.klug@ideasonboard.com>\n\t<20240628104828.2928109-18-stefan.klug@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20240628104828.2928109-18-stefan.klug@ideasonboard.com>","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]