From 78efb640925b8293805480158a6ded7d1148ae33 Mon Sep 17 00:00:00 2001 From: bxdd Date: Wed, 22 Nov 2023 22:26:22 +0800 Subject: [PATCH] [FIX] fix package utils bug --- learnware/client/container.py | 1 - learnware/client/package_utils.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/learnware/client/container.py b/learnware/client/container.py index 12ed702..05d84b9 100644 --- a/learnware/client/container.py +++ b/learnware/client/container.py @@ -123,7 +123,6 @@ class ModelCondaContainer(ModelContainer): input_shape = output_results["metadata"]["input_shape"] output_shape = output_results["metadata"]["output_shape"] - logger.info(f"input_shape: {input_shape}, output_shape: {output_shape}") self.reset(input_shape=input_shape, output_shape=output_shape) def _run_model_with_script(self, method, **kargs): diff --git a/learnware/client/package_utils.py b/learnware/client/package_utils.py index 3c30546..5768a4e 100644 --- a/learnware/client/package_utils.py +++ b/learnware/client/package_utils.py @@ -78,7 +78,7 @@ def filter_nonexist_pip_packages(packages: list) -> Tuple[List[str], List[str]]: continue try: package_name = parse_pip_requirement(package) - if package_name != "learnware": + if package_name is not None and package_name != "learnware": try_to_run(args=["pip", "index", "versions", package_name], timeout=5) exist_packages.append(package) continue