From 95ab52eb9fd55cfe04b625a4911c63c81f3570b5 Mon Sep 17 00:00:00 2001 From: shitao <2906698981@qq.com> Date: Mon, 4 Mar 2024 17:25:43 +0800 Subject: [PATCH] use logger --- FlagEmbedding/BGE_M3/modeling.py | 4 ++-- examples/unified_finetune/README.md | 6 +----- setup.py | 2 +- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/FlagEmbedding/BGE_M3/modeling.py b/FlagEmbedding/BGE_M3/modeling.py index 97fa38d..31eb3d6 100644 --- a/FlagEmbedding/BGE_M3/modeling.py +++ b/FlagEmbedding/BGE_M3/modeling.py @@ -82,10 +82,10 @@ class BGEM3Model(nn.Module): if os.path.exists(os.path.join(model_name, 'colbert_linear.pt')) and os.path.exists( os.path.join(model_name, 'sparse_linear.pt')): - print('loading existing colbert_linear and sparse_linear---------') + logger.info('loading existing colbert_linear and sparse_linear---------') self.load_pooler(model_dir=model_name) else: - print( + logger.info( 'The parameters of colbert_linear and sparse linear is new initialize. Make sure the model is loaded for training, not inferencing') def gradient_checkpointing_enable(self, **kwargs): diff --git a/examples/unified_finetune/README.md b/examples/unified_finetune/README.md index 957d20b..31ceda7 100644 --- a/examples/unified_finetune/README.md +++ b/examples/unified_finetune/README.md @@ -15,14 +15,10 @@ pip install -U FlagEmbedding ``` git clone https://github.com/FlagOpen/FlagEmbedding.git cd FlagEmbedding -pip install . -``` -For development, install as editable: - -``` pip install -e . ``` + ## 2. Data format Training data should be a jsonl file, where each line is a dict like this: diff --git a/setup.py b/setup.py index b93b184..9e9bedd 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ with open("README.md", mode="r", encoding="utf-8") as readme_file: setup( name='FlagEmbedding', - version='1.2.5', + version='1.2.6', description='FlagEmbedding', long_description=readme, long_description_content_type="text/markdown",