-
Notifications
You must be signed in to change notification settings - Fork 10
Collections: one batch processing per task #786
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
nishika26
wants to merge
19
commits into
main
Choose a base branch
from
enhancement/collection_batching
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 13 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
1eabb00
default file size and addding documentation
nishika26 7f5d86f
default file size and addding documentation
nishika26 fa853c3
Merge branch 'main' into bug/file_size_default
nishika26 8e3d29d
coderabbit reviews
nishika26 bed1d1a
test cases failing
nishika26 d02bac8
changing the logic
nishika26 8b7556c
fixing test cases
nishika26 ca6c17e
Merge branch 'main' into enhancement/collection_batching
nishika26 baaeac2
adding alembic file
nishika26 47525e4
adding logic to the pr
nishika26 0720a17
Merge branch 'main' into enhancement/collection_batching
nishika26 2a2e268
pushing few changes
nishika26 eb38c73
Merge branch 'main' into enhancement/collection_batching
nishika26 0d7f4a1
adding test cases
nishika26 fb4e874
Merge branch 'main' into enhancement/collection_batching
nishika26 290d5f0
fixing test cases
nishika26 9f95a76
increasing test cases
nishika26 cb97654
incrreading test coverage
nishika26 fd37d14
coderabbit reviews
nishika26 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
62 changes: 62 additions & 0 deletions
62
backend/app/alembic/versions/055_add_batch_tracking_to_collections_jobs.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| """add batch tracking to collection_jobs | ||
|
|
||
| Revision ID: 055 | ||
| Revises: 054 | ||
| Create Date: 2026-04-13 | ||
|
|
||
| """ | ||
| from alembic import op | ||
| import sqlalchemy as sa | ||
|
|
||
|
|
||
| # revision identifiers, used by Alembic. | ||
| revision = "055" | ||
| down_revision = "054" | ||
| branch_labels = None | ||
| depends_on = None | ||
|
|
||
|
|
||
| def upgrade(): | ||
| op.add_column( | ||
| "collection_jobs", | ||
| sa.Column( | ||
| "total_batches", | ||
| sa.Integer(), | ||
| nullable=True, | ||
| comment="Total number of batches the documents are split into", | ||
| ), | ||
| ) | ||
| op.add_column( | ||
| "collection_jobs", | ||
| sa.Column( | ||
| "current_batch_number", | ||
| sa.Integer(), | ||
| nullable=True, | ||
| comment="Which batch is currently being processed (1-indexed)", | ||
| ), | ||
| ) | ||
| op.add_column( | ||
| "collection_jobs", | ||
| sa.Column( | ||
| "documents_uploaded", | ||
| sa.JSON(), | ||
| nullable=True, | ||
| comment="List of document IDs successfully uploaded so far", | ||
| ), | ||
| ) | ||
| op.add_column( | ||
| "document", | ||
| sa.Column( | ||
| "openai_file_id", | ||
| sa.String(), | ||
| nullable=True, | ||
| comment="File ID assigned by the LLM provider (e.g. OpenAI file ID) to avoid re-uploading", | ||
| ), | ||
| ) | ||
|
|
||
|
|
||
| def downgrade(): | ||
| op.drop_column("collection_jobs", "total_batches") | ||
| op.drop_column("collection_jobs", "current_batch_number") | ||
| op.drop_column("collection_jobs", "documents_uploaded") | ||
| op.drop_column("document", "openai_file_id") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.