From 07b558ae8fffe5f24c930bc1c2d4f9d44cdffd82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szymon=20Karpi=C5=84ski?= Date: Tue, 16 Jan 2024 11:15:23 +0100 Subject: [PATCH] Skip paddle version when no version is provided MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Szymon KarpiƄski --- dali/python/nvidia/dali/plugin/paddle.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/dali/python/nvidia/dali/plugin/paddle.py b/dali/python/nvidia/dali/plugin/paddle.py index 52a812a604..550d052e9a 100644 --- a/dali/python/nvidia/dali/plugin/paddle.py +++ b/dali/python/nvidia/dali/plugin/paddle.py @@ -1,5 +1,5 @@ # Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved. -# Copyright (c) 2017-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# Copyright (c) 2017-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -25,10 +25,12 @@ from nvidia.dali.plugin.base_iterator import _DaliBaseIterator from nvidia.dali.plugin.base_iterator import LastBatchPolicy - -assert LooseVersion(paddle.__version__) == LooseVersion("0.0.0") or LooseVersion( - paddle.__version__ -) >= LooseVersion("2.0.0"), "DALI PaddlePaddle support requires Paddle develop or release >= 2.0.0" +if isinstance(paddle.__version__, str): + assert LooseVersion(paddle.__version__) == LooseVersion("0.0.0") or LooseVersion( + paddle.__version__ + ) >= LooseVersion( + "2.0.0" + ), "DALI PaddlePaddle support requires Paddle develop or release >= 2.0.0" dtype_map = {