From 7e3f4184152d55c1efe5fa4622e8eb2cc4f6fac9 Mon Sep 17 00:00:00 2001 From: PengWeixuan <145038191+PengWeixuan@users.noreply.github.com> Date: Sun, 24 Nov 2024 23:47:41 +0800 Subject: [PATCH 1/2] Fix "Unresolved reference 'THIS_DIR' " Add the value of THIS_DIR. --- models/scripts/multimodal_example_text_completion.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/models/scripts/multimodal_example_text_completion.py b/models/scripts/multimodal_example_text_completion.py index 8d18d7b0..40cb5134 100644 --- a/models/scripts/multimodal_example_text_completion.py +++ b/models/scripts/multimodal_example_text_completion.py @@ -18,7 +18,9 @@ from PIL import Image as PIL_Image from termcolor import cprint +from pathlib import Path +THIS_DIR = Path(__file__).parent.resolve() def run_main( ckpt_dir: str, From 6c55e59911acec99e67bc2f38848cb24dcaf441a Mon Sep 17 00:00:00 2001 From: PengWeixuan <145038191+PengWeixuan@users.noreply.github.com> Date: Sun, 24 Nov 2024 23:48:22 +0800 Subject: [PATCH 2/2] Fix "Unresolved reference 'THIS_DIR' " Add the value of THIS_DIR. --- models/scripts/multimodal_example_chat_completion.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/models/scripts/multimodal_example_chat_completion.py b/models/scripts/multimodal_example_chat_completion.py index 46bbf828..de0a6106 100644 --- a/models/scripts/multimodal_example_chat_completion.py +++ b/models/scripts/multimodal_example_chat_completion.py @@ -17,7 +17,9 @@ from llama_models.llama3.reference_impl.generation import Llama from PIL import Image as PIL_Image +from pathlib import Path +THIS_DIR = Path(__file__).parent.resolve() def run_main( ckpt_dir: str,