From 31fc2bdebe73b4de9a89cd276f8b220ede888943 Mon Sep 17 00:00:00 2001 From: KerfuffleV2 Date: Thu, 31 Aug 2023 12:37:56 -0600 Subject: [PATCH] Life is suffering. --- convert-falcon-hf-to-gguf.py | 2 +- convert-gptneox-hf-to-gguf.py | 2 +- convert-llama-ggmlv3-to-gguf.py | 2 +- convert.py | 2 +- .../train-text-from-scratch/convert-train-checkpoint-to-gguf.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/convert-falcon-hf-to-gguf.py b/convert-falcon-hf-to-gguf.py index b0f670fbc..99abf078c 100755 --- a/convert-falcon-hf-to-gguf.py +++ b/convert-falcon-hf-to-gguf.py @@ -16,7 +16,7 @@ import torch from transformers import AutoTokenizer # type: ignore[import] # Use local gguf module if available. -if 'NO_LOCAL_GGUF' not in os.environ and (Path(__file__).parent.absolute().joinpath('gguf-py', 'gguf', '__init__.py')).is_file(): +if 'NO_LOCAL_GGUF' not in os.environ and Path(__file__).parent.absolute().joinpath('gguf-py', 'gguf', '__init__.py').is_file(): sys.path.insert(1, str(Path(__file__).parent.absolute().joinpath('gguf-py', 'gguf'))) import gguf diff --git a/convert-gptneox-hf-to-gguf.py b/convert-gptneox-hf-to-gguf.py index cc757b640..abbddf3fb 100755 --- a/convert-gptneox-hf-to-gguf.py +++ b/convert-gptneox-hf-to-gguf.py @@ -16,7 +16,7 @@ import torch from transformers import AutoTokenizer # type: ignore[import] # Use local gguf module if available. -if 'NO_LOCAL_GGUF' not in os.environ and (Path(__file__).parent.absolute().joinpath('gguf-py', 'gguf', '__init__.py')).is_file(): +if 'NO_LOCAL_GGUF' not in os.environ and Path(__file__).parent.absolute().joinpath('gguf-py', 'gguf', '__init__.py').is_file(): sys.path.insert(1, str(Path(__file__).parent.absolute().joinpath('gguf-py', 'gguf'))) import gguf diff --git a/convert-llama-ggmlv3-to-gguf.py b/convert-llama-ggmlv3-to-gguf.py index 3f08801bf..43bc3f765 100755 --- a/convert-llama-ggmlv3-to-gguf.py +++ b/convert-llama-ggmlv3-to-gguf.py @@ -11,7 +11,7 @@ import numpy as np import os # Use local gguf module if available. -if 'NO_LOCAL_GGUF' not in os.environ and (Path(__file__).parent.absolute().joinpath('gguf-py', 'gguf', '__init__.py')).is_file(): +if 'NO_LOCAL_GGUF' not in os.environ and Path(__file__).parent.absolute().joinpath('gguf-py', 'gguf', '__init__.py').is_file(): sys.path.insert(1, str(Path(__file__).parent.absolute().joinpath('gguf-py', 'gguf'))) import gguf diff --git a/convert.py b/convert.py index b6641ea96..78cbb7b7a 100755 --- a/convert.py +++ b/convert.py @@ -30,7 +30,7 @@ from sentencepiece import SentencePieceProcessor # type: ignore[import] import os # Use local gguf module if available. -if 'NO_LOCAL_GGUF' not in os.environ and (Path(__file__).parent.absolute().joinpath('gguf-py', 'gguf', '__init__.py')).is_file(): +if 'NO_LOCAL_GGUF' not in os.environ and Path(__file__).parent.absolute().joinpath('gguf-py', 'gguf', '__init__.py').is_file(): sys.path.insert(1, str(Path(__file__).parent.absolute().joinpath('gguf-py', 'gguf'))) import gguf diff --git a/examples/train-text-from-scratch/convert-train-checkpoint-to-gguf.py b/examples/train-text-from-scratch/convert-train-checkpoint-to-gguf.py index 0cd2892a3..46b48cb09 100644 --- a/examples/train-text-from-scratch/convert-train-checkpoint-to-gguf.py +++ b/examples/train-text-from-scratch/convert-train-checkpoint-to-gguf.py @@ -9,7 +9,7 @@ import numpy as np from pathlib import Path # Use local gguf module if available. -if 'NO_LOCAL_GGUF' not in os.environ and (Path(__file__).parent.absolute().joinpath('..', '..', 'gguf-py', 'gguf', '__init__.py')).is_file(): +if 'NO_LOCAL_GGUF' not in os.environ and Path(__file__).parent.absolute().joinpath('..', '..', 'gguf-py', 'gguf', '__init__.py').is_file(): sys.path.insert(1, str(Path(__file__).parent.absolute().joinpath('..', '..', 'gguf-py', 'gguf'))) import gguf