use logger

This commit is contained in:
shitao 2024-03-04 17:25:43 +08:00
parent 97f57a1b92
commit 95ab52eb9f
3 changed files with 4 additions and 8 deletions

View File

@ -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):

View File

@ -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:

View File

@ -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",