-
Notifications
You must be signed in to change notification settings - Fork 10
Collections: Add dynamic batching #718
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
23
commits into
main
Choose a base branch
from
enhancement/dynamic_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 all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
614801c
collections:add dynamic batching
nishika26 f8f9c2f
coderabbit reviews
nishika26 f9b3365
coderabbit reviews
nishika26 a074e36
coderabbit reviews
nishika26 1106abc
fixing test cases
nishika26 ff0726f
pr review fixes
nishika26 c7da9f0
coderabbit review
nishika26 8437442
removing batch_size from request
nishika26 f94998f
for fixing test cases
nishika26 ed1ee38
Merge branch 'main' into enhancement/dynamic_batching
nishika26 5ec17be
size limit on doc upload
nishika26 3246e88
test coverage increase
nishika26 292be60
Merge branch 'main' into enhancement/dynamic_batching
AkhileshNegi 4c20ac9
Merge branch 'main' into enhancement/dynamic_batching
nishika26 9be2e06
pr review fixes
nishika26 b02b8f2
Merge branch 'main' into enhancement/dynamic_batching
nishika26 db593e2
adding doc helper test cases
nishika26 c775c90
making file size function non-async
nishika26 f809ce8
adding max time limit test case
nishika26 651f038
Merge branch 'main' into enhancement/dynamic_batching
nishika26 5e25928
fixng migration issue
nishika26 aa19cd5
small error
nishika26 69f5c00
fixing test cases
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/051_add_columns_to_collection_job_and_documents.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 columns to collection job and documents table | ||
|
|
||
| Revision ID: 051 | ||
| Revises: 050 | ||
| Create Date: 2026-03-25 10:09:47.318575 | ||
|
|
||
| """ | ||
| from alembic import op | ||
| import sqlalchemy as sa | ||
|
|
||
|
|
||
| # revision identifiers, used by Alembic. | ||
| revision = "051" | ||
| down_revision = "050" | ||
| branch_labels = None | ||
| depends_on = None | ||
|
|
||
|
|
||
| def upgrade(): | ||
| op.add_column( | ||
| "collection_jobs", | ||
| sa.Column( | ||
| "docs_num", | ||
| sa.Integer(), | ||
| nullable=True, | ||
| comment="Total number of documents to be processed in this job", | ||
| ), | ||
| ) | ||
| op.add_column( | ||
| "collection_jobs", | ||
| sa.Column( | ||
| "total_size_mb", | ||
| sa.Float(), | ||
| nullable=True, | ||
| comment="Total size of documents being uploaded to collection in MB", | ||
| ), | ||
| ) | ||
| op.add_column( | ||
| "collection_jobs", | ||
| sa.Column( | ||
| "documents", | ||
| sa.JSON(), | ||
| nullable=True, | ||
| comment="List of documents given to make collection", | ||
| ), | ||
| ) | ||
| op.add_column( | ||
| "document", | ||
| sa.Column( | ||
| "file_size_kb", | ||
| sa.Float(), | ||
| nullable=True, | ||
| comment="Size of the document in kilobytes (KB)", | ||
| ), | ||
| ) | ||
|
|
||
|
|
||
| def downgrade(): | ||
| op.drop_column("document", "file_size_kb") | ||
| op.drop_column("collection_jobs", "total_size_mb") | ||
| op.drop_column("collection_jobs", "docs_num") | ||
| op.drop_column("collection_jobs", "documents") |
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
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
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
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
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.