From 31f5e7fce7db6ad0c589e6fc3be7f16805fff399 Mon Sep 17 00:00:00 2001 From: Yiheng Wang Date: Thu, 24 Oct 2024 21:13:35 +0800 Subject: [PATCH 1/2] add an arg Signed-off-by: Yiheng Wang --- models/vista3d/configs/inference_trt.json | 5 +++-- models/vista3d/configs/metadata.json | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/models/vista3d/configs/inference_trt.json b/models/vista3d/configs/inference_trt.json index 6b597a6c..1f87e8ee 100644 --- a/models/vista3d/configs/inference_trt.json +++ b/models/vista3d/configs/inference_trt.json @@ -1,4 +1,5 @@ { + "base_path": null, "+imports": [ "$from monai.networks import trt_compile" ], @@ -8,11 +9,11 @@ "dynamic_batchsize": "$[1, @inferer#sw_batch_size, @inferer#sw_batch_size]" }, "network_dev": "$@network_def.to(@device)", - "encoder": "$trt_compile(@network_dev, @bundle_root + '/models/model.pt', args=@network_trt_args, submodule=['image_encoder.encoder'])", + "encoder": "$trt_compile(@network_dev, @bundle_root + '/models/model.pt' if not @base_path else @base_path, args=@network_trt_args, submodule=['image_encoder.encoder'])", "head_trt_args": { "dynamic_batchsize": "$[1, 1, @max_prompt_size]", "fallback": "$True" }, - "head": "$trt_compile(@network_dev, @bundle_root + '/models/model.pt', args=@head_trt_args, submodule=['class_head']) if @head_trt_enabled else @network_dev", + "head": "$trt_compile(@network_dev, @bundle_root + '/models/model.pt' if not @base_path else @base_path, args=@head_trt_args, submodule=['class_head']) if @head_trt_enabled else @network_dev", "network": "$None if @encoder is None else @head" } diff --git a/models/vista3d/configs/metadata.json b/models/vista3d/configs/metadata.json index 923cc380..80e974b9 100644 --- a/models/vista3d/configs/metadata.json +++ b/models/vista3d/configs/metadata.json @@ -1,7 +1,8 @@ { "schema": "https://github.com/Project-MONAI/MONAI-extra-test-data/releases/download/0.8.1/meta_schema_20240725.json", - "version": "0.5.4", + "version": "0.5.5", "changelog": { + "0.5.5": "add arg for trt compiler base path", "0.5.4": "add undefined label prompt check", "0.5.3": "update readme", "0.5.2": "fix eval issue", From 9eb042969948ec4db5cb6358aec71c93aa21d98d Mon Sep 17 00:00:00 2001 From: Yiheng Wang Date: Thu, 24 Oct 2024 21:15:42 +0800 Subject: [PATCH 2/2] fix pre commit Signed-off-by: Yiheng Wang --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 145907a4..21219e02 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,5 +1,5 @@ default_language_version: - python: python3.8 + python: python3 ci: autofix_prs: true