Skip to content

Commit 8250e5d

Browse files
authored
Upgrade langchain-core (1.2.2) (#161)
* upgrade langchain-core * adjust chunk size for embeddings generation * docker build/push for pushes to release/* branches
1 parent e398a37 commit 8250e5d

4 files changed

Lines changed: 55 additions & 19 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
push:
1010
branches:
1111
- main
12+
- release/*
1213

1314
permissions:
1415
id-token: write
@@ -81,7 +82,7 @@ jobs:
8182
path: /tmp/image.tar
8283

8384
docker-push:
84-
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
85+
if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/')) }}
8586
needs: docker-build
8687
runs-on: ubuntu-latest
8788

poetry.lock

Lines changed: 49 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/data_generation/reactome/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@ def upload_to_chromadb(
5353
embeddings_instance: Embeddings
5454
if hf_model is None: # Use OpenAI
5555
embeddings_instance = OpenAIEmbeddings(
56-
chunk_size=500,
56+
chunk_size=400,
5757
show_progress_bar=True,
5858
)
5959
elif hf_model.startswith("openai/text-embedding-"):
6060
embeddings_instance = OpenAIEmbeddings(
6161
model=hf_model[len("openai/") :],
62-
chunk_size=500,
62+
chunk_size=400,
6363
show_progress_bar=True,
6464
)
6565
elif "HUGGINGFACEHUB_API_TOKEN" in os.environ:

src/data_generation/uniprot/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ def upload_to_chromadb(
4444
print("Using OpenAI embeddings")
4545
embeddings_instance = OpenAIEmbeddings(
4646
model="text-embedding-3-large",
47-
chunk_size=800,
47+
chunk_size=500,
4848
show_progress_bar=True,
4949
)
5050
elif hf_model.startswith("openai/text-embedding-"):
5151
embeddings_instance = OpenAIEmbeddings(
5252
model=hf_model[len("openai/") :],
53-
chunk_size=800,
53+
chunk_size=500,
5454
show_progress_bar=True,
5555
)
5656
elif "HUGGINGFACEHUB_API_TOKEN" in os.environ:

0 commit comments

Comments
 (0)